-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(aws-iam): configure ExternalId for Role (#1359)
Supply the `externalId` prop to add the appropriate `{ StringEquals: { "sts:ExternalId": "...the id..." }}` to a Role's `AssumeRolePolicyDocument`. Fixes #235.
- Loading branch information
1 parent
d20938c
commit 3d200c9
Showing
6 changed files
with
120 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import cdk = require('@aws-cdk/cdk'); | ||
import iam = require('../lib'); | ||
|
||
export class ExampleConstruct extends cdk.Construct { | ||
constructor(parent: cdk.Construct, id: string) { | ||
super(parent, id); | ||
|
||
/// !show | ||
const role = new iam.Role(this, 'MyRole', { | ||
assumedBy: new iam.AccountPrincipal('123456789012'), | ||
externalId: 'SUPPLY-ME', | ||
}); | ||
/// !hide | ||
|
||
Array.isArray(role); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters