-
-
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
Upgrade to v4 aws provider #131
Conversation
/test all |
/test all |
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.
Change details
-
Error ID Change Path Resource BC_AWS_GENERAL_72 Added /main.tf aws_s3_bucket.default BC_AWS_NETWORKING_52 Added /main.tf aws_s3_bucket.default
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.
Change details
-
Error ID Change Path Resource BC_AWS_NETWORKING_52 Added /main.tf aws_s3_bucket.default BC_AWS_GENERAL_72 Fixed /main.tf module.s3_bucket_replication_target.aws_s3_bucket.default BC_AWS_GENERAL_72 Fixed /main.tf module.s3_bucket_replication_target_extra.aws_s3_bucket.default BC_AWS_GENERAL_72 Fixed /main.tf module.s3_bucket.aws_s3_bucket.default
|
||
dynamic "versioning" { | ||
for_each = var.versioning_enabled ? [true] : [] | ||
count = local.enabled ? 1 : 0 |
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.
Ensure S3 bucket has cross-region replication enabled
Resource: module.s3_bucket_replication_target.aws_s3_bucket.default | ID: BC_AWS_GENERAL_72
How to Fix
resource "aws_s3_bucket" "test" {
...
+ replication_configuration {
+ role = aws_iam_role.replication.arn
+ rules {
+ id = "foobar"
+ prefix = "foo"
+ status = "Enabled"
+
+ destination {
+ bucket = aws_s3_bucket.destination.arn
+ storage_class = "STANDARD"
+ }
+ }
+ }
}
Description
Cross-region replication enables automatic, asynchronous copying of objects across S3 buckets. By default, replication supports copying new S3 objects after it is enabled. It is also possible to use replication to copy existing objects and clone them to a different bucket, but in order to do so, you must contact AWS Support.Dependent Resources
Calculating...
🎉 Fixed by commit 492c82b - Make backwards compatible
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.
Change details
-
Error ID Change Path Resource BC_AWS_GENERAL_72 Fixed /main.tf module.s3_bucket_replication_target_extra.aws_s3_bucket.default BC_AWS_GENERAL_72 Fixed /main.tf module.s3_bucket_replication_target.aws_s3_bucket.default BC_AWS_GENERAL_72 Fixed /main.tf module.s3_bucket.aws_s3_bucket.default
|
||
dynamic "versioning" { | ||
for_each = var.versioning_enabled ? [true] : [] | ||
count = local.enabled ? 1 : 0 |
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.
Ensure S3 bucket has cross-region replication enabled
Resource: module.s3_bucket.aws_s3_bucket.default | ID: BC_AWS_GENERAL_72
How to Fix
resource "aws_s3_bucket" "test" {
...
+ replication_configuration {
+ role = aws_iam_role.replication.arn
+ rules {
+ id = "foobar"
+ prefix = "foo"
+ status = "Enabled"
+
+ destination {
+ bucket = aws_s3_bucket.destination.arn
+ storage_class = "STANDARD"
+ }
+ }
+ }
}
Description
Cross-region replication enables automatic, asynchronous copying of objects across S3 buckets. By default, replication supports copying new S3 objects after it is enabled. It is also possible to use replication to copy existing objects and clone them to a different bucket, but in order to do so, you must contact AWS Support.🎉 Fixed by commit 550e49b - lifecycle filter must be static, abort... must by dynamic.
|
||
dynamic "versioning" { | ||
for_each = var.versioning_enabled ? [true] : [] | ||
count = local.enabled ? 1 : 0 |
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.
Ensure S3 bucket has cross-region replication enabled
Resource: module.s3_bucket_replication_target_extra.aws_s3_bucket.default | ID: BC_AWS_GENERAL_72
How to Fix
resource "aws_s3_bucket" "test" {
...
+ replication_configuration {
+ role = aws_iam_role.replication.arn
+ rules {
+ id = "foobar"
+ prefix = "foo"
+ status = "Enabled"
+
+ destination {
+ bucket = aws_s3_bucket.destination.arn
+ storage_class = "STANDARD"
+ }
+ }
+ }
}
Description
Cross-region replication enables automatic, asynchronous copying of objects across S3 buckets. By default, replication supports copying new S3 objects after it is enabled. It is also possible to use replication to copy existing objects and clone them to a different bucket, but in order to do so, you must contact AWS Support.🎉 Fixed by commit 550e49b - lifecycle filter must be static, abort... must by dynamic.
|
||
dynamic "versioning" { | ||
for_each = var.versioning_enabled ? [true] : [] | ||
count = local.enabled ? 1 : 0 |
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.
Ensure S3 bucket has cross-region replication enabled
Resource: module.s3_bucket_replication_target.aws_s3_bucket.default | ID: BC_AWS_GENERAL_72
How to Fix
resource "aws_s3_bucket" "test" {
...
+ replication_configuration {
+ role = aws_iam_role.replication.arn
+ rules {
+ id = "foobar"
+ prefix = "foo"
+ status = "Enabled"
+
+ destination {
+ bucket = aws_s3_bucket.destination.arn
+ storage_class = "STANDARD"
+ }
+ }
+ }
}
Description
Cross-region replication enables automatic, asynchronous copying of objects across S3 buckets. By default, replication supports copying new S3 objects after it is enabled. It is also possible to use replication to copy existing objects and clone them to a different bucket, but in order to do so, you must contact AWS Support.🎉 Fixed by commit 550e49b - lifecycle filter must be static, abort... must by dynamic.
/test all |
@@ -1,10 +1,10 @@ | |||
terraform { | |||
required_version = ">= 0.13.0" | |||
required_version = ">= 1.0" |
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.
do we have to move this pin to be greater than 1.0? I believe we only need to worry about the aws provider
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.
Change details
-
Error ID Change Path Resource BC_AWS_GENERAL_72 Fixed /main.tf module.s3_bucket_replication_target_extra.aws_s3_bucket.default BC_AWS_GENERAL_72 Fixed /main.tf module.s3_bucket_replication_target.aws_s3_bucket.default BC_AWS_GENERAL_72 Fixed /main.tf module.s3_bucket.aws_s3_bucket.default
/test all |
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.
Change details
-
Error ID Change Path Resource BC_AWS_GENERAL_72 Fixed /main.tf module.s3_bucket_replication_target_extra.aws_s3_bucket.default BC_AWS_GENERAL_72 Fixed /main.tf module.s3_bucket_replication_target.aws_s3_bucket.default BC_AWS_GENERAL_72 Fixed /main.tf module.s3_bucket.aws_s3_bucket.default BC_AWS_GENERAL_72 Fixed /main.tf aws_s3_bucket.default
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.
please see comments regarding bridgecrew
what
policy
in favor ofsource_policy_documents
, closes Fix: Uselist(string)
forvar.policy
#124grants
in favor ofacl_grants
lifecycle_rules
in favor oflifecycle_configuration_rules
website_inputs
is unavailable in the tests.cors_rule_inputs
is available but unused.grant.permissions
into separategrant.permission
blocks ?why
>= 4.2.0
because of relevant bug fixes needed by this modulereferences
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 Bad error (message?) aws_s3_bucket_lifecycle_configuration complains about "Base level prefix" when there is none hashicorp/terraform-provider-aws#23299