flyct 0.0.537 was just released and includes two new commands:
fly consul attach will provision a Consul cluster and set a FLY_CONSUL_URL secret in your app.
fly consul detach will remove the FLY_CONSUL_URL secret from your app.
This simplifies the workflow when a Consul cluster is needed. For example, we were able to simplify our LiteFS Lease Configuration instructions with this command.
These new commands replace fly.toml experimental enable_consul field. That field is not supported in apps v2. We recommend using fly consul attach and fly consul detach going forward.
Give these a try and let us know if you run into any issues!
This is backed by the same multitenant consul clusters that back our pg offerings. There are currently no costs for using our multitenant consul clusters.
I don’t foresee a situation where the Consul url will change. That would break a lot of workloads.
You don’t need to change anything. Your setup will continue working as-is.
If you would like to migrate to this newer setup, which is optional:
You can safely urn fly consul attach on your litefs application. That will use the existing Consul url and set the FLY_CONSUL_URL secret for you. Then you would need to update your litefs config to use the secret: