Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Execute Azure deployments using azd, Terraform, or Bicep with built-in error recovery.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/recipes/terraform/errors.md
1# Terraform Errors23| Error | Resolution |4|-------|------------|5| State lock error | Wait or `terraform force-unlock <lock-id>` |6| Resource exists | `terraform import <resource>` |7| Backend denied | Check storage permissions |8| Provider error | `terraform init -upgrade` |9| Literal `{{ .Env.* }}` in variable values | Fix syntax in `main.tfvars.json`: use `${VAR}` (e.g., `${AZURE_ENV_NAME}`), not Go-style `{{ .Env.* }}`. See [AZD Errors](../azd/errors.md#unresolved-terraform-template-variables) |10| State cleared on each `azd provision` | azd copies Terraform config to `.azure/<env>/infra/` on each run. Use a remote state backend to persist state across runs |1112## Cleanup (DESTRUCTIVE)1314```bash15terraform destroy -auto-approve16```1718Selective:19```bash20terraform destroy -target=azurerm_container_app.api21```2223⚠️ Permanently deletes resources.24