Prerequisites
- All environments set up, as in Import the dev tenant into Terraform and Add a new environment.
A changed resource
Runterraform plan in envs/dev. It lists each attribute that differs, as described in Reading a plan. On each line, the left side is what the tenant has now and the right side is what the module has.
webhook_url = var.email_otp_webhook_url, change the value in envs/dev/terraform.tfvars instead. Repeat until the plan reports No changes.
For the flow, it’s easier to regenerate the block than to edit it. Use a scratch folder with just the flow’s import, as in Generate code from the dev tenant.
flow = jsonencode(...) part of the module’s block with the generated one. Keep the depends_on lines. Delete the scratch folder when you’re done. -generate-config-out won’t overwrite an existing generated.tf.
A new resource
The resources the provider supports, and the import ID each one takes, are listed on the Terraform Registry.- Generate it in a scratch folder with one import block, as above.
- Move it into the module, as in Build the module from the generated code.
- Add an
envs/dev/imports.tfwith itsmodule.authsignal.address, as in Import the dev tenant into Terraform. - Plan in dev. Expect
1 to import, 0 to add, 0 to change, 0 to destroy. - Apply, then delete
imports.tfandtfplan.
1 to add.
A removed resource
Delete it in the dev tenant and remove its block from the module. In dev, the plan has nothing left to do. In the other environments, the plan shows it being destroyed.Roll it out
- Commit the module changes and open a pull request.
- After it merges, run the QA pipeline.
- Check the plan lists only the changes you made. Anything else usually means someone changed that tenant by hand. Find out why before approving.
- Approve the apply.
- Repeat for production.

