Convox CLI and Terraform
Your Terraform config directory (see Back up your Terraform state) contains these files:
-
vars.json: your rack parameters. For example:{"name": "docspring-enterprise","release": "3.19.6"} -
main.tf: generated by the Convox CLI from the values invars.json.
When you run convox rack params set ..., the Convox CLI:
- Updates
vars.jsonwith the new parameters. - Regenerates
main.tfto use them. - Upgrades all Terraform modules (which updates
.terraform.lock.hcl). - Runs
terraform applyto update your infrastructure with the new configuration. - Updates
terraform.tfstatewith the current state of every managed resource in your AWS account.
When you run convox rack update, the CLI does something very similar:
- Bumps the Convox version in
vars.json. - Regenerates
main.tf. - Installs new Terraform modules.
- Runs
terraform applyand updatesterraform.tfstate.
To run these steps yourself, see Upgrade the rack by hand with Terraform.