Problems with Importing a Template

Solve problems related to importing custom templates into Oracle Cloud Stack.

Not a YAML Document

You can import a template by either uploading a YAML file from your local machine, or providing the location of a YAML file as a URL.

You receive this error message when uploading a template from a URL:

Template import failed! Mapping values are not allowed here.

Be sure that your URL resolves to a file of type YAML, and not HTML. For example, if your template is located in GitHub, enter its Raw URL.

Unsupported Template Parameter Type

You receive this error message when importing a template:

Template cannot use reserved parameter type Type

Some parameter types are supported only in Oracle-defined templates. Oracle does not support these reserved parameter types in custom templates. Modify your template and use a different parameter type. See Using Template Parameters.

Invalid Indentation for a Sequence

You receive an error message similar to the following when you import a template:

Fn::Join - within template expects 2 members in json array. However, a Fn::Join usage was found in template with 4 member(s)

A YAML sequence can be expressed in either of these equivalent formats:

[item1,item2,item3]
- item1
- item2
- item3

You can also nest sequences. For example:

- item1
- item2
- 
  - item3a
  - item3b

Members of same sequence must have the same preceding whitespace. For example, when you use the Join function, you specify a sequence that contains two arguments. The second argument in this sequence is another sequence:

Fn::Join:
  - "\n"
  -
    - This is line 1
    - This is line 2

The following Join example is not valid YAML because the whitespace, or indentation, does not match the expected syntax of the function:

Fn::Join:
  - "\n"
  -
  - This is 
  - not valid

Resource Configuration is not Displayed in the Template Builder

The provisioning API for some Oracle Cloud services supports this older payload format for backwards compatibility:

parameters:
  serviceParameters:
    ...
  componentParameters:
    ...

Oracle Cloud Stack continues to support templates whose resources use this payload format. However, you cannot edit these resources using the Template Builder in the web console because the Template Builder supports only the most recent API payload:

parameters:
  ...
  components:
    ...

If you want to modify a template that uses the deprecated provisioning API payload for a resource, choose from one of the following options:

  • Do not use the Template Builder. Edit the template offline, and then import it into Oracle Cloud Stack. See Editing Offline.

  • From the Template Builder, edit the YAML source for the template, and then convert the resource(s) to the new payload format. See Editing with the Console.