- Community Home
- >
- Software
- >
- HPE Morpheus Software
- >
- HPE Morpheus Enterprise
- >
- Pre-provision variable
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2023 07:33 AM
09-27-2023 07:33 AM
Pre-provision variable
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 ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2023 08:57 AM
09-28-2023 08:57 AM
Re: Pre-provision variable
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2023 11:38 AM
09-27-2023 11:38 AM
Re: Pre-provision variable
Do you have a code set on that cloud or are you just trying to pass the name that shows up in the drop down?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2023 02:51 PM
09-27-2023 02:51 PM
Re: Pre-provision variable
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2023 08:25 AM
09-27-2023 08:25 AM
Re: Pre-provision variable
Have you tried using <%=zone.code%>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2023 06:55 AM
09-28-2023 06:55 AM
Re: Pre-provision variable
I believe he is referring to the code that you can set for the cloud to be called via the API, etc.
Infrastructure > Clouds > Edit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2023 09:53 AM
09-27-2023 09:53 AM
Re: Pre-provision variable
yes i did
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.