-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
…icies in TableV2 and feature flag (#31513) ### Issue # (if applicable) Closes #30705 ### Reason for this change Resource policies were shared across all replicas in a region. ### Description of changes Changed the logic to only apply resource policy to the local replica region, or to specific replicas only when defined. ### Description of how you validated changes yes ### Checklist - [X] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
{ | ||
"Resources": { | ||
"TableTestV215EEA02B7": { | ||
"Type": "AWS::DynamoDB::GlobalTable", | ||
"Properties": { | ||
"AttributeDefinitions": [ | ||
{ | ||
"AttributeName": "id", | ||
"AttributeType": "S" | ||
} | ||
], | ||
"BillingMode": "PAY_PER_REQUEST", | ||
"KeySchema": [ | ||
{ | ||
"AttributeName": "id", | ||
"KeyType": "HASH" | ||
} | ||
], | ||
"Replicas": [ | ||
{ | ||
"Region": "eu-west-2" | ||
}, | ||
{ | ||
"Region": "eu-west-1", | ||
"ResourcePolicy": { | ||
"PolicyDocument": { | ||
"Statement": [ | ||
{ | ||
"Action": "dynamodb:*", | ||
"Effect": "Allow", | ||
"Principal": { | ||
"AWS": { | ||
"Fn::Join": [ | ||
"", | ||
[ | ||
"arn:aws:iam::", | ||
{ | ||
"Ref": "AWS::AccountId" | ||
}, | ||
":root" | ||
] | ||
] | ||
} | ||
}, | ||
"Resource": "*" | ||
} | ||
], | ||
"Version": "2012-10-17" | ||
} | ||
} | ||
} | ||
], | ||
"StreamSpecification": { | ||
"StreamViewType": "NEW_AND_OLD_IMAGES" | ||
} | ||
}, | ||
"UpdateReplacePolicy": "Delete", | ||
"DeletionPolicy": "Delete" | ||
} | ||
}, | ||
"Parameters": { | ||
"BootstrapVersion": { | ||
"Type": "AWS::SSM::Parameter::Value<String>", | ||
"Default": "/cdk-bootstrap/hnb659fds/version", | ||
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" | ||
} | ||
}, | ||
"Rules": { | ||
"CheckBootstrapVersion": { | ||
"Assertions": [ | ||
{ | ||
"Assert": { | ||
"Fn::Not": [ | ||
{ | ||
"Fn::Contains": [ | ||
[ | ||
"1", | ||
"2", | ||
"3", | ||
"4", | ||
"5" | ||
], | ||
{ | ||
"Ref": "BootstrapVersion" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." | ||
} | ||
] | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.