Skip to the content.

create-stack.sh

Download

A compact CLI script for provisioning infrastructure with CloudFormation stacks.

Example usage in Bash:

stack_name=test-vpc \
region=eu-west-1 \
profile=ttc-dev \
stack_template=vpc.yml \
s3_bucket_name=ttc-releases-aws-dev \
s3_key=myproject/mystack \
stack_parameters=file://params.json \
./create-stack.sh

JSON parameter file example:

Parameter JSON file should be formatted as per AWS CLI documentation:

[
  {
    "ParameterKey": "Project",
    "ParameterValue": "TestVPC"
  },
  {
    "ParameterKey": "Environment",
    "ParameterValue": "Dev"
  }
]