Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Repository name updates break dependent repository secrets #1754

Conversation

KenSpur
Copy link
Contributor

@KenSpur KenSpur commented Jun 23, 2023

Resolves #1753


Behavior

See issure #1753 .

Other information


Additional info

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Added the appropriate label for the given change

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes (Please add the Type: Breaking change label)
  • No

If Yes, what's the impact:

  • N/A

Pull request type

Please add the corresponding label for change this PR introduces:

  • Bugfix: Type: Bug
  • Feature/model/API additions: Type: Feature
  • Updates to docs or samples: Type: Documentation
  • Dependencies/code cleanup: Type: Maintenance

@KenSpur
Copy link
Contributor Author

KenSpur commented Jun 28, 2023

Ready for review/merge!

examples/test_delete_me/main.tf Outdated Show resolved Hide resolved
@@ -16,13 +16,13 @@ func resourceGithubActionsSecret() *schema.Resource {
return &schema.Resource{
Create: resourceGithubActionsSecretCreateOrUpdate,
Read: resourceGithubActionsSecretRead,
Update: resourceGithubActionsSecretCreateOrUpdate,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain why removing the update and adding ForceNew solves this issue?

Copy link
Contributor Author

@KenSpur KenSpur Jun 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Resource Id is made up of the repository and secret_name as a TwoPartID which should be immutable if im not mistaken.

While the update is removed because all properties have forcenew or computed (terraform will complain about it if its left in).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

github/resource_github_actions_environment_secret.go seems to be similar

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh got it, thank you!

@kfcampbell kfcampbell merged commit 9e09aee into integrations:main Jun 28, 2023
avidspartan1 pushed a commit to avidspartan1/terraform-provider-github that referenced this pull request Feb 5, 2024
…tegrations#1754)

* fix rename issue & add tests

* fix rename issue & add tests

* fix rename issue & add tests

* remove main.tf

---------

Co-authored-by: Keegan Campbell <me@kfcampbell.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Repository name updates break dependent repository secrets
2 participants