-
-
Notifications
You must be signed in to change notification settings - Fork 840
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
Bug fixes and enhancements combined into a single breaking release #202
Conversation
/terratest |
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.
Bridgecrew has found errors in this PR ⬇️
/terratest |
/terratest |
/terratest |
/terratest |
concat
function from local.source_policy_documents
local.source_policy_documents
and deprecated variable policy
/terratest |
/terratest |
/terratest |
/terratest |
local.source_policy_documents
and deprecated variable policy
/terratest |
})) | ||
access_control_translation = optional(object({ | ||
owner = string | ||
})) |
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.
Looks like this was enabled in this PR
prefix = optional(string) | ||
status = optional(string, "Enabled") | ||
# delete_marker_replication { status } had been flattened for convenience | ||
delete_marker_replication_status = optional(string, "Disabled") |
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.
Here we go
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 cases