Update Terraform cloudposse/s3-bucket/aws to v4 (release/v0) #98
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
3.0.0
->4.2.0
Release Notes
cloudposse/terraform-aws-s3-bucket (cloudposse/s3-bucket/aws)
v4.2.0
Compare Source
Added IP-based statement in bucket policy @soya-miyoshi (#216)
what
source_ip_allow_list
variable.why
Use cases:
references
v4.1.0
Compare Source
🚀 Enhancements
fix: use for_each instead of count in aws_s3_bucket_logging @wadhah101 (#212)
what
Replaced the count with a for_each inside
aws_s3_bucket_logging.default
there's no point in the try since the type is clearly defined as list
why
When the
bucket_name
withinlogging
attribute is dynamically defined, like in the case of referencing a bucket created by terraform for loggingwe get this error
For each can work better in this case and will solve the previous error
references
🤖 Automatic Updates
Update README.md and docs @cloudpossebot (#214)
what
This is an auto-generated PR that updates the README.md and docs
why
To have most recent changes of README.md and doc from origin templates
Update README.md and docs @cloudpossebot (#213)
what
This is an auto-generated PR that updates the README.md and docs
why
To have most recent changes of README.md and doc from origin templates
Update README.md and docs @cloudpossebot (#209)
what
This is an auto-generated PR that updates the README.md and docs
why
To have most recent changes of README.md and doc from origin templates
v4.0.1
Compare Source
🐛 Bug Fixes
Fix bug in setting dynamic `encryption_configuration` value @LawrenceWarren (#206)
what
s3_replication_rules.destination.encryption_configuration.replica_kms_key_id
set.why
There is a bug when trying to create an S3 bucket, which causes an error that stops the bucket being created
s3_replication_rules.destination.encryption_configuration.replica_kms_key_id
(newer)s3_replication_rules.destination.replica_kms_key_id
(older)This error is easily replicable by trying
compact(concat([try("string", "")], [try("string", "")]))[0]
in the Terraform console, which is a simplified version of the existing logic used aboveThe table below demonstrates the possible values of the existing code - you can see the outputs for value 2, value 3, and value 4 are not lists:
null
"string1"
null
"string1"
null
null
"string2"
"string2"
[]
"string1"
"string2"
"string1"
v4.0.0
Compare Source
Bug fixes and enhancements combined into a single breaking release @aknysh (#202)
Breaking Changes
Terraform version 1.3.0 or later is now required.
policy
input removedThe deprecated
policy
input has been removed. Usesource_policy_documents
instead.Convert from
to
Do not use list modifiers like
sort
,compact
, ordistinct
on the list, or it will trigger anError: Invalid count argument
. The length of the list must be known at plan time.Logging configuration converted to list
To fix #182, the
logging
input has been converted to a list. If you have a logging configuration, simply surround it with brackets.Replication rules brought into alignment with Terraform resource
Previously, the
s3_replication_rules
input had some deviations from the aws_s3_bucket_replication_configuration Terraform resource. Via the use of optional attributes, the input now closely matches the resource while providing backward compatibility, with a few exceptions.source_selection_criteria.sse_kms_encrypted_objects
was documented as an object with one member,enabled
, of typebool
. However, it only worked when set to thestring
"Enabled". It has been replaced with the resource's choice ofstatus
of type String.replication_time
. To enable Metrics without Replication Time Control, you must setreplication_time.status = "Disabled"
.These are not changes, just continued deviations from the resources:
existing_object_replication
cannot be set.token
to allow replication to be enabled on an Object Lock-enabled bucket cannot be set.what
local.source_policy_documents
and deprecated variablepolicy
(because of that, pump the module to a major version)lifecycle_configuration_rules
ands3_replication_rules
from loosely typed objects to fully typed objects with optional attributes.bucket_id
variablewhy
policy
was empty, meaning it had to be removed based on content, which would not be known at plan time if thepolicy
input was being generated.explanation
Any list manipulation functions should not be used in
count
since it can lead to the error:Using the local like this
would not work either if
var.policy
depends on apply-time resources from other TF modules.General rules:
When using
for_each
, the map keys have to be known at plan time (the map values are not required to be know at plan time)When using
count
, the length of the list must be know at plan time, the items inside the list are not. That does not mean that the list must be static with the length known in advance, the list can be dynamic and come from a remote state or data sources which Terraform evaluates first during plan, it just can’t come from other resources (which are only known after apply)When using
count
, no list manipulating functions can be used incount
- it will lead to theThe "count" value depends on resource attributes that cannot be determined until apply
error in some casesv3.1.3
Compare Source
Unfortunately, this change makes
count
unknown at plan time in certain situations. In general, you cannot use the output ofcompact()
incount
.The solution is to stop using the deprecated
policy
input and revert to 3.1.2 or upgrade to 4.0.🚀 Enhancements
Fix `source_policy_documents` combined with `var.policy` being ignored @johncblandii (#201)
what
var.source_policy_documents
tolocal.source_policy_documents
sovar.policy
usage was still supportedwhy
var,source_policy_documents
sovar.policy
being combined withvar.source_policy_documents
intolocal.source_policy_documents
does not providetrue
for the ternary to executereferences
v3.1.2
: Fix Public Bucket CreationCompare Source
What's Changed
New Contributors
Full Changelog: cloudposse/terraform-aws-s3-bucket@3.1.1...3.1.2
v3.1.1
Compare Source
🐛 Bug Fixes
Revert change to Transfer Acceleration from #178 @Nuru (#180)
what
why
v3.1.0
: Support new AWS S3 defaults (ACL prohibited)Compare Source
Note: this version introduced drift detection and correction for Transfer Acceleration. Unfortunately, that change prevents deployment of buckets in regions that do not support Transfer Acceleration. Version 3.1.1 reverts that change so that S3 buckets can be deployed by this module in all regions. It does, however, mean that when
var.transfer_acceleration_enabled
isfalse
, Terraform does not track or revert changes to Transfer Acceleration made outside of this module.Make compatible with new S3 defaults. Add user permissions boundary. @Nuru (#178)
what
aws_s3_bucket_accelerate_configuration
andaws_s3_bucket_versioning
resources even when the feature is disabled, to enable drift detectionwhy
references
Always include `aws_s3_bucket_versioning` resource @mviamari (#172)
what
aws_s3_bucket_versioning
resource to track changes made to bucket versioning configurationwhy
aws_s3_bucket_versioning
, the expectation is that the bucket versioning is disabled/suspend for the bucket. If bucket versioning is turned on outside of terraform (e.g. through the console), the change is not detected by terraform unless theaws_s3_bucket_versioning
resource exists.references
Add support for permission boundaries on replication IAM role @mchristopher (#170)
what
why
references
🤖 Automatic Updates
Update README.md and docs @cloudpossebot (#164)
what
This is an auto-generated PR that updates the README.md and docs
why
To have most recent changes of README.md and doc from origin templates
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.