-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(test): dns validation role test stack
- Loading branch information
1 parent
5e227bd
commit 80fdfc3
Showing
3 changed files
with
34 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env node | ||
import 'source-map-support/register'; | ||
import * as cdk from 'aws-cdk-lib'; | ||
import { DnsValidationRoleTestStack } from '../lib/dns-validation-role-test-stack'; | ||
|
||
const app = new cdk.App(); | ||
|
||
const props = { | ||
env: { | ||
account: process.env.CDK_DEFAULT_ACCOUNT, | ||
region: process.env.CDK_DEFAULT_REGION, | ||
}, | ||
}; | ||
|
||
new DnsValidationRoleTestStack(app, 'DnsValidationRoleTest', props); |
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,3 @@ | ||
{ | ||
"AWS_ACCOUNT_ID": "" | ||
} |
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,16 @@ | ||
import * as cdk from 'aws-cdk-lib'; | ||
import * as iam from 'aws-cdk-lib/aws-iam'; | ||
import { Construct } from 'constructs'; | ||
import { DnsValidationRole } from '../../lib/dns-validation-role'; | ||
|
||
export class DnsValidationRoleTestStack extends cdk.Stack { | ||
constructor(scope: Construct, id: string, props?: cdk.StackProps) { | ||
super(scope, id, props); | ||
|
||
new DnsValidationRole(this, 'DnsValidationRole', { | ||
assumedBy: new iam.AccountPrincipal( | ||
scope.node.tryGetContext('AWS_ACCOUNT_ID'), | ||
), | ||
}); | ||
} | ||
} |