Working with Templates

Important! The Release Automation perspective is only available to Automic Continuous Delivery Automation users; however, as an Automic Automation user, you can execute the same functionality with the REST API. For more information, see: Infrastructure Manager REST API Reference

Your Terraform templates must be stored in a GIT repository. To display them in CDA, you must connect the repository.

This page includes the following:

Viewing the Templates

  1. Open the Release Automation perspective.
  2. Navigate to Provisioning > Templates.
  3. The Templates list contains all templates available in the connected repositories. See Adding Repositories for details.

    Note: click the Details button in the toolbar to display the providers and variables configured in the template.

Creating a Terraform Template

Terraform exposes a wide range of providers, which enable the creation of resources in different systems. For more information, read the Terraform Provider documentation: https://www.terraform.io/docs/index.html

Useful Links for Template Creation

Check the following sites to learn more about how to configure templates for the major cloud providers:

Provisioning Infrastructure

Note: Currently, Terraform is the only supported backend provider.

  1. From the Templates list, select the template you want to use to provision the infrastructure.
  2. Click the Provision Infrastructure button in the toolbar.
  3. Enter a name for the new infrastructure The name must be unique and may only contain alphanumeric characters, blanks, ., -, _, @, $, #.
  4. Click Next.
  5. (Optional) The infrastructure providers specified in the template are listed on the next page. You can select one more or none of the previously created providers from the list.
  6. Click Next.
  7. (Optional) On the following pages, you can enter the missing credentials of Infrastructure Providers specified in the template.

    If the credentials are left undefined or if no provider is selected, you can overwrite the existing template variables on the last page. In this case, the infrastructure will only be created if Terraform can authenticate with the corresponding providers.

    Note: There are no restrictions to name credential variables in the Terraform templates. Example: "${var.my_aws_access_key}"

  8. Click Next.
  9. (Optional) On the last page, all variables defined in template will be exposed. You can fill out or overwrite the variable value. The infrastructure will only be created if Terraform can authenticate with the Providers used in the Template.
  10. (Optional) click Add Row to provide new or override existing template variables. You can use this option to adjust your configuration or pass values during the execution time which are not stored in the template. The variable name should be the same as in the template.

    Important!

    • You can only overwrite simple types (string, int, boolean). This feature does not support complex variable types:
      • map
      • list
      • set
      • object
      • tuple
      • nested variables
    • The new values will only be used for this template execution. The values stored in the template will not change.
  11. Click Provision to execute the provisioning workflow. You can show the progress in the Provisioning Executions view of the Process Monitoring perspective.

    An Infrastructure Provider object will be created for every supported Infrastructure Provider for which a complete set of credentials was specified.

    Note: The name of the newly created Infrastructure Providers follows the pattern: <template name> - Generic (<provider type defined in the template>). If the name exists, an increasing number suffix is added to Generic : <template name> - Generic1 (<provider type defined in the template>).