Properties

BlockDeviceMappingsV2

  • Block device mappings to attach to instance.
  • Required property.
  • Type: List
  • List contents:

    • Optional property.
    • Type: Map
    • Map properties:

      • source_type

        • Describes the volume source type for the volume.
        • Required property.
        • Allowed values: image, volume, snapshot
        • Type: String
      • destination_type

        • Describes where the volume comes from.
        • Required property.
        • Allowed values: volume
        • Type: String
      • boot_index

        • Indicates a number designating the boot order of the device.

          Specifies continuous values from 0. For the boot disk, "0" is specified.

        • Required property.
        • Type: String
      • volume_size

        • Size of the volume (GB).

          This item must be specified when "image" is specified for source_type. Specify a value equal to or higher than the min_disk parameter of the image to be used. If the min_disk parameter of the image to be used has not been specified or is "0", check the minimum size with the image provider and specify the value accordingly.

          If "volume" was specified for source_type, this item will not be enabled even if a value is specified, and the volume size will not change.

          If "snapshot" was specified for source_type, and this item is omitted, the volume size of the snapshot collection source will be used.

        • Optional property.
        • Type: String
      • uuid

        • uuid of the resource specified for source_type.
        • Required property.
        • Type: String
      • delete_on_termination

        • Indicate whether the volume should be deleted when the instance is terminated.

          When "True" is specified, the volume that was created during scale-out and stack creation will be deleted during scale-in and during stack deletion.

          When "False" is specified, the volume that was created during scale-out and stack creation will not be deleted during scale-in and during stack deletion. If you want to retain the volume content even after an instance is deleted, specify "False".

          The volume where snapshots are collected will not be deleted even if "True" is specified.

        • Optional property, defaults to "True".
        • Type: Boolean
      • device_name

        • A device name where the volume will be attached in the system at /dev/device_name.e.g. vdb

          Specify in the "/dev/vdx" format. "/dev/vd" is a fixed string, specify a letter that is valid as a device name for "x".

          When creating an instance with multiple volumes assigned, specify the highest priority letter among all of the device names of volumes for the boot volume.

          The order of priority is a > b > c > ...

        • Required property.
        • Type: String
      • volume_type

        • Specify a volume type name.

          Volumes are only created with the specified volume type when image is specified for sourcetype. If omitted, M1 is used.

          When volume is specified for sourcetype, the volume type cannot be changed. Therefore, specification of values is not possible.

          When snapshot is specified for sourcetype, volumes are created using the volume type of the volume of the snapshot source. Specification of values is not possible.

        • Optional property.
        • Type: String

ImageId

  • Glance image ID or name.
  • Optional property.
  • Type: String
  • Value must be of type glance.image

InstanceType

  • Nova instance type (flavor).
  • Optional property.
  • Type: String
  • Value must be of type nova.flavor

KeyName

  • Optional Nova keypair name.
  • Optional property.
  • Type: String
  • Value must be of type nova.keypair

NovaSchedulerHints

  • Scheduler hints to pass to Nova (Heat extension).

    When creating an instance with the server group uuid of "anti-affinity" specified, if there is no VM host where an instance can be created (the number of VM hosts that can be used is smaller than the number of instances belonging to the same server group), the instance status becomes ERROR after the instance creation request is received.

  • Optional property.
  • Type: List
  • List contents:

    • Optional property.
    • Type: Map
    • Map properties:

      • Key

        • Required property.
        • Type: String
      • Value

        • Required property.
        • Type: String

SecurityGroups

  • Security group names to assign.

    SecurityGroup must be a security group with the permissions for TCP connections to the following IP address and port number.

    • IP address: 169.254.169.254
    • Port number: 80
    CAUTION:
    If TCP connections are not permitted, setting of the host name (computer name) and administrator password may not be performed during instance creation.
  • Optional property.
  • Type: List

UserData

  • User data to pass to instance.

    Specifies the script. The supported format is mainly as shown below.

    • Linux:

      • Shell script (begins with #!)
    • Windows:

      • PowerShell (begins with #ps1_sysnative or #ps1_x86)
      • Windows batch (begins with rem cmd)
  • Optional property.
  • Type: String

Below is an example in which the c:temp directory is created using PowerShell.

UserData: |
  #!ps1_sysnative
  New-Item "c:\\temp" -Type Directory

Below is an example in which unique processing is performed after a restart of the instance.

UserData: |
   #!/bin/sh
   * Declare the processing to be performed before a restart
 
   script_name="<*Any name>"
 
   CLOUD_DIR="/var/lib/cloud"
   SCRIPT_DIR="${CLOUD_DIR}/scripts"
   MODULE="per-instance"
   SCRIPT="${SCRIPT_DIR}/${MODULE}/${script_name}" 
 
   cat > ${SCRIPT} <<EOS 
   #!/bin/sh
   * Declare the processing to be performed after a restart
   EOS
 
   chmod +x "${SCRIPT}"
   rm /var/lib/cloud/instance/sem/config_scripts_per_instance
 
   reboot #* Restart
CAUTION:
In case operating system is Linux, specified value with cloud-config format invalid.