Configure and install AWS CLI and manipulate aws cloudformation command in CircleCI job
Register Access Key, Secret Access Key and default region to CircleCI Environment Variables section.
See details CircleCI Orb Registry - orbss/aws-cloudformation
version: 2.1
orbs:
cloudformation: orbss/aws-cloudformation@0.1.4
workflows:
version: 2
stack-test:
jobs:
- cloudformation/create-stack:
stack-name: my-stack
template-file-path: cloudformation-template-file-path.yaml
extra-arguments: --parameters ParameterKey=InstanceType,ParameterValue=t2.micro ParameterKey=KeyName,ParameterValue=circleci
- some-jobs
- cloudformation/delete-stack:
requires:
- cloudformation/create-stack
stack-name: my-stackversion: 2.1
orbs:
cloudformation: orbss/aws-cloudformation@0.1.4
workflows:
version: 2
stack-test:
jobs:
- cloudformation/create-stack:
stack-name: my-stack
git-url: https://github.com/my-pubic-repo.git
template-file-path: cloudformation-template-file-path.yaml
extra-arguments: --parameters ParameterKey=InstanceType,ParameterValue=t2.micro ParameterKey=KeyName,ParameterValue=circleci
- some-jobs
- cloudformation/delete-stack:
requires:
- cloudformation/create-stack
stack-name: my-stack