-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
[Bug]: Plan always tries to add AWS tags #30132
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
I experience the same, and it's not SNS specific. aws_ssm_parameter aws_s3_bucket aws_dynamodb_table aws_iam_user etc |
Same here on provider configuration provider "aws" {
region = "eu-central-1"
default_tags {
tags = {
"custom:CostCenter" = "department-a"
}
}
} user definition resource "aws_iam_user" "users" {
name = "user1"
force_destroy = var.force_destroy
tags = {
"custom:User" = "user1@test.com"
"custom:CostCenter" = "department-a"
}
} For users who define the |
This is this bug: #18311 |
I saw this one before, but it did not completely match what I'm seeing (and what I think is the point of the initial description above). But I saw a comment in this issue that actually describes the behavior of the exact match. My expectation would be that |
This happened to me with aws_ec2_transit_gateway_vpc_attachment |
Hello. Just wondering any update on this issue? Thanks. |
terraform version: 1.7.5 This happens to us with certain s3 objects, python scripts, glue job resources. |
Terraform Core Version
1.2.8
AWS Provider Version
4.59.0
Affected Resource(s)
aws_sns_topic
Expected Behavior
Terraform should have said there were no changes.
Actual Behavior
Terraform presented a plan to add a new AWS tag to the
aws_sns_topic
resource. The tag's name wasEnvironment
and its value was "dev".Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
I've put a gist here. You can use it as follows:
Steps to Reproduce
1
Expand the file
module-plus.tar.gz
which you obtained from the gist above. This will create a new directory calledmodules-plus
.2
Change to the
modules-plus
directory.3
Give the following command:
4
Give the following command:
Terraform will present a plan to create an SNS topic and an SNS subscription.
I've used
example@example.com
in testing, but feel free to use another address. Note that AWS will try to send a confirmation email to the address.5
Accept Terraform's plan.
6
Wait until Terraform has carried out its plan.
7
Verify that the new SNS topic has a tag named
Environment
with the value "dev".8
Repeat the command from step 4.
Terraform will then present a plan that looks like this:
This is wrong because you have already established (in the previous step) that the topic has the
Environment
tag.However many times you run the command from step 4 and accept Terraform's plan, the next run of the command will ask you if you want to add the tag.
Debug Output
I made a debug log, but upon examining it, I became concerned that I might miss a sensitive item while redacting.
If you would really like a debug log, let me know and I'll consider posting one.
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
No
The text was updated successfully, but these errors were encountered: