Resource Type: ec2instance

Defined in:
lib/puppet/type/ec2instance.rb
Providers:
fog

Overview

EC2 Instances

Properties

  • availability_zone

    The availability zone that the instance should run in

    Supported values:
    • /^eu-west-\d[a-z]$/
    • /^us-east-\d[a-z]$/
    • /^us-west-\d[a-z]$/
    • /^ap-southeast-\d[a-z]$/
    • /^ap-northeast-\d[a-z]$/
    • /^sa-east-\d[a-z]$/
  • block_device_mapping

    Expert Feature: block_device_mapping as a hash

  • ebs_optimized (defaults to: false)

    Whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn’t available with all instance types. Additional usage charges apply when using an EBS Optimized instance.

    Supported values:
    • true
    • false
  • ensure

    Ensure that an ec2instance is ‘running’, ‘stopped’ or ‘terminated’

    Supported values:
    • running
    • stopped
    • terminated
    • present
    • absent
  • image_filter

    Select the AMI to boot from using a filter hash, e.g. { ‘name’ => ‘Fedora17-x86_64-practicalclouds*’ }. The filter must match a single ami image. By using the filter rather than image_id will allow you to more easiliy move an instance between regions (so long as the filter matches the right image in the new region!). See docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeImages.html for more information.

  • image_id

    The image_id for the AMI to boot from (required - unless you specify an image_filter)

    Supported values:
    • /^ami-/
  • instance_type (defaults to: m1.small)

    The instance type

    Supported values:
    • t1.micro
    • m1.small
    • m1.medium
    • m1.large
    • m1.xlarge
    • m3.xlarge
    • m3.2xlarge
    • c1.medium
    • c1.xlarge
    • m2.xlarge
    • m2.2xlarge
    • m2.4xlarge
    • cr1.8xlarge
    • hi1.4xlarge
    • hs1.8xlarge
    • cc1.4xlarge
    • cc2.8xlarge
    • cg1.4xlarge
  • kernel_id

    The ID of the kernel with which to launch the instance.

    Supported values:
    • /^aki-/
  • key_name

    The name of the key pair to use.

  • monitoring_enabled (defaults to: false)

    Enables monitoring for the instance.

    Supported values:
    • true
    • false
  • private_ip_address
    EC2-VPC

    You can optionally use this parameter to assign the instance a specific available IP address from the IP address range of the subnet as the primary IP address.

  • ramdisk_id

    The ID of the RAM disk. Some kernels require additional drivers at launch. Check the kernel requirements for information on whether you need to specify a RAM disk. To find kernel requirements, refer to the Resource Center and search for the kernel ID.

    Supported values:
    • /^ari-/
  • region

    The region that this instance belongs.

    Supported values:
    • /^eu-west-\d$/
    • /^us-east-\d$/
    • /^us-west-\d$/
    • /^ap-southeast-\d$/
    • /^ap-northeast-\d$/
    • /^sa-east-\d$/
  • security_group_ids

    A list of security groups by security group id that you want the instance to join.

    Supported values:
    • /^sg-/
  • security_group_names

    A list of security groups by Name that you want the instance to join.

  • subnet_id
    EC2-VPC

    The ID of the subnet to launch the instance into.

  • tags

    A set of tags which have been set on the object. There can only be 10 tags per object including the Name tag

  • user_data

    The user data which you want to pass the instance when it boots in string format.

Parameters

  • awsaccess

    Optional name of an awsaccess resource to use for managing this resource

  • disable_api_termination (defaults to: false)

    Whether you can terminate the instance using the EC2 API. A value of true means you can’t terminate the instance using the API (i.e., the instance is ‘locked’); a value of false means you can.

    Supported values:
    • true
    • false
  • instance_initiated_shutdown_behavior (defaults to: stop)

    Whether the instance stops or terminates on instance-initiated shutdown.

    Supported values:
    • stop
    • terminate
  • max_wait (defaults to: 600)

    How long to keep on waiting for an instance to start before throwing an error, in seconds

    Supported values:
    • /^\d+/
  • name (namevar)

    The friendly Name (tag) of the EC2 Instance

  • placement_group_name

    The placement group for the instance

  • provider

    The specific backend to use for this ‘ec2instance` resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

  • wait (defaults to: false)

    Whether to wait for the instance to finish starting up before returning from the provider.

    Supported values:
    • true
    • false