# salt.states.cloud

## Using states instead of maps to deploy clouds

Added in version 2014.1.0.

Use this minion to spin up a cloud instance:

    my-ec2-instance:
      cloud.profile:
        my-ec2-config

salt.states.cloud.absent(name, onlyif=None, unless=None)

  Ensure that no instances with the specified names exist.

  CAUTION: This is a destructive state, which will search all configured cloud providers for the named instance, and destroy it.

  name

    The name of the instance to destroy

  onlyif

    Do run the state only if is unless succeed

  unless

    Do not run the state at least unless succeed

salt.states.cloud.present(name, cloud_provider, onlyif=None, unless=None, opts=None, **kwargs)

  Spin up a single instance on a cloud provider, using salt-cloud. This state does not take a profile argument; rather, it takes the arguments that would normally be configured as part of the state.

  Note that while this function does take any configuration argument that would normally be used to create an instance, it will not verify the state of any of those arguments on an existing instance. Stateful properties of an instance should be configured using their own individual state (i.e., cloud.tagged, cloud.untagged, etc).

  name

    The name of the instance to create

  cloud_provider

    The name of the cloud provider to use

  onlyif

    Do run the state only if is unless succeed

  unless

    Do not run the state at least unless succeed

  opts

    Any extra opts that need to be used

salt.states.cloud.profile(name, profile, onlyif=None, unless=None, opts=None, **kwargs)

  Create a single instance on a cloud provider, using a salt-cloud profile.

  Note that while profiles used this function do take any configuration argument that would normally be used to create an instance using a profile, this state will not verify the state of any of those arguments on an existing instance. Stateful properties of an instance should be configured using their own individual state (i.e., cloud.tagged, cloud.untagged, etc).

  name

    The name of the instance to create

  profile

    The name of the cloud profile to use

  onlyif

    Do run the state only if is unless succeed

  unless

    Do not run the state at least unless succeed

  kwargs

    Any profile override or addition

  opts

    Any extra opts that need to be used

salt.states.cloud.volume_absent(name, provider=None, **kwargs)

  Check that a block volume exists.

salt.states.cloud.volume_attached(name, server_name, provider=None, **kwargs)

  Check if a block volume is attached.

salt.states.cloud.volume_detached(name, server_name=None, provider=None, **kwargs)

  Check if a block volume is attached.

  Returns True if server or Volume do not exist.

salt.states.cloud.volume_present(name, provider=None, **kwargs)

  Check that a block volume exists.