-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Open
Labels
Description
Current Terraform Version
0.13.2
Use-cases
We deploy IaC via Azure DevOps pipelines. Each of our deploys is based off a pull request number. Both the infrastructure and terraform statefiles have the PR number in the name, eg a terraform statefile would be named:
$(project).$(PRnumber).terraform.tfstate
The infrastructure is destroyed once the PR is complete. However terraform leave a 156byte statefile in place on the Azure backend blob storage.
Could terraform be altered to delete the statefile if it is empty (ie if it has no infrastructure defined in it).
Currently we end up with hundreds of tiny 156byte statefiles that we have to delete outside of terraform.
Thanks,
Scott
andreykaipov, alanyee, dvdvorle, phatcher, floge07 and 18 more