Creating a Private Template

Create a private template in Resource Manager.

You can share private templates with anyone in your tenancy who has sufficient permissions.

For instructions to create a stack from your private template, see Creating a Stack from a Template.

    1. On the Private templates list page, select Create private template. If you need help finding the list page or the private template, see Listing Private Templates.
    2. In the Create private template panel, select the option corresponding to the location of the Terraform configuration (Folder or .Zip file) and then perform one of the following actions to upload the configuration:
      • Drag the folder or zip file onto the panel.
      • Select Browse and navigate to the location of the folder or zip file.
    3. Enter a name and optional description for the private template. Avoid entering confidential information.
    4. (Optional) Enter a detailed description of the private template.
      The detailed description is displayed in the Browse templates panel when the template is expanded.
    5. Select Show advanced options.
    6. Select the compartment that you want to store the new private template in.
      A compartment from the list scope is set by default.
    7. (Optional) Upload an icon to use with the template by performing one of the following actions:
      • Drag the icon file onto the panel.
      • Select Browse and navigate to the location of the icon file.
      The icon is displayed in the Browse templates panel when the template is expanded. A template icon file has the following requirements: PNG format, 50 KB maximum, 110 x 110 pixels.
    8. (Optional) Select Show advanced options and assign tags to the private template.
      • Tag namespace: To add a defined tag, select an existing namespace. To add a free-from tag, leave the value blank.
      • Tag key: To add a defined tag, select an existing tag key. To add a free-form tag, type the key name that you want.
      • Tag value: Type the tag value that you want.
      • Add tag: Click to add another tag.
    9. Select Create.
  • Use the oci resource-manager template create command and required parameters to create a private template:

    oci resource-manager template create --compartment-id <compartment_OCID> --config-source <text> --description <template_description> --display-name <template_name>

    Example request:

    oci resource-manager template create --compartment-id ocid1.tenancy.oc1..uniqueid --config-source my-template.zip --description "Template to deploy ABC infrastructure" --display-name "ABC Template"

    For a complete list of parameters and values for CLI commands, see the Command Line Reference for Resource Manager.

  • Run the CreateTemplate operation to create a private template.