To get up and running, first make sure you have the CDK installed.
Once installed, create a python virtual environment, and install the required depencies:
virtualenv .env
source .env/bin/activate
pip install -r requirements.txt
Now you should edit the cdk.json
file for your environment. The following variables should be set accordingly:
"external_tag_key": "ExternalALB",
"external_tag_value": "true",
"internal_tag_key": "InternalALB",
"internal_tag_value": "true",
"exception_tag_key": "WAFException",
"exception_tag_value": "false",
"enforce_compliance": "true"
Note: You may want to set enforce_compliance
to false
to start. When the rule is run with this set to false
, it will report COMPLIANT and NON-COMPLIANT resources in the AWS Config interface. If you'd like to have the rule automatically set the tags, set this to true
.
You can now deploy the stack:
cdk deploy
cdk ls
list all stacks in the appcdk synth
emits the synthesized CloudFormation templatecdk deploy
deploy this stack to your default AWS account/regioncdk diff
compare deployed stack with current statecdk docs
open CDK documentation