Skip to content

sleeping-barber/feature-flags-infrastructure

 
 

Repository files navigation

Feature Flags for Infrastructure

Applying Application Feature Toggles to infrastructure

Prerequisites

  • Terraform 0.13+
  • Consul 1.8+
  • Docker
  • CDK for Terraform 0.0.14+
  • Google Cloud Platform account and project
  • Terraform Cloud (for remote backend storage only)

Getting Started

  1. Create a service account key in GCP and save it under key.json.

  2. Set the CLOUDSDK_CORE_PROJECT environment variable to your GCP project.

  3. Create a directory called secrets and add the following files with secrets:

Declarative Languages

Run docker-compose -f docker-compose-tf.yaml up.

This creates a set of toggles in a Consul instance and uses consul-template to output variables.

Update a toggle under cluster/toggles and you'll see consul-template output Terraform plan.

Imperative Languages

Go into the cdk directory and run cdktf get to generate the Typescript classes for the providers.

Warning: CDK for Terraform is in alpha. As a result, you might find some classes may not compile.

Run docker-compose -f docker-compose-cdktf.yaml up.

This creates a set of toggles in a Consul instance and uses consul-template to output variables.

Update a toggle under cluster/toggles and you'll see consul-template output the CDK for Terraform deployment.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 99.9%
  • Other 0.1%