from terrascript import terraform, backend, dump
consul_backend = backend("consul",
address='demo.consul.io',
path='getting-started-RANDOMSTRING',
lock=False)
terraform(backend=consul_backend)
print(dump())
The JSON configuration will tell Terraform to use the Consul key-value store as backend.
{
"terraform": {
"backend": {
"consul": {
"address": "demo.consul.io",
"lock": false,
"path": "getting-started-RANDOMSTRING"
}
}
}
}