Hi, I’m doing a PoC in Rust / Fastly.
I’m wondering if it is possible to define the backends in the fastly,toml files.
I can use it for the local_server, that works fine.
For the ‘real’ deploy when I run ‘fastly compute publish’ it will prompt me for backends, I can enter my backends, and that also works, but after that I can only change them using the web-ui, if I’m not mistaken.
Is it possible to fully define the fastly application in the fastly.toml file, including backends?
fastly.toml doesn’t keep sync with changes you make to your service configuration in production - for that you need an infrastructure-as-code tool like Terraform (for which Fastly has full support). However, you can hint the setup you need in production when you perform your first deploy, using a [setup]
section in fastly.toml. If you perform a fastly compute deploy
and you don’t have a service_id
field in your fastly.toml but you do have a setup
section, the CLI will use that to guide the creation of the service resources like backends.
Howeever, once the service is created and linked to your local env by adding the service_id
property to fastly.toml, the CLI will not manage your service-attached resources for you, and will ignore any [setup]
section in the fastly.toml file.