LaunchConfiguration

Provides a resource to create a new launch configuration, used for autoscaling groups.

Using with AutoScaling Groups

Launch Configurations cannot be updated after creation with the Amazon Web Service API. In order to update a Launch Configuration, this provider will destroy the existing resource and create a replacement. In order to effectively use a Launch Configuration resource with an AutoScaling Group resource, it’s recommended to specify create_before_destroy in a lifecycle block. Either omit the Launch Configuration name attribute, or specify a partial name with name_prefix. Example:

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const ubuntu = pulumi.output(aws.getAmi({
    filters: [
        {
            name: "name",
            values: ["ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*"],
        },
        {
            name: "virtualization-type",
            values: ["hvm"],
        },
    ],
    mostRecent: true,
    owners: ["099720109477"], // Canonical
}, { async: true }));
const asConf = new aws.ec2.LaunchConfiguration("as_conf", {
    imageId: ubuntu.id,
    instanceType: "t2.micro",
    namePrefix: "lc-example-",
});
const bar = new aws.autoscaling.Group("bar", {
    launchConfiguration: asConf.name,
    maxSize: 2,
    minSize: 1,
});
import pulumi
import pulumi_aws as aws

ubuntu = aws.get_ami(filters=[
        {
            "name": "name",
            "values": ["ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*"],
        },
        {
            "name": "virtualization-type",
            "values": ["hvm"],
        },
    ],
    most_recent=True,
    owners=["099720109477"])
as_conf = aws.ec2.LaunchConfiguration("asConf",
    image_id=ubuntu.id,
    instance_type="t2.micro",
    name_prefix="lc-example-")
bar = aws.autoscaling.Group("bar",
    launch_configuration=as_conf.name,
    max_size=2,
    min_size=1)
