-
-
Notifications
You must be signed in to change notification settings - Fork 248
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
Fixed Deprecated aws_s3_bucket Options #266
Conversation
The following options were deprecated, and have either been updated, or replaced with the new necessary resources: * `override_json` replaced with `override_policy_documents` option * `server_side_encryption_configuration` replaced with `aws_s3_bucket_server_side_encryption_configuration` resource * `versioning` replaced with `aws_s3_bucket_versioning` resource * `cors_rule` replaced with `aws_s3_bucket_cors_configuration` resource * `acl` replaced with `aws_s3_bucket_acl` resource
Hi guys @dotCipher and @joe-niland! Any updates on this? We are still seeing the following deprecation warning:
|
Bump, checking in on the progress of this patch. |
Thank you! We are looking forward to this update. |
Thanks @afrazkhan and sorry for the delay in reviewing. There are some formatting issues. Could you please run the following to see the output?
I believe they can be fixed by running |
@@ -480,6 +480,17 @@ variable "versioning_enabled" { | |||
description = "When set to 'true' the s3 origin bucket will have versioning enabled" | |||
} | |||
|
|||
variable "bucket_versioning" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This effectively deprecates versioning_enabled
. For backwards compatibility it should be mapped to the new variable with value "Enabled".
It would also be good to remove its use from the examples.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might be misunderstanding, but since var.versioning_enabled
is a bool
, wouldn't I break backwards compatibility if I changed it to a string and set it's default to Enabled
? Or do you mean to map it via something like doing some logic in locals
?
Something like
locals {
bucket_versioning = var.versioning_enabled || var.bucket_versioning == "Enabled" ? "Enabled" : "Disabled"
}
and then use local.bucket_versioning
everywhere instead?
Thanks @afrazkhan for creating this pull request! A maintainer will review your changes shortly. Please don't be discouraged if it takes a while. While you wait, make sure to review our contributor guidelines. Tip Need help or want to ask for a PR review to be expedited?Join us on Slack in the |
This pull request now has conflicts. Could you fix it @afrazkhan? 🙏 |
This PR has been closed due to inactivity and merge conflicts. |
The following options were deprecated, and have either been updated,
or replaced with the new necessary resources:
override_json
replaced withoverride_policy_documents
optionserver_side_encryption_configuration
replaced withaws_s3_bucket_server_side_encryption_configuration
resourceversioning
replaced withaws_s3_bucket_versioning
resourcecors_rule
replaced withaws_s3_bucket_cors_configuration
resourceacl
replaced withaws_s3_bucket_acl
resource