Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Managing Consul's KV Store

Demo to accompany this blog post on Managing AppSettings in Consul.

To run this script:

You'll need an instance of Consul running locally to use this Terraform script, which you can do by downloading the appropriate version for your OS, and running the following command:

First terminal:

consul agent -dev

Second terminal:

terraform init
terraform apply

You can verify the values are written correctly to the KeyValue store by checking the consul UI (http://localhost:8500). Try creating another config file for a different environment and specifying the environment variable on the CLI:

terraform apply -var environment=prod
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.