terraform-oci-oke icon indicating copy to clipboard operation
terraform-oci-oke copied to clipboard

`uuid()` in `operator_instance_principal_dynamic_group` causes recreation on every apply

Open yousifd opened this issue 3 years ago • 0 comments

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version and Provider Version

Terraform Version: 1.2.7 Provider Version: 4.87.0 Module Version: 4.2.6

Affected Resource(s)

oci_identity_policy.operator_instance_principal_dynamic_group

Terraform Configuration Files

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. 
# Please remove any sensitive information from configuration files before sharing them. 

Debug Output

Panic Output

Expected Behavior

Every time a new plan or apply is made the oci_identity_policy.operator_instance_principal_dynamic_group resource should not be recreated since nothing changes about it from a user's perspective.

Actual Behavior

The oci_identity_policy.operator_instance_principal_dynamic_group resource is recreated on every plan/apply cycle because of the usage of uuid() in the name.

Steps to Reproduce

  1. Use the module with an operator and bastion servers.
  2. Apply this configuration.
  3. Plan afterwards and you will see the oci_identity_policy.operator_instance_principal_dynamic_group is recreated because of a name change due to the uuid() used in the name.

Important Factoids

References

There was a similar issue referring to defined_tags that causes recreation, but in this case it's name instead. https://github.com/oracle-terraform-modules/terraform-oci-oke/issues/305

yousifd avatar Aug 18 '22 07:08 yousifd