Hi,
I'm not able to pass a variable from an included tfvars file to a module. Here is my setup.
variable "aws_account_id" {}
provider "aws" {
allowed_account_ids = ["${var.aws_account_id}"]
}
module "aws" {
source = "./modules/aws"
}
"terraform/vars.tfvars" contains
aws_account_id = "969696969696"
But I get the following error:
terraform plan -var-file=vars.tfvars
Error configuring: 1 error(s) occurred:
* module.aws: missing dependency: var.aws_account_id
What am I missing? Do I have to explicitly pass the variable somehow in the "module" definition?
Tks,
-T