Provide the content of an aws_s3_object resource as an attribute. This would let us manage an aws_s3_object resource in one place, and consume the content provided by an external system via the object.
The alternative would be to have a resource and a data source for the same object, which means that the first apply wouldn't work due to the object not existing yet.
Affected Resource(s) and/or Data Source(s)
aws_s3_object resource
Potential Terraform Configuration
resource "aws_s3_object" "example" {
bucket = "example"
key = "example.json"
content = jsonencode([])
content_type = "application/json"
lifecycle {
ignore_changes = [content, metadata]
}
}
# If something else changes the content of the S3 object, this should be different on next plan/apply.
output "s3_content" {
value = aws_s3_object.example.content
}
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.
Description
Provide the
content
of anaws_s3_object
resource as an attribute. This would let us manage anaws_s3_object
resource in one place, and consume the content provided by an external system via the object.The alternative would be to have a resource and a data source for the same object, which means that the first apply wouldn't work due to the object not existing yet.
Affected Resource(s) and/or Data Source(s)
aws_s3_object
resourcePotential Terraform Configuration
References
No response
Would you like to implement a fix?
None