Hi,
is it possible to use dynamic attribute name ?
like:
data.terraform_remote_state.${var.statefilename}.outputs.vpc.id
Best,
Pawel
Hi,
is it possible to use dynamic attribute name ?
like:
data.terraform_remote_state.${var.statefilename}.outputs.vpc.id
Best,
Pawel
Maybe for somebody will be helpfull:
I make foreach for data āterraform_remote_stateā and get dynamic name from map like:
pscloud_vpc_attachments = {
for k, v in var.test_map :
k => { name = k, vpc_id = data.terraform_remote_state.rs[v.datafile].outputs.vpc.id, subnets_ids = [ for s in v.subnets : data.terraform_remote_state.rs[v.datafile].outputs.subnets_private[s].id ] }
cheers