forked from aws/aws-cdk
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
aws#21441 add Custom Policy Rule Constructs
- Loading branch information
1 parent
62cbcde
commit d05b24b
Showing
11 changed files
with
536 additions
and
10 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
66 changes: 66 additions & 0 deletions
66
...cdk/aws-config/test/custompolicy.integ.snapshot/aws-cdk-config-custompolicy.template.json
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,66 @@ | ||
{ | ||
"Resources": { | ||
"Custom8166710A": { | ||
"Type": "AWS::Config::ConfigRule", | ||
"Properties": { | ||
"Source": { | ||
"CustomPolicyDetails": { | ||
"EnableDebugLogDelivery": true, | ||
"PolicyRuntime": "guard-2.x.x", | ||
"PolicyText": "\n# This rule checks if point in time recovery (PITR) is enabled on active Amazon DynamoDB tables\nlet status = ['ACTIVE']\n\nrule tableisactive when\n resourceType == \"AWS::DynamoDB::Table\" {\n configuration.tableStatus == %status\n}\n\nrule checkcompliance when\n resourceType == \"AWS::DynamoDB::Table\"\n tableisactive {\n let pitr = supplementaryConfiguration.ContinuousBackupsDescription.pointInTimeRecoveryDescription.pointInTimeRecoveryStatus\n %pitr == \"ENABLED\"\n}\n" | ||
}, | ||
"Owner": "CUSTOM_POLICY", | ||
"SourceDetails": [ | ||
{ | ||
"EventSource": "aws.config", | ||
"MessageType": "ConfigurationItemChangeNotification" | ||
}, | ||
{ | ||
"EventSource": "aws.config", | ||
"MessageType": "OversizedConfigurationItemChangeNotification" | ||
} | ||
] | ||
}, | ||
"Scope": { | ||
"ComplianceResourceTypes": [ | ||
"AWS::DynamoDB::Table" | ||
] | ||
} | ||
} | ||
}, | ||
"sampleuser2D3A0B43": { | ||
"Type": "AWS::IAM::User" | ||
}, | ||
"Customlazy5E6C8AE4": { | ||
"Type": "AWS::Config::ConfigRule", | ||
"Properties": { | ||
"Source": { | ||
"CustomPolicyDetails": { | ||
"EnableDebugLogDelivery": true, | ||
"PolicyRuntime": "guard-2.x.x", | ||
"PolicyText": "lazy-create-test" | ||
}, | ||
"Owner": "CUSTOM_POLICY", | ||
"SourceDetails": [ | ||
{ | ||
"EventSource": "aws.config", | ||
"MessageType": "ConfigurationItemChangeNotification" | ||
}, | ||
{ | ||
"EventSource": "aws.config", | ||
"MessageType": "OversizedConfigurationItemChangeNotification" | ||
} | ||
] | ||
}, | ||
"Scope": { | ||
"ComplianceResourceId": { | ||
"Ref": "sampleuser2D3A0B43" | ||
}, | ||
"ComplianceResourceTypes": [ | ||
"AWS::IAM::User" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...integ.snapshot/awscdkconfigcustompolicyintegDefaultTestDeployAssert4EE21D3A.template.json
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 @@ | ||
{} |
1 change: 1 addition & 0 deletions
1
packages/@aws-cdk/aws-config/test/custompolicy.integ.snapshot/cdk.out
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 @@ | ||
{"version":"20.0.0"} |
11 changes: 11 additions & 0 deletions
11
packages/@aws-cdk/aws-config/test/custompolicy.integ.snapshot/integ.json
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,11 @@ | ||
{ | ||
"version": "20.0.0", | ||
"testCases": { | ||
"aws-cdk-config-custompolicy-integ/DefaultTest": { | ||
"stacks": [ | ||
"aws-cdk-config-custompolicy" | ||
], | ||
"assertionStack": "aws-cdk-config-custompolicy-integ/DefaultTest/DeployAssert" | ||
} | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
packages/@aws-cdk/aws-config/test/custompolicy.integ.snapshot/manifest.json
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,37 @@ | ||
{ | ||
"version": "20.0.0", | ||
"artifacts": { | ||
"Tree": { | ||
"type": "cdk:tree", | ||
"properties": { | ||
"file": "tree.json" | ||
} | ||
}, | ||
"aws-cdk-config-custompolicy": { | ||
"type": "aws:cloudformation:stack", | ||
"environment": "aws://unknown-account/unknown-region", | ||
"properties": { | ||
"templateFile": "aws-cdk-config-custompolicy.template.json", | ||
"validateOnSynth": false | ||
}, | ||
"metadata": { | ||
"/aws-cdk-config-custompolicy/Custom/Resource": [ | ||
{ | ||
"type": "aws:cdk:logicalId", | ||
"data": "Custom8166710A" | ||
} | ||
] | ||
}, | ||
"displayName": "aws-cdk-config-custompolicy" | ||
}, | ||
"awscdkconfigcustompolicyintegDefaultTestDeployAssert4EE21D3A": { | ||
"type": "aws:cloudformation:stack", | ||
"environment": "aws://unknown-account/unknown-region", | ||
"properties": { | ||
"templateFile": "awscdkconfigcustompolicyintegDefaultTestDeployAssert4EE21D3A.template.json", | ||
"validateOnSynth": false | ||
}, | ||
"displayName": "aws-cdk-config-custompolicy-integ/DefaultTest/DeployAssert" | ||
} | ||
} | ||
} |
Oops, something went wrong.