using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var ubuntu = Output.Create(Aws.GetAmi.InvokeAsync(new Aws.GetAmiArgs
        {
            Filters = 
            {
                new Aws.Inputs.GetAmiFilterArgs
                {
                    Name = "name",
                    Values = 
                    {
                        "ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*",
                    },
                },
                new Aws.Inputs.GetAmiFilterArgs
                {
                    Name = "virtualization-type",
                    Values = 
                    {
                        "hvm",
                    },
                },
            },
            MostRecent = true,
            Owners = 
            {
                "099720109477",
            },
        }));
        var asConf = new Aws.Ec2.LaunchConfiguration("asConf", new Aws.Ec2.LaunchConfigurationArgs
        {
            ImageId = ubuntu.Apply(ubuntu => ubuntu.Id),
            InstanceType = "t2.micro",
            NamePrefix = "lc-example-",
        });
        var bar = new Aws.AutoScaling.Group("bar", new Aws.AutoScaling.GroupArgs
        {
            LaunchConfiguration = asConf.Name,
            MaxSize = 2,
            MinSize = 1,
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v2/go/aws"
	"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/autoscaling"
	"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2"
	"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := true
		ubuntu, err := aws.GetAmi(ctx, &aws.GetAmiArgs{
			Filters: []aws.GetAmiFilter{
				aws.GetAmiFilter{
					Name: "name",
					Values: []string{
						"ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*",
					},
				},
				aws.GetAmiFilter{
					Name: "virtualization-type",
					Values: []string{
						"hvm",
					},
				},
			},
			MostRecent: &opt0,
			Owners: []string{
				"099720109477",
			},
		}, nil)
		if err != nil {
			return err
		}
		asConf, err := ec2.NewLaunchConfiguration(ctx, "asConf", &ec2.LaunchConfigurationArgs{
			ImageId:      pulumi.String(ubuntu.Id),
			InstanceType: pulumi.String("t2.micro"),
			NamePrefix:   pulumi.String("lc-example-"),
		})
		if err != nil {
			return err
		}
		_, err = autoscaling.NewGroup(ctx, "bar", &autoscaling.GroupArgs{
			LaunchConfiguration: asConf.Name,
			MaxSize:             pulumi.Int(2),
			MinSize:             pulumi.Int(1),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

With this setup this provider generates a unique name for your Launch Configuration and can then update the AutoScaling Group without conflict before destroying the previous Launch Configuration.

Using with Spot Instances

Launch configurations can set the spot instance pricing to be used for the Auto Scaling Group to reserve instances. Simply specifying the spot_price parameter will set the price on the Launch Configuration which will attempt to reserve your instances at this price. See the AWS Spot Instance documentation for more information or how to launch Spot Instances with this provider.

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const ubuntu = pulumi.output(aws.getAmi({
    filters: [
        {
            name: "name",
            values: ["ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*"],
        },
        {
            name: "virtualization-type",
            values: ["hvm"],
        },
    ],
    mostRecent: true,
    owners: ["099720109477"], // Canonical
}, { async: true }));
const asConf = new aws.ec2.LaunchConfiguration("as_conf", {
    imageId: ubuntu.id,
    instanceType: "m4.large",
    spotPrice: "0.001",
});
const bar = new aws.autoscaling.Group("bar", {
    launchConfiguration: asConf.name,
});
import pulumi
import pulumi_aws as aws

ubuntu = aws.get_ami(filters=[
        {
            "name": "name",
            "values": ["ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*"],
        },
        {
            "name": "virtualization-type",
            "values": ["hvm"],
        },
    ],
    most_recent=True,
    owners=["099720109477"])
as_conf = aws.ec2.LaunchConfiguration("asConf",
    image_id=ubuntu.id,
    instance_type="m4.large",
    spot_price="0.001")
bar = aws.autoscaling.Group("bar", launch_configuration=as_conf.name)
using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var ubuntu = Output.Create(Aws.GetAmi.InvokeAsync(new Aws.GetAmiArgs
        {
            Filters = 
            {
                new Aws.Inputs.GetAmiFilterArgs
                {
                    Name = "name",
                    Values = 
                    {
                        "ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*",
                    },
                },
                new Aws.Inputs.GetAmiFilterArgs
                {
                    Name = "virtualization-type",
                    Values = 
                    {
                        "hvm",
                    },
                },
            },
            MostRecent = true,
            Owners = 
            {
                "099720109477",
            },
        }));
        var asConf = new Aws.Ec2.LaunchConfiguration("asConf", new Aws.Ec2.LaunchConfigurationArgs
        {
            ImageId = ubuntu.Apply(ubuntu => ubuntu.Id),
            InstanceType = "m4.large",
            SpotPrice = "0.001",
        });
        var bar = new Aws.AutoScaling.Group("bar", new Aws.AutoScaling.GroupArgs
        {
            LaunchConfiguration = asConf.Name,
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v2/go/aws"
	"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/autoscaling"
	"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2"
	"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := true
		ubuntu, err := aws.GetAmi(ctx, &aws.GetAmiArgs{
			Filters: []aws.GetAmiFilter{
				aws.GetAmiFilter{
					Name: "name",
					Values: []string{
						"ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*",
					},
				},
				aws.GetAmiFilter{
					Name: "virtualization-type",
					Values: []string{
						"hvm",
					},
				},
			},
			MostRecent: &opt0,
			Owners: []string{
				"099720109477",
			},
		}, nil)
		if err != nil {
			return err
		}
		asConf, err := ec2.NewLaunchConfiguration(ctx, "asConf", &ec2.LaunchConfigurationArgs{
			ImageId:      pulumi.String(ubuntu.Id),
			InstanceType: pulumi.String("m4.large"),
			SpotPrice:    pulumi.String("0.001"),
		})
		if err != nil {
			return err
		}
		_, err = autoscaling.NewGroup(ctx, "bar", &autoscaling.GroupArgs{
			LaunchConfiguration: asConf.Name,
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Block devices

Each of the *_block_device attributes controls a portion of the AWS Launch Configuration’s “Block Device Mapping”. It’s a good idea to familiarize yourself with AWS’s Block Device Mapping docs to understand the implications of using these attributes.

The root_block_device mapping supports the following:

  • volume_type - (Optional) The type of volume. Can be "standard", "gp2", or "io1". (Default: "standard").
  • volume_size - (Optional) The size of the volume in gigabytes.
  • iops - (Optional) The amount of provisioned IOPS. This must be set with a volume_type of "io1".
  • delete_on_termination - (Optional) Whether the volume should be destroyed on instance termination (Default: true).
  • encrypted - (Optional) Whether the volume should be encrypted or not. (Default: false).

Modifying any of the root_block_device settings requires resource replacement.

Each ebs_block_device supports the following:

  • device_name - (Required) The name of the device to mount.
  • snapshot_id - (Optional) The Snapshot ID to mount.
  • volume_type - (Optional) The type of volume. Can be "standard", "gp2", or "io1". (Default: "standard").
  • volume_size - (Optional) The size of the volume in gigabytes.
  • iops - (Optional) The amount of provisioned IOPS. This must be set with a volume_type of "io1".
  • delete_on_termination - (Optional) Whether the volume should be destroyed on instance termination (Default: true).
  • encrypted - (Optional) Whether the volume should be encrypted or not. Do not use this option if you are using snapshot_id as the encrypted flag will be determined by the snapshot. (Default: false).

Modifying any ebs_block_device currently requires resource replacement.

Each ephemeral_block_device supports the following:

  • device_name - The name of the block device to mount on the instance.
  • virtual_name - The Instance Store Device Name (e.g. "ephemeral0")

Each AWS Instance type has a different set of Instance Store block devices available for attachment. AWS publishes a list of which ephemeral devices are available on each type. The devices are always identified by the virtual_name in the format "ephemeral{0..N}".

NOTE: Changes to *_block_device configuration of existing resources cannot currently be detected by this provider. After updating to block device configuration, resource recreation can be manually triggered by using the up command with the –replace argument.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var ubuntu = Output.Create(Aws.GetAmi.InvokeAsync(new Aws.GetAmiArgs
        {
            Filters = 
            {
                new Aws.Inputs.GetAmiFilterArgs
                {
                    Name = "name",
                    Values = 
                    {
                        "ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*",
                    },
                },
                new Aws.Inputs.GetAmiFilterArgs
                {
                    Name = "virtualization-type",
                    Values = 
                    {
                        "hvm",
                    },
                },
            },
            MostRecent = true,
            Owners = 
            {
                "099720109477",
            },
        }));
        var asConf = new Aws.Ec2.LaunchConfiguration("asConf", new Aws.Ec2.LaunchConfigurationArgs
        {
            ImageId = ubuntu.Apply(ubuntu => ubuntu.Id),
            InstanceType = "t2.micro",
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws"
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        opt0 := true
        ubuntu, err := aws.GetAmi(ctx, &aws.GetAmiArgs{
            Filters: []aws.GetAmiFilter{
                aws.GetAmiFilter{
                    Name: "name",
                    Values: []string{
                        "ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*",
                    },
                },
                aws.GetAmiFilter{
                    Name: "virtualization-type",
                    Values: []string{
                        "hvm",
                    },
                },
            },
            MostRecent: &opt0,
            Owners: []string{
                "099720109477",
            },
        }, nil)
        if err != nil {
            return err
        }
        _, err = ec2.NewLaunchConfiguration(ctx, "asConf", &ec2.LaunchConfigurationArgs{
            ImageId:      pulumi.String(ubuntu.Id),
            InstanceType: pulumi.String("t2.micro"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

ubuntu = aws.get_ami(filters=[
        {
            "name": "name",
            "values": ["ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*"],
        },
        {
            "name": "virtualization-type",
            "values": ["hvm"],
        },
    ],
    most_recent=True,
    owners=["099720109477"])
as_conf = aws.ec2.LaunchConfiguration("asConf",
    image_id=ubuntu.id,
    instance_type="t2.micro")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const ubuntu = pulumi.output(aws.getAmi({
    filters: [
        {
            name: "name",
            values: ["ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*"],
        },
        {
            name: "virtualization-type",
            values: ["hvm"],
        },
    ],
    mostRecent: true,
    owners: ["099720109477"], // Canonical
}, { async: true }));
const asConf = new aws.ec2.LaunchConfiguration("as_conf", {
    imageId: ubuntu.id,
    instanceType: "t2.micro",
});

Create a LaunchConfiguration Resource

def LaunchConfiguration(resource_name, opts=None, associate_public_ip_address=None, ebs_block_devices=None, ebs_optimized=None, enable_monitoring=None, ephemeral_block_devices=None, iam_instance_profile=None, image_id=None, instance_type=None, key_name=None, name=None, name_prefix=None, placement_tenancy=None, root_block_device=None, security_groups=None, spot_price=None, user_data=None, user_data_base64=None, vpc_classic_link_id=None, vpc_classic_link_security_groups=None, __props__=None)
name string
The unique name of the resource.
args LaunchConfigurationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args LaunchConfigurationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args LaunchConfigurationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

LaunchConfiguration Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The LaunchConfiguration resource accepts the following input properties:

ImageId string

The EC2 image ID to launch.

InstanceType string

The size of instance to launch.

AssociatePublicIpAddress bool

Associate a public ip address with an instance in a VPC.

EbsBlockDevices List<LaunchConfigurationEbsBlockDeviceArgs>

Additional EBS block devices to attach to the instance. See Block Devices below for details.

EbsOptimized bool

If true, the launched EC2 instance will be EBS-optimized.

EnableMonitoring bool

Enables/disables detailed monitoring. This is enabled by default.

EphemeralBlockDevices List<LaunchConfigurationEphemeralBlockDeviceArgs>

Customize Ephemeral (also known as “Instance Store”) volumes on the instance. See Block Devices below for details.

IamInstanceProfile string

The name attribute of the IAM instance profile to associate with launched instances.

KeyName string

The key name that should be used for the instance.

Name string

The name of the launch configuration. If you leave this blank, this provider will auto-generate a unique name.

NamePrefix string

Creates a unique name beginning with the specified prefix. Conflicts with name.

PlacementTenancy string

The tenancy of the instance. Valid values are "default" or "dedicated", see AWS’s Create Launch Configuration for more details

RootBlockDevice LaunchConfigurationRootBlockDeviceArgs

Customize details about the root block device of the instance. See Block Devices below for details.

SecurityGroups List<string>

A list of associated security group IDS.

SpotPrice string

The maximum price to use for reserving spot instances.

UserData string

The user data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see user_data_base64 instead.

UserDataBase64 string

Can be used instead of user_data to pass base64-encoded binary data directly. Use this instead of user_data whenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption.

VpcClassicLinkId string

The ID of a ClassicLink-enabled VPC. Only applies to EC2-Classic instances. (eg. vpc-2730681a)

VpcClassicLinkSecurityGroups List<string>

The IDs of one or more security groups for the specified ClassicLink-enabled VPC (eg. sg-46ae3d11).

ImageId string

The EC2 image ID to launch.

InstanceType string

The size of instance to launch.

AssociatePublicIpAddress bool

Associate a public ip address with an instance in a VPC.

EbsBlockDevices []LaunchConfigurationEbsBlockDevice

Additional EBS block devices to attach to the instance. See Block Devices below for details.

EbsOptimized bool

If true, the launched EC2 instance will be EBS-optimized.

EnableMonitoring bool

Enables/disables detailed monitoring. This is enabled by default.

EphemeralBlockDevices []LaunchConfigurationEphemeralBlockDevice

Customize Ephemeral (also known as “Instance Store”) volumes on the instance. See Block Devices below for details.

IamInstanceProfile interface{}

The name attribute of the IAM instance profile to associate with launched instances.

KeyName string

The key name that should be used for the instance.

Name string

The name of the launch configuration. If you leave this blank, this provider will auto-generate a unique name.

NamePrefix string

Creates a unique name beginning with the specified prefix. Conflicts with name.

PlacementTenancy string

The tenancy of the instance. Valid values are "default" or "dedicated", see AWS’s Create Launch Configuration for more details

RootBlockDevice LaunchConfigurationRootBlockDevice

Customize details about the root block device of the instance. See Block Devices below for details.

SecurityGroups []string

A list of associated security group IDS.

SpotPrice string

The maximum price to use for reserving spot instances.

UserData string

The user data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see user_data_base64 instead.

UserDataBase64 string

Can be used instead of user_data to pass base64-encoded binary data directly. Use this instead of user_data whenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption.

VpcClassicLinkId string

The ID of a ClassicLink-enabled VPC. Only applies to EC2-Classic instances. (eg. vpc-2730681a)

VpcClassicLinkSecurityGroups []string

The IDs of one or more security groups for the specified ClassicLink-enabled VPC (eg. sg-46ae3d11).

imageId string

The EC2 image ID to launch.

instanceType string

The size of instance to launch.

associatePublicIpAddress boolean

Associate a public ip address with an instance in a VPC.

ebsBlockDevices LaunchConfigurationEbsBlockDevice[]

Additional EBS block devices to attach to the instance. See Block Devices below for details.

ebsOptimized boolean

If true, the launched EC2 instance will be EBS-optimized.

enableMonitoring boolean

Enables/disables detailed monitoring. This is enabled by default.

ephemeralBlockDevices LaunchConfigurationEphemeralBlockDevice[]

Customize Ephemeral (also known as “Instance Store”) volumes on the instance. See Block Devices below for details.

iamInstanceProfile string | InstanceProfile

The name attribute of the IAM instance profile to associate with launched instances.

keyName string

The key name that should be used for the instance.

name string

The name of the launch configuration. If you leave this blank, this provider will auto-generate a unique name.

namePrefix string

Creates a unique name beginning with the specified prefix. Conflicts with name.

placementTenancy string

The tenancy of the instance. Valid values are "default" or "dedicated", see AWS’s Create Launch Configuration for more details

rootBlockDevice LaunchConfigurationRootBlockDevice

Customize details about the root block device of the instance. See Block Devices below for details.

securityGroups string[]

A list of associated security group IDS.

spotPrice string

The maximum price to use for reserving spot instances.

userData string

The user data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see user_data_base64 instead.

userDataBase64 string

Can be used instead of user_data to pass base64-encoded binary data directly. Use this instead of user_data whenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption.

vpcClassicLinkId string

The ID of a ClassicLink-enabled VPC. Only applies to EC2-Classic instances. (eg. vpc-2730681a)

vpcClassicLinkSecurityGroups string[]

The IDs of one or more security groups for the specified ClassicLink-enabled VPC (eg. sg-46ae3d11).

image_id str

The EC2 image ID to launch.

instance_type str

The size of instance to launch.

associate_public_ip_address bool

Associate a public ip address with an instance in a VPC.

ebs_block_devices List[LaunchConfigurationEbsBlockDevice]

Additional EBS block devices to attach to the instance. See Block Devices below for details.

ebs_optimized bool

If true, the launched EC2 instance will be EBS-optimized.

enable_monitoring bool

Enables/disables detailed monitoring. This is enabled by default.

ephemeral_block_devices List[LaunchConfigurationEphemeralBlockDevice]

Customize Ephemeral (also known as “Instance Store”) volumes on the instance. See Block Devices below for details.

iam_instance_profile string | str

The name attribute of the IAM instance profile to associate with launched instances.

key_name str

The key name that should be used for the instance.

name str

The name of the launch configuration. If you leave this blank, this provider will auto-generate a unique name.

name_prefix str

Creates a unique name beginning with the specified prefix. Conflicts with name.

placement_tenancy str

The tenancy of the instance. Valid values are "default" or "dedicated", see AWS’s Create Launch Configuration for more details

root_block_device Dict[LaunchConfigurationRootBlockDevice]

Customize details about the root block device of the instance. See Block Devices below for details.

security_groups List[str]

A list of associated security group IDS.

spot_price str

The maximum price to use for reserving spot instances.

user_data str

The user data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see user_data_base64 instead.

user_data_base64 str

Can be used instead of user_data to pass base64-encoded binary data directly. Use this instead of user_data whenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption.

vpc_classic_link_id str

The ID of a ClassicLink-enabled VPC. Only applies to EC2-Classic instances. (eg. vpc-2730681a)

vpc_classic_link_security_groups List[str]

The IDs of one or more security groups for the specified ClassicLink-enabled VPC (eg. sg-46ae3d11).

Outputs

All input properties are implicitly available as output properties. Additionally, the LaunchConfiguration resource produces the following output properties:

Arn string

The Amazon Resource Name of the launch configuration.

Id string
The provider-assigned unique ID for this managed resource.
Arn string

The Amazon Resource Name of the launch configuration.

Id string
The provider-assigned unique ID for this managed resource.
arn string

The Amazon Resource Name of the launch configuration.

id string
The provider-assigned unique ID for this managed resource.
arn str

The Amazon Resource Name of the launch configuration.

id str
The provider-assigned unique ID for this managed resource.

Look up an Existing LaunchConfiguration Resource

Get an existing LaunchConfiguration resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

static get(resource_name, id, opts=None, arn=None, associate_public_ip_address=None, ebs_block_devices=None, ebs_optimized=None, enable_monitoring=None, ephemeral_block_devices=None, iam_instance_profile=None, image_id=None, instance_type=None, key_name=None, name=None, name_prefix=None, placement_tenancy=None, root_block_device=None, security_groups=None, spot_price=None, user_data=None, user_data_base64=None, vpc_classic_link_id=None, vpc_classic_link_security_groups=None, __props__=None)
func GetLaunchConfiguration(ctx *Context, name string, id IDInput, state *LaunchConfigurationState, opts ...ResourceOption) (*LaunchConfiguration, error)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Arn string

The Amazon Resource Name of the launch configuration.

AssociatePublicIpAddress bool

Associate a public ip address with an instance in a VPC.

EbsBlockDevices List<LaunchConfigurationEbsBlockDeviceArgs>

Additional EBS block devices to attach to the instance. See Block Devices below for details.

EbsOptimized bool

If true, the launched EC2 instance will be EBS-optimized.

EnableMonitoring bool

Enables/disables detailed monitoring. This is enabled by default.

EphemeralBlockDevices List<LaunchConfigurationEphemeralBlockDeviceArgs>

Customize Ephemeral (also known as “Instance Store”) volumes on the instance. See Block Devices below for details.

IamInstanceProfile string

The name attribute of the IAM instance profile to associate with launched instances.

ImageId string

The EC2 image ID to launch.

InstanceType string

The size of instance to launch.

KeyName string

The key name that should be used for the instance.

Name string

The name of the launch configuration. If you leave this blank, this provider will auto-generate a unique name.

NamePrefix string

Creates a unique name beginning with the specified prefix. Conflicts with name.

PlacementTenancy string

The tenancy of the instance. Valid values are "default" or "dedicated", see AWS’s Create Launch Configuration for more details

RootBlockDevice LaunchConfigurationRootBlockDeviceArgs

Customize details about the root block device of the instance. See Block Devices below for details.

SecurityGroups List<string>

A list of associated security group IDS.

SpotPrice string

The maximum price to use for reserving spot instances.

UserData string

The user data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see user_data_base64 instead.

UserDataBase64 string

Can be used instead of user_data to pass base64-encoded binary data directly. Use this instead of user_data whenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption.

VpcClassicLinkId string

The ID of a ClassicLink-enabled VPC. Only applies to EC2-Classic instances. (eg. vpc-2730681a)

VpcClassicLinkSecurityGroups List<string>

The IDs of one or more security groups for the specified ClassicLink-enabled VPC (eg. sg-46ae3d11).

Arn string

The Amazon Resource Name of the launch configuration.

AssociatePublicIpAddress bool

Associate a public ip address with an instance in a VPC.

EbsBlockDevices []LaunchConfigurationEbsBlockDevice

Additional EBS block devices to attach to the instance. See Block Devices below for details.

EbsOptimized bool

If true, the launched EC2 instance will be EBS-optimized.

EnableMonitoring bool

Enables/disables detailed monitoring. This is enabled by default.

EphemeralBlockDevices []LaunchConfigurationEphemeralBlockDevice

Customize Ephemeral (also known as “Instance Store”) volumes on the instance. See Block Devices below for details.

IamInstanceProfile interface{}

The name attribute of the IAM instance profile to associate with launched instances.

ImageId string

The EC2 image ID to launch.

InstanceType string

The size of instance to launch.

KeyName string

The key name that should be used for the instance.

Name string

The name of the launch configuration. If you leave this blank, this provider will auto-generate a unique name.

NamePrefix string

Creates a unique name beginning with the specified prefix. Conflicts with name.

PlacementTenancy string

The tenancy of the instance. Valid values are "default" or "dedicated", see AWS’s Create Launch Configuration for more details

RootBlockDevice LaunchConfigurationRootBlockDevice

Customize details about the root block device of the instance. See Block Devices below for details.

SecurityGroups []string

A list of associated security group IDS.

SpotPrice string

The maximum price to use for reserving spot instances.

UserData string

The user data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see user_data_base64 instead.

UserDataBase64 string

Can be used instead of user_data to pass base64-encoded binary data directly. Use this instead of user_data whenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption.

VpcClassicLinkId string

The ID of a ClassicLink-enabled VPC. Only applies to EC2-Classic instances. (eg. vpc-2730681a)

VpcClassicLinkSecurityGroups []string

The IDs of one or more security groups for the specified ClassicLink-enabled VPC (eg. sg-46ae3d11).

arn string

The Amazon Resource Name of the launch configuration.

associatePublicIpAddress boolean

Associate a public ip address with an instance in a VPC.

ebsBlockDevices LaunchConfigurationEbsBlockDevice[]

Additional EBS block devices to attach to the instance. See Block Devices below for details.

ebsOptimized boolean

If true, the launched EC2 instance will be EBS-optimized.

enableMonitoring boolean

Enables/disables detailed monitoring. This is enabled by default.

ephemeralBlockDevices LaunchConfigurationEphemeralBlockDevice[]

Customize Ephemeral (also known as “Instance Store”) volumes on the instance. See Block Devices below for details.

iamInstanceProfile string | InstanceProfile

The name attribute of the IAM instance profile to associate with launched instances.

imageId string

The EC2 image ID to launch.

instanceType string

The size of instance to launch.

keyName string

The key name that should be used for the instance.

name string

The name of the launch configuration. If you leave this blank, this provider will auto-generate a unique name.

namePrefix string

Creates a unique name beginning with the specified prefix. Conflicts with name.

placementTenancy string

The tenancy of the instance. Valid values are "default" or "dedicated", see AWS’s Create Launch Configuration for more details

rootBlockDevice LaunchConfigurationRootBlockDevice

Customize details about the root block device of the instance. See Block Devices below for details.

securityGroups string[]

A list of associated security group IDS.

spotPrice string

The maximum price to use for reserving spot instances.

userData string

The user data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see user_data_base64 instead.

userDataBase64 string

Can be used instead of user_data to pass base64-encoded binary data directly. Use this instead of user_data whenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption.

vpcClassicLinkId string

The ID of a ClassicLink-enabled VPC. Only applies to EC2-Classic instances. (eg. vpc-2730681a)

vpcClassicLinkSecurityGroups string[]

The IDs of one or more security groups for the specified ClassicLink-enabled VPC (eg. sg-46ae3d11).

arn str

The Amazon Resource Name of the launch configuration.

associate_public_ip_address bool

Associate a public ip address with an instance in a VPC.

ebs_block_devices List[LaunchConfigurationEbsBlockDevice]

Additional EBS block devices to attach to the instance. See Block Devices below for details.

ebs_optimized bool

If true, the launched EC2 instance will be EBS-optimized.

enable_monitoring bool

Enables/disables detailed monitoring. This is enabled by default.

ephemeral_block_devices List[LaunchConfigurationEphemeralBlockDevice]

Customize Ephemeral (also known as “Instance Store”) volumes on the instance. See Block Devices below for details.

iam_instance_profile string | str

The name attribute of the IAM instance profile to associate with launched instances.

image_id str

The EC2 image ID to launch.

instance_type str

The size of instance to launch.

key_name str

The key name that should be used for the instance.

name str

The name of the launch configuration. If you leave this blank, this provider will auto-generate a unique name.

name_prefix str

Creates a unique name beginning with the specified prefix. Conflicts with name.

placement_tenancy str

The tenancy of the instance. Valid values are "default" or "dedicated", see AWS’s Create Launch Configuration for more details

root_block_device Dict[LaunchConfigurationRootBlockDevice]

Customize details about the root block device of the instance. See Block Devices below for details.

security_groups List[str]

A list of associated security group IDS.

spot_price str

The maximum price to use for reserving spot instances.

user_data str

The user data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see user_data_base64 instead.

user_data_base64 str

Can be used instead of user_data to pass base64-encoded binary data directly. Use this instead of user_data whenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption.

vpc_classic_link_id str

The ID of a ClassicLink-enabled VPC. Only applies to EC2-Classic instances. (eg. vpc-2730681a)

vpc_classic_link_security_groups List[str]

The IDs of one or more security groups for the specified ClassicLink-enabled VPC (eg. sg-46ae3d11).

Supporting Types

LaunchConfigurationEbsBlockDevice

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

DeviceName string
DeleteOnTermination bool
Encrypted bool
Iops int
NoDevice bool
SnapshotId string
VolumeSize int
VolumeType string
DeviceName string
DeleteOnTermination bool
Encrypted bool
Iops int
NoDevice bool
SnapshotId string
VolumeSize int
VolumeType string
deviceName string
deleteOnTermination boolean
encrypted boolean
iops number
noDevice boolean
snapshotId string
volumeSize number
volumeType string
device_name str
deleteOnTermination bool
encrypted bool
iops float
noDevice bool
snapshot_id str
volumeType str
volume_size float

LaunchConfigurationEphemeralBlockDevice

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

DeviceName string
VirtualName string
DeviceName string
VirtualName string
deviceName string
virtualName string
device_name str
virtualName str

LaunchConfigurationRootBlockDevice

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

DeleteOnTermination bool
Encrypted bool
Iops int
VolumeSize int
VolumeType string
DeleteOnTermination bool
Encrypted bool
Iops int
VolumeSize int
VolumeType string
deleteOnTermination boolean
encrypted boolean
iops number
volumeSize number
volumeType string
deleteOnTermination bool
encrypted bool
iops float
volumeType str
volume_size float

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.