-
Notifications
You must be signed in to change notification settings - Fork 766
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
Do not destroy the repository when you change the repository name #699
Conversation
} | ||
|
||
testCase := func(t *testing.T, mode string) { | ||
resource.Test(t, resource.TestCase{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to add a check in here that the existing resource wasn't destroyed/a new resource wasn't created?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given this added test and some manual verification, this safe to be released for further testing in the community.
} | ||
|
||
testCase := func(t *testing.T, mode string) { | ||
resource.Test(t, resource.TestCase{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…tegrations#699) * Don't make name a force new field for the github_repository resource * Add a unit test * fix up lint
Inspired by the discussion in here: #616, the change for this was easier than I expected. I just made it so that changing the
name
field wouldn't force a new resource.I tested this change locally using the following terraform config:
After planning and applying the config above, I went ahead and changed the config to:
The following gist contains the resulting plan and apply of the provider
before
andafter
my changes.I also went ahead and added a unit test for this: