Cloud Assembly includes several cloud template settings that adjust how a resource is handled at request time.

Resource flag settings aren't part of the resource object properties schema. For a given resource, you add the flag settings outside of the properties section as shown.

resources:
  Cloud_Machine_1:
    type: Cloud.Machine
    preventDelete: true
    properties:
      image: coreos
      flavor: small
      attachedDisks:
        - source: '${resource.Cloud_Volume_1.id}'
  Cloud_Volume_1:
    type: Cloud.Volume
    properties:
      capacityGb: 1
Resource Flag Description
allocatePerInstance

When set to true, resource allocation can be customized for each machine in a cluster.

The default is false, which allocates resources equally across the cluster, resulting in the same configuration for each machine. In addition, day 2 actions might not be separately possible for individual resources.

Per instance allocation allows count.index to correctly apply the configuration for individual machines. For code examples, see Machine and disk clusters in Cloud Assembly.

createBeforeDelete

Some update actions require that the existing resource be removed and a new one be created. By default, removal is first, which can lead to conditions where the old resource is gone but the new one wasn't created successfully for some reason.

Set this flag to true if you need to make sure that the new resource is successfully created before deleting the previous one.

createTimeout

The Cloud Assembly default timeout for resource allocate, create, and plan requests is 2 hours (2h). In addition, a project administrator can set a custom default timeout for these requests, applicable throughout the project.

This flag lets you override any defaults and set the individual timeout for a specific resource operation. See also updateTimeout and deleteTimeout.

deleteTimeout

The Cloud Assembly default timeout for delete requests is 2 hours (2h). In addition, a project administrator can set a different default timeout for delete requests, applicable throughout the project.

This flag lets you override any defaults and set the individual timeout for a specific resource delete operation. See also updateTimeout and createTimeout.

dependsOn This flag identifies an explicit dependency between resources, where one resource must exist before creating the next one. For more information, see Creating bindings and dependencies between resources in Cloud Assembly.
dependsOnPreviousInstances

When set to true, create cluster resources sequentially. The default is false, which simultaneously creates all resources in a cluster.

For example, sequential creation is useful for database clusters where primary and secondary nodes must be created, but secondary node creation needs configuration settings that connect the node to an existing, primary node.

forceRecreate Not all update actions require that the existing resource be removed and a new one be created. If you want an update to remove the old resource and create a new one, independent of whether the update would have done so by default, set this flag to true.
ignoreChanges

Users of a resource might reconfigure it, changing the resource from its deployed state.

If you want to perform a deployment update but not overwrite the changed resource with the configuration from the cloud template, set this flag to true.

ignorePropertiesOnUpdate

Users of a resource might customize certain properties, and those properties might be reset to their original cloud template state during an update action.

To prevent any properties from being reset by an update action, set this flag to true.

preventDelete If you need to protect a resource from subsequent delete requests, set this flag to true.
recreatePropertiesOnUpdate

Users of a resource might reconfigure properties, changing the resource from its deployed state. During an update, a resource might or might not be recreated. Resources that aren't recreated might remain with properties in changed states.

If you want a resource and its properties to be recreated, independent of whether the update would have done so by default, set this flag to true.

updateTimeout

The Cloud Assembly default timeout for update requests is 2 hours (2h). In addition, a project administrator can set a different default timeout for update requests, applicable throughout the project.

This flag lets you override any defaults and set the individual timeout for a specific resource update operation. See also deleteTimeout and createTimeout.