Cloud Deployment Framework (CDF) automatically builds secure deployment piplines using AWS CodePipeline and CodeBuild.
Cloud Deployment Framework (CDF)
You will need the following on your local machine:
cdk bootstrap aws://ACCOUNT-NUMBER/REGION-1
git clone https://github.com/Ahmed-AG/cdf.git
config.d.templates
to config.d
config.d/config.json
to set pipelines names, sources, deployment options, and any parameters neededSample config.json file:
{
"pipelines" :[
{
"name" : "Production-Pipeline1",
"provider" : "aws",
"source" : {
"source_type" : "codecommit",
"repo_name" : "cdf-repo1",
"branch" : "main"
},
"deployment" : {
"assume_role" :{
"role": "TODO"
},
"aws_account" : "",
"iam_policy_file" : "config.d/iam-policy.json",
"region" : "us-east-1",
"type" : "cfn",
"parameters" : "VpcCIDR=10.0.0.0/16 Region=$REGION",
"capabilities" : "CAPABILITY_IAM CAPABILITY_NAMED_IAM",
"deployment_file" : "main.yaml",
"checks" : [
"general_all",
"cfn_nag",
"checkov"
]
}
}
]
}
Edit the IAM policy file used by the pipeline to deploy resources config.d/iam-policy.json
Note: This file is referenced in config.d/config.json
. It is recomended to have different policies for each pipeline
cdk deploy --all