Closed pessoa closed 5 years ago
hm. i’ve seen this too, and have worked around it with something like this:
data “aws_subnet_ids” “es” {
vpc_id = “${module.vpc.vpc_id}”
tags {
es = “True”
}
}
iirc that will eventually produce a working configuration, provided you put the appropriate tag on the subnets in the other module.
If we make this module (in VPC mode) use subnet_ids:
from another module (eg. https://registry.terraform.io/modules/terraform-aws-modules/vpc/aws) it will fail with:
I believe this is caused because there's no way to tell terraform about module dependencies: https://github.com/hashicorp/terraform/issues/10462
So far I have not been able to workaround it. Not even by using something like https://github.com/hashicorp/terraform/issues/1178#issuecomment-105613781