Skip to content

Commit

Permalink
Merge branch 'main' into fix(apigateway)/restapi-url-property-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Dec 5, 2023
2 parents 2599828 + 766ff8b commit bad5b43
Show file tree
Hide file tree
Showing 28 changed files with 800 additions and 66 deletions.

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
Expand Up @@ -25,6 +25,9 @@
"OneManagedPolicy77F9185F": {
"Type": "AWS::IAM::ManagedPolicy",
"Properties": {
"Description": "My Policy",
"ManagedPolicyName": "Default",
"Path": "/some/path/",
"PolicyDocument": {
"Statement": [
{
Expand All @@ -45,9 +48,11 @@
],
"Version": "2012-10-17"
},
"Description": "My Policy",
"ManagedPolicyName": "Default",
"Path": "/some/path/",
"Roles": [
{
"Ref": "Role1ABCC5F0"
}
],
"Users": [
{
"Ref": "MyUserDC45028B"
Expand All @@ -58,6 +63,8 @@
"TwoManagedPolicy7E701864": {
"Type": "AWS::IAM::ManagedPolicy",
"Properties": {
"Description": "",
"Path": "/",
"PolicyDocument": {
"Statement": [
{
Expand All @@ -77,9 +84,7 @@
}
],
"Version": "2012-10-17"
},
"Description": "",
"Path": "/"
}
}
},
"Role1ABCC5F0": {
Expand Down

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.

Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ const role = new Role(stack, 'Role', { assumedBy: new AccountRootPrincipal() });
role.grantAssumeRole(policy.grantPrincipal);
Grant.addToPrincipal({ actions: ['iam:*'], resourceArns: [role.roleArn], grantee: policy2 });

policy.attachToRole(role);

// Idempotent with imported roles, see https://github.com/aws/aws-cdk/issues/28101
const importedRole = Role.fromRoleArn(stack, 'ImportedRole', role.roleArn);
policy.attachToRole(importedRole);

new IntegTest(app, 'ManagedPolicyInteg', {
testCases: [stack],
});
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ const policy = new Policy(stack, 'HelloPolicy', { policyName: 'Default' });
policy.addStatements(new PolicyStatement({ actions: ['ec2:*'], resources: ['*'] }));
policy.attachToRole(role);

// Idempotent with imported roles, see https://github.com/aws/aws-cdk/issues/28101
const importedRole = Role.fromRoleArn(stack, 'TestImportedRole', role.roleArn);
policy.attachToRole(importedRole);

// Role with an external ID
new Role(stack, 'TestRole2', {
assumedBy: new AccountRootPrincipal(),
Expand Down
2 changes: 2 additions & 0 deletions packages/@aws-cdk/aws-appconfig-alpha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,11 +356,13 @@ Basic environment with monitors:
```ts
declare const application: appconfig.Application;
declare const alarm: cloudwatch.Alarm;
declare const compositeAlarm: cloudwatch.CompositeAlarm;

new appconfig.Environment(this, 'MyEnvironment', {
application,
monitors: [
appconfig.Monitor.fromCloudWatchAlarm(alarm),
appconfig.Monitor.fromCloudWatchAlarm(compositeAlarm),
],
});
```
Expand Down
Loading

0 comments on commit bad5b43

Please sign in to comment.