Feature request: Support execution of Terraform plan
When performing azd provision --preview with Terraform as the infrastructure provider (via an Azure DevOps pipeline), I can see that the Terraform plan file is saved, per this entry in the log:
Plan: 0 to add, 1 to change, 0 to destroy.
─────────────────────────────────────────────────────────────────────────────
Saved the plan to: /agent/_work/1/s/.azure/<env>/infra/main.tfplan
To perform exactly these actions, run the following command to apply:
terraform apply "/agent/_work/1/s/.azure/<env>/infra/main.tfplan"
It would be good if we could then use the plan when performing azd provision, as without being able to do that there's a risk some other change is introduced when you perform azd provision (i.e terraform apply) because someone else could have merged some changes to the Terraform code in the interim.
I would imagine it working like this:
azd provision --tfplan <path to plan>
This would then execute Terraform like this
terraform apply <path to plan>
This is a good feedback @markwragg , thank you. There's no plans in the near future for Terraform, but we'll review with the team. Thank you for your patient.