Editing a template

You can search for a template from the library page.

  1. In the navigation bar, click Library > Terraform templates. The template library is displayed.
  2. In the template library page, you can use the following filters to search for a template:

    • Enter the name of the template in the Search templates filter.
    • Select the Cloud provider to view the list of all of the templates under a particular provider.

      The templates are categorized according to the provider type and template type. The templates you create are available in the My templates category. If you select Other option when you create the template or the template does not fall under any of the mentioned categories, then you can find your template under Other category. The templates that are provided by Managed services for import functionality are available in the Import existing category. The All templates includes all the templates irrespective of the categorization.

    • Click Name or Created timestamp header to sort the template records.
    • Use show filter icon next to the search text to filter records based on the cloud provider or namespace. The namespace option has Show Globally accessible option, which refers to those templates that are globally accessible across all namespaces and are not assigned to any specific namespace.
    • You can select a namespace from the All namespaces drop-down list. The list of templates in the page changes based on the selected namespace. You can also select "All namespaces" to see all records for which you have access.
    • Use pagination to decide the number of records that must fit in a page. Use the > or < to go through the next or previous set of records.

    For steps to import a template from Git repository, see Importing a template.

  3. Select Edit in the template overflow menu. Alternatively, you can click View option in the overflow menu of a template or click the template record to open it. In the Overview page, click Edit.

    Note: From the template Overview page, you can Duplicate or Delete a template.

  4. In the Template metadata tab, you do the following tasks:

    • Change the name, short and long description of the template.
    • Add, edit, or delete a feature.
    • Change the icon of the template.
    • Change the Cloud provider.
    • You cannot change the value of the namespace. However, you can create a duplicate of this template and associate it with a new namespace. To create a duplicate from this page, you can click the duplicate link in the Assign access section. Alternatively, you can also select Duplicate from the overflow menu. For more information about the procedure to duplicate a template, see Duplicating a template.
  5. In the Manage template tab, you can edit the following details:

    • In the Edit version tab, you can edit the following details:

      • Select the version from the Version drop-down list or click View source of a version to view the source in read-only mode. If you had used the artifactory repository to import a compressed template file, then you can view the default version and the URL that was used to import the template and also the parameters if present.
      • Click Update parameters to update the parameters. In the Update Parameters page, you can import from a file or copy paste the details in the editor. Additionally, you can import the parameters from the original Template source. You also have an option to edit the parameters by clicking each parameter individually if the source file does not have the camvariable.json defined already.
    • In the Manage versions page, you can perform the following activities:

      • You can view a table with all version details in it.
      • Click Add version to add a new version of this template. In the Add version page, enter the following details:
        • Enter version number in the Display name.
        • Enter a branch or tag value in Tag/Branch name.
        • If you want to include a compressed file, enter the URL pointing to ".zip" file to add a new version
      • From the Actions over flow menu of an existing version, you can edit, disable, set as default, or delete a version.

        • If you select the edit option, you can modify the version display name but not the URL.

        Note: The template version follows major.minor.patch convention, where:

        • patch refers to bug fixes
        • major refers to significant changes
        • minor refers to new features added but existing functionality remains broadly compatible

          When you upgrade to a new instance through plan/apply for major changes, a compatibility warning is displayed in the plan user interface. For example, when you move from 1.1.0 to 2.1.0, the following warning is displayed:

          "Trying to upgrade to a version that will break compatibility may result in deployment errors. It is recommended to clean up the old instance first and then deploy the new version."

          In this example, version 2 breaks compatibility with version 1, which causes plan/apply to fail. When you upgrade to a new instance for minor or patch changes, then no warning message is displayed because backward compatibility is preserved. For example:

          • 1.0 to 1.1 or 3.0
          • 1.1.0 to 1.2.0 or 1.1.1

          You can ignore this warning and still proceed with the upgrade. The warning is displayed only if the version starts with a number followed by dot.

  6. Click Save to save the changes you made to the template.

  7. From the overflow menu of the template, you can duplicate, deploy, and delete a template.