Ask Your Question

Revision history [back]

The problem here is actually on the client side. You can get the file name from a parameter, but the client isn't smart enough to automatically upload it for you like it usually does.

Heat won't allow you to reference local files on the Heat server, and the Heat server can't access local files on the client, for hopefully obvious reasons. It would work if you used an http/https URL that is accessible to the server (e.g. you could upload the template file to Swift).

A better way is probably to map the file in the environment using a custom type name, instead of in the parameters. e.g. your template would be something like:

      type: OS::Heat::ResourceGroup
        count: 5
           type: My::Custom::Type

and you'd pass an environment file like:

  My::Custom::Type: file.yaml

Then the client will know that it needs to upload the file for you, and you can switch to a different file by passing a different environment.

Finally, If you're using the Rocky release (or later) you can upload all of the files to a Swift container, and instantiate the main template from there. Heat will download all of the files in the container, so you can select which one you want with a parameter and it will always be available.