Sorry, is there a way of making a stage apply automatically say if no “destroy” elements in a Terraform plan?
And if there is a destroy required, make it Manual with Approval? Ideally with a second approver?
I’m aware of prevent_destroy The lifecycle Meta-Argument - Configuration Language | Terraform by HashiCorp though somehow I’d prefer to do with this issue in some sort of workflow.
In the meantime I think I will implement what I require using a jq select on.
terraform show --json tfplan | convert_report > $PLAN_JSON