deletion_policy: <deletion policy>
- deletion_policy
- Deletion policy for the resource. The allowed deletion policies are
Delete, Retain, and Snapshot. Beginning with
heat_template_version 2016-10-14, the lowercase equivalents
delete, retain, and snapshot are also allowed.
This attribute is optional; the default policy is to delete the physical
resource when deleting a resource from the stack.
http://docs.openstack.org/developer/heat/template_guide/hot_spec.html
Example)
API
..............................:
"floating": {
"type": "OS::Neutron::FloatingIP" ,
"properties": {
"floating_network": "=¿ÜºÎ Á¢±ÙÀÌ °¡´ÉÇÑ ³×Æ®¿öÅ© ¾ÆÀ̵ð" ,
"port_id": {
"get_resource": "port"
}
} ,
"deletion_policy": "Retain"
}
..............................
template
..............
my_vol_1:
type: OS::Cinder::Volume
properties:
size: { get_param: vol_size_1 }
deletion_policy: Retain
...............
1. the deletion policy of stack-resource is DELETE ----ok
2. the deletion policy of stack-resource is SNAPSHOT ----now will failed in resource.validate(), so to add handle_snapshot_delete(*) implementation for stack-resources, to snapshot for nested resources, and then to delete the nested stack and resources
3. the deletion policy of stack-resource is RETAIN ----now the records of nested stack and nested resources are residual in heat, may be we can implementation delete() for stack-resource