-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
S3 bucket versioning enabled when explicitly set to false #4494
Comments
This is still happening in the terraform version and aws provider:
Output:
|
I am still seeing this with Terraform 0.11.11 and aws provider 1.57 |
I've noticed something strange in connection with the versioning argument in TFE Sentinel. If I don't include the I wonder if this is related to the problem reported here? It seems that versioning is being treated inconsistently based on whether it is included or not. Note that when I do not include it, my plan shows If I do explicitly set More germane to this issue is that versioning actually was disabled as desired for my S3 bucket, contrary to what the other posters have reported. Here is my Terraform code:
|
HI, We're encountering this also. We're setting versioning {
enabled = false
} The bucket gets created "unversioned". the IF statement here is naive. It should evaluate whether Upon checking the wording/enum/const of 'unversioned' this might be a limitation/bug of the aws-sdk-go... However the aws-sdk-go seems to only set two values in the I'll try to test it when I can. |
Further to my last above - The SDK is working as I expected. The bug lies within this provider. Here's the code I used to test: https://gist.github.com/JoshiiSinfield/6007d9784b496b3b2f35ea411181d8db the output looks something like:
I'll try and push a PR up when I can... |
terraform-aws-provider creates bucket with Versioning
debug output.
If I remove the following blocks from my main.tf, the bucket is created with versioning disabled.
It seems it is a bug in terraform-provider-aws. it calls update function after creating the bucket
then update checks if versioning enabled it set enabled or suspended
|
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 the s3 bucket specification explicitly sets the versioning of a bucket to false, the bucket gets wringly created with versioning enabled.
The following snippets creates a bucket with versioning enabled when it is explicitly set to false.
The default (without specifying the versioning) creates a bucket with versioning disabled:
Terraform version
terraform --version
Terraform v0.11.7
The text was updated successfully, but these errors were encountered: