Hello,
I’m trying to write a terraform spec template deploying azure resource and i have a question :
Is there a way to “read” in the terraform code the values entered in the “group” part of the provisionning process :
In the documentation, preprovionning variables are suggested , bet when i try, it goes :
Error: Invalid index
on local-variables.tf line 15, in locals:
15: subscription_id = local.sub_ids["<%=cloudcode%>"]
├────────────────
│ local.sub_ids is object with 9 attributes
The given key does not identify an element in this collection value.
surprizingly, it works for <%=instance.name>
it really stuck me in my project. Can you help me ?
Error: Invalid index
on local-variables.tf line 15, in locals:
15: subscription_id = local.sub_ids["<%=zone.code%>"]
├────────────────
│ local.sub_ids is object with 9 attributes
The given key does not identify an element in this collection value.
what do you mean by “code set” ? Indeed I wan’t to pass the name that shows up in drop down.
I didn’t find it in the logs, so i tried to do this via customoptions, but nothing works as it should
Yes, everything si set up properly. variables are not properly accessible through terraform (at least in my use case).
For example, “<%=instance.name%>” works, but not “<%=instance.contextName%>”.
“<%=instance%>” replies a string representing a list containing several “key:value”, including contextName.
It’s incomprehensible.