-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
…30180) ### Issue # (if applicable) Closes #28585 ### Reason for this change To simplify policy configuration for AppConfig Environments. ### Description of changes add grantReadConfig method to Environment Construct ### Description of how you validated changes Add unit test and integ tests ### 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.
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.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
{ | ||
"Resources": { | ||
"MyApplicationForEnv1F597ED9": { | ||
"Type": "AWS::AppConfig::Application", | ||
"Properties": { | ||
"Name": "AppForEnvTest" | ||
} | ||
}, | ||
"MyEnvironment465E4DEA": { | ||
"Type": "AWS::AppConfig::Environment", | ||
"Properties": { | ||
"ApplicationId": { | ||
"Ref": "MyApplicationForEnv1F597ED9" | ||
}, | ||
"Name": "awsappconfigenvironmentgrant-MyEnvironment-6CC47125" | ||
} | ||
}, | ||
"MyUserDC45028B": { | ||
"Type": "AWS::IAM::User" | ||
}, | ||
"MyUserDefaultPolicy7B897426": { | ||
"Type": "AWS::IAM::Policy", | ||
"Properties": { | ||
"PolicyDocument": { | ||
"Statement": [ | ||
{ | ||
"Action": [ | ||
"appconfig:GetLatestConfiguration", | ||
"appconfig:StartConfigurationSession" | ||
], | ||
"Effect": "Allow", | ||
"Resource": { | ||
"Fn::Join": [ | ||
"", | ||
[ | ||
"arn:", | ||
{ | ||
"Ref": "AWS::Partition" | ||
}, | ||
":appconfig:", | ||
{ | ||
"Ref": "AWS::Region" | ||
}, | ||
":", | ||
{ | ||
"Ref": "AWS::AccountId" | ||
}, | ||
":application/", | ||
{ | ||
"Ref": "MyApplicationForEnv1F597ED9" | ||
}, | ||
"/environment/", | ||
{ | ||
"Ref": "MyEnvironment465E4DEA" | ||
}, | ||
"/configuration/*" | ||
] | ||
] | ||
} | ||
} | ||
], | ||
"Version": "2012-10-17" | ||
}, | ||
"PolicyName": "MyUserDefaultPolicy7B897426", | ||
"Users": [ | ||
{ | ||
"Ref": "MyUserDC45028B" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"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.