This repo maintains the examples from the Dynamic Config blog post which will be published soon.
This code example leverages Orbs and other tools which require you to have accounts and api tokens for those tools. You need to have accounts in the following services to use this example:
- Create a DigitalOcean Account
- Generate a DigitalOcean API Token
- Optional: Install the DigitalOcean doctl command line tool locally
- Install Terraform CLI locally
- Create a Terraform Cloud Account
- Create a new Terraform Cloud organization
- Create 2 new Terraform Cloud workspaces named
iac_do
anddeploy-iac-do
and choose the"No VCS connection"
option - Enable local execution mode in both newly created workspaces
- Create a new Terraform API token
- Snyk account API Token
- Docker Hub account and create an API token
- Sign-up for a CircleCI account
Create these environment variables your your pipeline project with the appropriate values you captured in the Prerequisites section and do NOT prefix them with a $
character:
DIGITAL_OCEAN_TOKEN
DOCKER_LOGIN
DOCKER_PASSWORD
SNYK_TOKEN
TERRAFORM_TOKEN
.circleci/
directory holds the config.yml file which implements Setup Workflowsterraform/
directory hold the Terraform codescripts/
directory holds the scripts that generate config.yml files