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

Fix Satellite Locations recreation when updating, remove forcenew, add computed and applyonce #5090

Merged
merged 1 commit into from
Feb 5, 2024

Conversation

Blintmester
Copy link
Contributor

Fix test steps:

  • I created a satellite location with provider v1.61.0
  • after creation, checked the default values of pod_subnet and service_subnet
  • updated provider version to v1.62.0
  • tried to terraform plan -> it tried to recreate the whole location
  • built the local version of the provider, with custom version tag
  • updated provider version to custom version tag
  • tried to terraform plan -> it said no changes in the resource
  • tried to update some fields, and then terraform plan -> only wanted to update the fields, not recreate the whole location

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Relates OR Closes #0000

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccXXX'

...

@bhpratt
Copy link
Contributor

bhpratt commented Jan 31, 2024

I think you want to keep the force new - changing the subnets should force a location destroy.


edit - though perhaps that's not needed with the flex.ApplyOnce.

@libesz
Copy link

libesz commented Jan 31, 2024

@bhpratt yep, that was the idea. IMHO changing immutable parameters in general should mean force redeploy, but in case of such a huge resource as a satellite location, it is unlikely that one would really want redeploy everything with a terraform apply. The same was suggested for the IP autodetect method -> it is only effective on create, and once a change is requested on a subsequent apply, the user is notified that the request is ignored.

@hkantare hkantare merged commit a0a83ed into IBM-Cloud:master Feb 5, 2024
1 check passed
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.

5 participants