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

Tags reapplied every time #2159

Open
sanjeevgopal opened this issue Jan 15, 2025 · 1 comment
Open

Tags reapplied every time #2159

sanjeevgopal opened this issue Jan 15, 2025 · 1 comment

Comments

@sanjeevgopal
Copy link

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 other comments that do not add relevant new information or questions, 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
  • The resources and data sources in this provider are generated from the CloudFormation schema, so they can only support the actions that the underlying schema supports. For this reason submitted bugs should be limited to defects in the generation and runtime code of the provider. Customizing behavior of the resource, or noting a gap in behavior are not valid bugs and should be submitted as enhancements to AWS via the CloudFormation Open Coverage Roadmap.

Terraform CLI and Terraform AWS Cloud Control Provider Version

Terraform v1.10.4
on darwin_amd64

  • provider registry.terraform.io/hashicorp/aws v5.83.1
  • provider registry.terraform.io/hashicorp/awscc v1.25.0
  • provider registry.terraform.io/hashicorp/null v3.2.3

Affected Resource(s)

  • awscc_ec2_verified_access_endpoint
  • Others: awscc_ec2_verified_access_*

Terraform Configuration Files

resource "awscc_ec2_verified_access_endpoint" "workload_http" {
  ...
  tags = concat(
    [
      {
        key   = "Name"
        value = "workload-http"
      }
    ],
    local.awscc_default_tags
  )
}

Output (During terraform apply)

awscc_ec2_verified_access_endpoint.workload_http will be updated in-place

~ resource "awscc_ec2_verified_access_endpoint" "workload_http" {
+ device_validation_domain = (known after apply)
id = "vae-01c91126e0be95b22"
+ network_interface_options = (known after apply)
+ policy_document = (known after apply)
~ tags = [
- {
- key = "Environment" -> null
- value = "2025-01-15" -> null
},
{
key = "Name"
value = "t65-workload-http"
},
- {
- key = "Owner" -> null
- value = "xyz.com" -> null
},
- {
- key = "Project" -> null
- value = "2025-01-15" -> null
},
{
key = "Stack"
value = "tf-ava"
},
{
key = "Stack-Created"
value = "2025-01-14"
},
- {
- key = "Stack-Updated" -> null
- value = "2025-01-14" -> null
},
+ {
+ key = "Environment"
+ value = "tst"
},
+ {
+ key = "Owner"
+ value = "[email protected]"
},
+ {
+ key = "Project"
+ value = "xyz.com"
},
+ {
+ key = "Stack-Updated"
+ value = "2025-01-15"
},
]
# (17 unchanged attributes hidden)
}

Expected Behavior

The tags should not be reapplied as they have not changed. But it looks like the read phase gets the tags wrong, and hence the same tags are applied again.

@quixoticmonk
Copy link
Collaborator

Thank you for opening the issue @sanjeevgopal . Can you share how the tags are ordered in your state and the config and merged plan from the first time around ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants