Associating a Terraform Module to a Space

  • 23 November 2021
  • 0 replies

This article relates to blueprints defined in Terraform. For YAML blueprints, see Steps to Developing a Blueprint.

The Assets page enables you to associate specific Terraform modules to different spaces and define their dependencies as well as behavior.


To associate a Terraform module to Torque:

  1. Open the Administration page and click the Assets tab.
  2. In the Terraform Modules tab, click + Add Module.
    The Add Terraform module form is displayed.
  3. Fill in the details as follows (Mandatory parameters are indicated with *):
    • General:
      • Name *: Specify the module’s name.
      • Description: Provide an informative description for the module.
    • Module Configuration:
      • Repository *: Select the blueprint’s GitHub or Bitbucket repository.
      • Root Path: The path for the folder where the module’s main file is located. Leave empty if the module is located directly in the root of the repository.
      • Terraform Version *: Select the terraform version that will be installed to run this module.
      • Enable Auto Tagging: Set to Yes to allow Torque to automatically tag the Terraform resources.
      • Resource to exclude from tagging: Specify the names of the Terraform resources you don’t want Torque to auto-tag.
    • Inputs:

      • Name *: Specify the input’s name (case-insensitive).

      • Value *: Specify the input’s value (string by default).

      • HCL: Select the checkbox to define the input value in HCL format. In HCL format, specify the value as a single line. Supported value types: bool, int, map, list, etc. If the checkbox is not selected, the value will be treated as a string.

      • Description: Provide an informative description for the output.

      • Display Style: Select the input value’s display style:

        • Normal: Displayed in plain text
        • Masked: Displayed as bullets
      • Optional: Select the checkbox to indicate that the input is optional.

      • Overridable: Select the checkbox to allow the input value to be overridden in the space level or at runtime.

    • Outputs:

      • Name *: Specify the output’s name (case-insensitive).

      • Description: Provide an informative description for the input.

      • Display Style: Select the output value’s display style:

        • Normal: (Default) Displayed in plain text
        • Masked: Displayed as bullets
        • Hyperlink: Display the value as a link and also include under the Quick Links section of the sandbox page’s General tab.
    • Compute Services:

      • Cloud Account *: Select the cloud accounts / Kubernetes compute services where the module could run on. Leave empty if the module you want to run does not require any automatic cloud permissions.

        • Cloud account/compute service must be associated to the Terraform module’s space.
        • The sidecar will also be launched on this cloud.
        • Each cloud account/compute service must have permissions for the TF module (AWS: Role ARN which is allowed to run this TF module, Azure: managed_identity_id).
    • Allowed Spaces:

      • Allow All Spaces: Set to Yes to associate the Terraform module with all spaces in Torque.

      • Allowed Spaces: Select specific spaces to associate the Terraform module to.

  4. Click Save.
    The Terraform module is associated with the space.
  5. Next, Create a New Blueprint from a Terraform Module.

This topic has been closed for comments