[Bug]: aws_s3_object.x.etag using existing value rather than (known after apply) #30029
Labels
bug
Addresses a defect in current functionality.
service/ec2
Issues and PRs that pertain to the ec2 service.
service/s3
Issues and PRs that pertain to the s3 service.
Terraform Core Version
1.0.11
AWS Provider Version
4.58.0
Affected Resource(s)
Expected Behavior
I am attempting to trigger an instance refresh when an S3 object is updated. I am trying to do this by updating the tags in the launch template with the etag of the S3 object, which would then trigger a new version of the launch template, and consequently an instance refresh.
I expect the tag to use the etag for the object added as part of the apply and as such the plan for my tags to show:
Actual Behavior
However instead of doing this, it uses the existing etag for the object in the state, so if the etag is out of date, the plan shows:
Which then leads to the following error as the etag is updated as the new object is uploaded.
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
Attempt to reference the aws_s3_object.x.etag output in a configuration when updating the aws_s3_object.x resource as part of apply.
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: