Run Consul-Terraform-Sync
Move the
consul-terraform-sync
binary to a location available on yourPATH
.$ mv ~/Downloads/consul-terraform-sync /usr/local/bin/consul-terraform-sync
$ mv ~/Downloads/consul-terraform-sync /usr/local/bin/consul-terraform-sync
Create the config.hcl file, all the options are available here.
Run Consul-Terraform-Sync (CTS).
$ consul-terraform-sync start -config-file <config.hcl>
$ consul-terraform-sync start -config-file <config.hcl>
Check status of tasks. Replace port number if configured in Step 2. See additional API endpoints here
$ curl localhost:8558/status/tasks
$ curl localhost:8558/status/tasks
Other Run modes
CTS allows you to inspect your configuration before applying any change and to run in once mode, meaning that you can verify the changes are correctly applied in a test run before running it in unsupervised daemon mode.
To learn more on these options check the Consul-Terraform-Sync Run Modes and Status Inspection tutorial.