Hi All,
I have a root module from where I am calling my submodules - vpc module (which creates VPC, subnets etc) and my ec2 module.
When I run the vpc module first and then uncomment my ec2 module and call it, all works fine.
But if I call them together, I get this error - unsupported attribute.
I am using remote state data source to pass outputs of vpc module to my ec2 module.
data “terraform_remote_state” “myvpc” {
backend = “local”
config = {
path = "../SIT/terraform.tfstate"
}
}
+++++++++++++++++++++++++++++++++++
output “sn1_subnet_id” {
value = module.my_vpc.sn1_subnet_id
}
output “sn3_subnet_id” {
value = module.my_vpc.sn3_subnet_id
}
output “sn2_subnet_id” {
value = module.my_vpc.sn2_subnet_id
}
output “sn4_subnet_id” {
value = module.my_vpc.sn4_subnet_id
}
output “sn5_subnet_id” {
value = module.my_vpc.sn5_subnet_id
}
output “sn6_subnet_id” {
value = module.my_vpc.sn6_subnet_id
}
Can someone please suggest what shall I use along side remote state data source for unprovisioned resources, so that I may not get the unsupported attribute error.