Closed dnk8n closed 11 months ago
Note, how corresponding templates look in this case:
#main.tf
terraform {
backend "s3" {}
}
#backend.tfconf
region = "af-south-1"
bucket = "terraform-state"
key = "terraform.tfstate"
@dnk8n This could be tricky. Running terraform init
andterraform plan
on an S3 backend or other custom backend that exists will mean terraform in most cases will not create a plan to create all new resources from scratch. I had to implement a workaround by over-riding the backend information that is provided in source with a temporary override.tf
that specifies a local backend which was empty to get around this. Any thoughts on how you would envision this working so that we get a fresh plan to create all the resources every time it is run if we allow passing in backend files during init?
Didn't hear back so closing
For example, for projects that abstract secrets from the remote state config we init like this:
terraform init -backend-config=backend.tfconf
From what I can gather, terravision only supports
terraform init
(no args)