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

5.x: create_iam_tag_namespace is not indepotent after first creation #789

Open
thpham opened this issue Jul 27, 2023 · 0 comments
Open

5.x: create_iam_tag_namespace is not indepotent after first creation #789

thpham opened this issue Jul 27, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@thpham
Copy link
Contributor

thpham commented Jul 27, 2023

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 v1.5.1
+ provider registry.terraform.io/hashicorp/cloudinit v2.3.2
+ provider registry.terraform.io/hashicorp/helm v2.10.1
+ provider registry.terraform.io/hashicorp/http v3.4.0
+ provider registry.terraform.io/hashicorp/null v3.2.1
+ provider registry.terraform.io/hashicorp/random v3.5.1
+ provider registry.terraform.io/hashicorp/time v0.9.1
+ provider registry.terraform.io/oracle/oci v5.4.0

Affected Resource(s)

  • modules/iam : tagging.tf -> tag_namespace_id_found + create_iam_tag_namespace local var.

the latest is then used as count boolean to create the resources oci_identity_tag_namespace + oci_identity_tag

Terraform Configuration Files

iam.tfvars

## IAM resources
create_iam_resources     = true // true/*false
create_iam_tag_namespace = true // true/*false
create_iam_defined_tags  = true // true/*false

Debug Output

Panic Output

Expected Behavior

when we run the terraform apply, then on the first run it creates the oci_identity_tag_namespace + oci_identity_tag resources, ok everything actually works. the following runs of plan/apply detects the resources exists and keep them.

Actual Behavior

when we run the terraform apply, then on the first run it creates the oci_identity_tag_namespace + oci_identity_tag resources, ok everything actually works, but then, when we run plan/apply it a second+ time, the logic detects they already exists and try to delete them.

Steps to Reproduce

Important Factoids

the issue seems related to the logic related to the create_iam_tag_namespace

References

@thpham thpham added the bug Something isn't working label Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant