Associate the Terraform environment variable with the datacenter resource block

  • Release version: Xanadu
  • Updated August 1, 2024
  • 1 minute to read
  • Associate the Terraform environment variable with the Cloud Provisioning and Governance datacenter resource block. After associating the environment variable, you can use it to pass custom inputs parameters during resource deployment through Terraform Enterprise.

    Before you begin

    Role required: admin

    About this task

    To set the Terraform environment variable conditionally, use a scripted expression. For more information, see Using expressions in Cloud Provisioning and Governance.

    Procedure

    1. Navigate to All > Cloud Provisioning and Governance > Cloud Admin Portal.
      The Cloud Admin Portal opens in a new browser tab.
    2. Select Design > Resource Blocks.
    3. Select the appropriate logical datacenter card.
    4. Set the logical datacenter resource block to the Draft state.
    5. Select the Operations tab.
    6. From the Interface drop-down list, select Terraform Orchestration Interface.
    7. Select Steps > Flow.Subflow.TFEProvision.
    8. Set the terraform_variables text box to the environment variable key value pair.
      For example: {"USER_AGENT_PROVIDER_NAME":"AgentValue"}
    9. Set the logical datacenter resource block to the Published state.