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

add enable flag for aws_s3_bucket_versioning #23809

Closed
mheiges opened this issue Mar 22, 2022 · 3 comments
Closed

add enable flag for aws_s3_bucket_versioning #23809

mheiges opened this issue Mar 22, 2022 · 3 comments
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/s3 Issues and PRs that pertain to the s3 service. stale Old or inactive issues managed by automation, if no further action taken these will get closed.

Comments

@mheiges
Copy link

mheiges commented Mar 22, 2022

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • 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
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

The versioning block of the aws_s3_bucket resource in the 3.x provider used a boolean enabled flag. If false, the bucket would be transparently managed either as unversioned or versioned-suspended as needed to satisfy AWS rules.

The new aws_s3_bucket_versioning has to be explicitly defined as Disabled or Suspended when we don't want versioning enabled. This requires that we now micro-manage individual buckets because some random buckets that were originally created as enabled = false (unversioned) may have been manually changed to Suspended outside Terraform, say through the S3 console. Those buckets become incompatible with the "Disabled" setting in Terraform. We have a long list of buckets, created by a single module, that we now have to individually parameterize with Disable or Suspended unless we force everything to Suspended.

Can a boolean enable flag be added to aws_s3_bucket_versioning that restores the transparent management of unversioned/suspended states?

New or Affected Resource(s)

  • aws_s3_bucket_versioning

Potential Terraform Configuration

resource "aws_s3_bucket_versioning" "example" {
  bucket = aws_s3_bucket.example.id
  versioning_configuration {
    enabled = false
  }
}
@mheiges mheiges added the enhancement Requests to existing resources that expand the functionality or scope. label Mar 22, 2022
@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/s3 Issues and PRs that pertain to the s3 service. labels Mar 22, 2022
@mheiges mheiges changed the title enable flag for aws_s3_bucket_versioning add enable flag for aws_s3_bucket_versioning Mar 23, 2022
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Mar 23, 2022
@casey-robertson-paypal
Copy link

casey-robertson-paypal commented Jun 9, 2022

Seeing this same issue. Was working through provider upgrade and ran into the following. I cannot account for why the status is Suspended vs Disabled but it is and now I can't run the 4.x provider against it.

╷
│ Error: versioning_configuration.status cannot be updated from 'Suspended' to 'Disabled'
│ 

Resource:

resource "aws_s3_bucket_versioning" "xxxxx_qrcode_bucket" {
  bucket = aws_s3_bucket.xxxxx_qrcode_bucket.id
  versioning_configuration {
    status = "Disabled"
  }
}

Copy link

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

@github-actions github-actions bot added the stale Old or inactive issues managed by automation, if no further action taken these will get closed. label May 30, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 29, 2024
Copy link

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 Jul 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/s3 Issues and PRs that pertain to the s3 service. stale Old or inactive issues managed by automation, if no further action taken these will get closed.
Projects
None yet
Development

No branches or pull requests

3 participants