Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The HOT documentation says:

deletion_policy: This optional attribute allows for specifying a deletion policy for the resource (one of the values Delete, Retain or Snapshot). Which type of deletion policy is supported depends on the type of the current resource.

So, you can specify a deletion policy like this:

  my_server:
    type: "OS::Nova::Server"
    deletion_policy: Retain
    properties:
      image: fedora
      flavor: m1.small
      key_name: lars
      networks:
        - network: {get_param: network_id}

And this host will be preserved when the stack is deleted.

The documentation on update_policy is less clear, and I'm not certain how that is meant to be used.

The HOT documentation says:

deletion_policy: This optional attribute allows for specifying a deletion policy for the resource (one of the values Delete, Retain or Snapshot). Which type of deletion policy is supported depends on the type of the current resource.

So, you can specify a deletion policy like this:

  my_server:
    type: "OS::Nova::Server"
    deletion_policy: Retain
    properties:
      image: fedora
      flavor: m1.small
      key_name: lars
      networks:
        - network: {get_param: network_id}

And this host will be preserved when the stack is deleted.

The documentation on update_policy is less clear, and I'm not certain how that is meant to be used.

used. According to the docs, update_policy is only supported by certain resource types, and looking at the source I only see evidence for support in the OS::Heat::InstanceGroup and OS::Heat::AutoScalingGroup resources.