v0.48.0 (Action Needed) Update to AWS provider v4.x
Pre-release
Pre-release
This release is an early release in order to unblock people who are blocked because v0.47.0 does not work with AWS Provider v4. However, the newly introduced lifecycle_configuration_rules
will be replaced in the next release with a more flexible (and completely incompatible) structure that supports the evolving variety of storage options AWS provides. For this reason, we recommend users continue to use the Deprecated lifecycle_rules
input for now, and anticipate it will be supported for a considerable length of time going forward.
See Upgrading to v0.48.0 and AWS provider version 4.x for details about actions you will need to take when updating to this version.
🚀 Enhancements
Upgrade to v4 aws provider @nitrocode (#131)
what
- Upgrade to v4 aws provider
- Deprecated
policy
in favor ofsource_policy_documents
, closes #124 - Deprecated
grants
in favor ofacl_grants
- Deprecated
lifecycle_rules
in favor oflifecycle_configuration_rules
- All tests pass
- Current tests pass
- Tests do not check website inputs. The
website_inputs
is unavailable in the tests. - Tests do not check cors. The
cors_rule_inputs
is available but unused.
- Backwards compatible - Is it possible to make it backwards compatible ?
- Generate the lifecycle rule ids ?
- Translate the
grant.permissions
into separategrant.permission
blocks ?
- Migration document in this repo's Wiki
why
- Current version incompatible with AWS provider v4.x
│ Error: Unsupported attribute
│
│ on .terraform-mdev/modules/s3_bucket/main.tf line 166, in resource "aws_s3_bucket" "default":
│ 166: for_each = local.s3_replication_rules == null ? [] : local.s3_replication_rules
│
│ This object does not have an attribute named "s3_replication_rules".
- One upgraded to version 4.x, module no longer works with AWS provider 3.x
- Pin to
>= 4.2.0
because of relevant bug fixes needed by this module
references
- Closes #132
- https://registry.terraform.io/providers/hashicorp/aws/latest/docs/guides/version-4-upgrade
- https://github.com/hashicorp/terraform-provider-aws/releases/tag/v4.0.0
- Versions
- Some of the individual resources
notes
grants
is now deprecated, but still supported. New input replacing it isacl_grants
. The only difference is thatgrants
takes a list ofpermissions
andacl_grants
takes a singlepermission
. The only reason we are makinggrants
deprecated is so that our inputs track the AWS resource inputs.lifecycle_rules
is now deprecated but still supported, replaced withlifecycle_configuration_rules
, which is identical except thatlifecycle_configuration_rules
has anid
for each rule, which is now required by the AWS resource (doc). This module supplies anid
forlifecycle_rules
.aws_s3_bucket_lifecycle_configuration
requires a staticrules.filter
element due to hashicorp/terraform-provider-aws#23299