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

[Bug]: Adding Tags to S3 Buckets Causes Perpetual Drift #34185

Closed
tomburge opened this issue Oct 31, 2023 · 4 comments · Fixed by #35710
Closed

[Bug]: Adding Tags to S3 Buckets Causes Perpetual Drift #34185

tomburge opened this issue Oct 31, 2023 · 4 comments · Fixed by #35710
Labels
bug Addresses a defect in current functionality. service/s3 Issues and PRs that pertain to the s3 service. tags Pertains to resource tagging.
Milestone

Comments

@tomburge
Copy link

tomburge commented Oct 31, 2023

Terraform Core Version

Terraform v1.6.2 on windows_amd64

AWS Provider Version

registry.terraform.io/hashicorp/aws v5.23.1

Affected Resource(s)

S3 buckets

Expected Behavior

Tags attached to a S3 bucket are created as defined in the variables or an error should be returned that the tags aren't formatted correctly.

Actual Behavior

2 scenarios

  1. I added tags to the resource with one tag being an empty string and it deleted all tags on the resource. This scenario causes perpetual drift and an immediate plan after deploying, shows changes need to be applied.

  2. I added tags to the resource with all tags not being empty strings and the tags applied properly.

This behavior does not occur on another resource I am deploying with the same Terraform which is a VPC.

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

Minimal Configuration

https://gist.github.com/tomburge/65280e05d2bfd308f78c4b5704dfe826

Steps to Reproduce

Create a new project.
Create the files from the above gist.
Ensure that version 1.6.2 and AWS provider version 5.23.1 are used.
Plan and deploy with first version of tags. Plan again.
Plan and deploy with second version of tags. Plan again.

Screenshot 1 shows no tags:

s3 console no tags

Screenshot 2 shows tags with an empty tag created from the console:

s3 console tags with an empty tag

Screenshot 3 shows the same tags on a VPC.

vpc console tags

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

@tomburge tomburge added the bug Addresses a defect in current functionality. label Oct 31, 2023
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • 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.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Oct 31, 2023
@ewbankkit ewbankkit added service/s3 Issues and PRs that pertain to the s3 service. tags Pertains to resource tagging. labels Oct 31, 2023
@ewbankkit
Copy link
Contributor

Similar: #30801, #31941.

@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Nov 2, 2023
@github-actions github-actions bot added this to the v5.40.0 milestone Mar 4, 2024
Copy link

github-actions bot commented Mar 7, 2024

This functionality has been released in v5.40.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

Copy link

github-actions bot commented Apr 7, 2024

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/s3 Issues and PRs that pertain to the s3 service. tags Pertains to resource tagging.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants