Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Terraform backend init: settings in -backend-config file are ignored #13552
I faced the following issue with terraform 0.9.2. THere's backend configuration file that contains settings for s3 backend:
Then I'm trying to do terraform init to this backend:
This command produces the following output stating that initialization went well:
But file .terraform/terraform.tfstate isn't created in current directory so backend is not configured. This doesn't look right. Please advise.
I've managed to override this by moving backend.tf to current directory with partial configuration:
After that file .terraform/terraform.tfstate is created and I can do terraform plan and apply now.
Sorry about the confusion here. The file argument to
The "terraform" block and "backend" setting must be part of the current configuration, and init requires that to be in the working directory.