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

[Enhancement]: aws_s3_object content attribute with ignore_changes #32302

Open
skeggse opened this issue Jun 30, 2023 · 1 comment
Open

[Enhancement]: aws_s3_object content attribute with ignore_changes #32302

skeggse opened this issue Jun 30, 2023 · 1 comment
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/s3 Issues and PRs that pertain to the s3 service.

Comments

@skeggse
Copy link
Contributor

skeggse commented Jun 30, 2023

Description

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
}

References

No response

Would you like to implement a fix?

None

@skeggse skeggse added enhancement Requests to existing resources that expand the functionality or scope. needs-triage Waiting for first response or review from a maintainer. labels Jun 30, 2023
@github-actions github-actions bot added the service/s3 Issues and PRs that pertain to the s3 service. label Jun 30, 2023
@github-actions
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.

@skeggse skeggse changed the title [Enhancement]: [Enhancement]: aws_s3_object content attribute with ignore_changes Jun 30, 2023
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/s3 Issues and PRs that pertain to the s3 service.
Projects
None yet
Development

No branches or pull requests

2 participants