Open hashibot opened 7 years ago
I'm also having the same issue.
main.tf
module "streams" {
source = "./streams"
}
streams/main.tf
data "terraform_remote_state" "streams" {
backend = "s3"
config {
bucket = "${var.aws_bucket}"
key = "streams/master-stack.tfstate"
region = "${var.aws_region}"
}
}
streams/env_vars.tf
variable "aws_region" {}
variable "aws_bucket" {}
and then i use ENV vars TF_VAR_aws_bucket
and TF_VAR_aws_region
and i get same errors as above. Is there any work around for this now?
This issue was originally opened by @ChienHuey as hashicorp/terraform#16101. It was migrated here as a result of the provider split. The original body of the issue is below.
Terraform Version
v0.10.2
Terraform Configuration Files
Debug Output
Runs successfully.
when running
[output] https://gist.github.com/ChienHuey/2eaa7839f797bd647a30a5d4575517ff
Crash Output
If the console output indicates that Terraform crashed, please share a link to a GitHub Gist containing the output of the
crash.log
file.Expected Behavior
What should have happened?
Terraform should have initialized without issue.
Actual Behavior
What actually happened?
Terraform failed to initialize and complained the interpolations are not supported in the global module
Steps to Reproduce
terraform get --update=true
terraform init -backend=true -backend-config="key=my_bucket_key" -backend-config="region=us-east-1" -backend-config="bucket=my_bucket"
Important Factoids
What's strange is that when I go into the global module and remove the interpolations. Replace them with hard-coded values for bucket, key and region. Re-run. Terraform initializes without issue. Even though there are interpolations for the data terraform_remote_state in the k8s module.
References