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 avolume_typeof"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 avolume_typeof"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 usingsnapshot_idas 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_deviceconfiguration of existing resources cannot currently be detected by this provider. After updating to block device configuration, resource recreation can be manually triggered by using theupcommand 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
new LaunchConfiguration(name: string, args: LaunchConfigurationArgs, opts?: CustomResourceOptions);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);func NewLaunchConfiguration(ctx *Context, name string, args LaunchConfigurationArgs, opts ...ResourceOption) (*LaunchConfiguration, error)public LaunchConfiguration(string name, LaunchConfigurationArgs args, CustomResourceOptions? opts = null)- 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:
- Image
Id string The EC2 image ID to launch.
- Instance
Type string The size of instance to launch.
- Associate
Public boolIp Address Associate a public ip address with an instance in a VPC.
- Ebs
Block List<LaunchDevices Configuration Ebs Block Device Args> 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 List<LaunchDevices Configuration Ephemeral Block Device Args> Customize Ephemeral (also known as “Instance Store”) volumes on the instance. See Block Devices below for details.
- Iam
Instance stringProfile The name attribute of the IAM instance profile to associate with launched instances.
- Key
Name 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.
- Name
Prefix string Creates a unique name beginning with the specified prefix. Conflicts with
name.- Placement
Tenancy string The tenancy of the instance. Valid values are
"default"or"dedicated", see AWS’s Create Launch Configuration for more details- Root
Block LaunchDevice Configuration Root Block Device Args Customize details about the root block device of the instance. See Block Devices below for details.
- Security
Groups List<string> A list of associated security group IDS.
- Spot
Price string The maximum price to use for reserving spot instances.
- User
Data string The user data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see
user_data_base64instead.- User
Data stringBase64 Can be used instead of
user_datato pass base64-encoded binary data directly. Use this instead ofuser_datawhenever 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 stringLink Id The ID of a ClassicLink-enabled VPC. Only applies to EC2-Classic instances. (eg.
vpc-2730681a)- Vpc
Classic List<string>Link Security Groups The IDs of one or more security groups for the specified ClassicLink-enabled VPC (eg.
sg-46ae3d11).
- Image
Id string The EC2 image ID to launch.
- Instance
Type string The size of instance to launch.
- Associate
Public boolIp Address Associate a public ip address with an instance in a VPC.
- Ebs
Block []LaunchDevices Configuration Ebs Block Device 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 []LaunchDevices Configuration Ephemeral Block Device Customize Ephemeral (also known as “Instance Store”) volumes on the instance. See Block Devices below for details.
- Iam
Instance interface{}Profile The name attribute of the IAM instance profile to associate with launched instances.
- Key
Name 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.
- Name
Prefix string Creates a unique name beginning with the specified prefix. Conflicts with
name.- Placement
Tenancy string The tenancy of the instance. Valid values are
"default"or"dedicated", see AWS’s Create Launch Configuration for more details- Root
Block LaunchDevice Configuration Root Block Device Customize details about the root block device of the instance. See Block Devices below for details.
- Security
Groups []string A list of associated security group IDS.
- Spot
Price string The maximum price to use for reserving spot instances.
- User
Data string The user data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see
user_data_base64instead.- User
Data stringBase64 Can be used instead of
user_datato pass base64-encoded binary data directly. Use this instead ofuser_datawhenever 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 stringLink Id The ID of a ClassicLink-enabled VPC. Only applies to EC2-Classic instances. (eg.
vpc-2730681a)- Vpc
Classic []stringLink Security Groups The IDs of one or more security groups for the specified ClassicLink-enabled VPC (eg.
sg-46ae3d11).
- image
Id string The EC2 image ID to launch.
- instance
Type string The size of instance to launch.
- associate
Public booleanIp Address Associate a public ip address with an instance in a VPC.
- ebs
Block LaunchDevices Configuration Ebs Block Device[] Additional EBS block devices to attach to the instance. See Block Devices below for details.
- ebs
Optimized boolean If true, the launched EC2 instance will be EBS-optimized.
- enable
Monitoring boolean Enables/disables detailed monitoring. This is enabled by default.
- ephemeral
Block LaunchDevices Configuration Ephemeral Block Device[] Customize Ephemeral (also known as “Instance Store”) volumes on the instance. See Block Devices below for details.
- iam
Instance string | InstanceProfile Profile The name attribute of the IAM instance profile to associate with launched instances.
- key
Name 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.
- name
Prefix string Creates a unique name beginning with the specified prefix. Conflicts with
name.- placement
Tenancy string The tenancy of the instance. Valid values are
"default"or"dedicated", see AWS’s Create Launch Configuration for more details- root
Block LaunchDevice Configuration Root Block Device Customize details about the root block device of the instance. See Block Devices below for details.
- security
Groups string[] A list of associated security group IDS.
- spot
Price string The maximum price to use for reserving spot instances.
- user
Data string The user data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see
user_data_base64instead.- user
Data stringBase64 Can be used instead of
user_datato pass base64-encoded binary data directly. Use this instead ofuser_datawhenever 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 stringLink Id The ID of a ClassicLink-enabled VPC. Only applies to EC2-Classic instances. (eg.
vpc-2730681a)- vpc
Classic string[]Link Security Groups 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_ boolip_ address Associate a public ip address with an instance in a VPC.
- ebs_
block_ List[Launchdevices Configuration Ebs Block Device] 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_ List[Launchdevices Configuration Ephemeral Block Device] Customize Ephemeral (also known as “Instance Store”) volumes on the instance. See Block Devices below for details.
- iam_
instance_ string | strprofile 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_ Dict[Launchdevice Configuration Root Block Device] 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_base64instead.- user_
data_ strbase64 Can be used instead of
user_datato pass base64-encoded binary data directly. Use this instead ofuser_datawhenever 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_ strlink_ id The ID of a ClassicLink-enabled VPC. Only applies to EC2-Classic instances. (eg.
vpc-2730681a)- vpc_
classic_ List[str]link_ security_ groups 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:
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.
public static get(name: string, id: Input<ID>, state?: LaunchConfigurationState, opts?: CustomResourceOptions): LaunchConfigurationstatic 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)public static LaunchConfiguration Get(string name, Input<string> id, LaunchConfigurationState? state, CustomResourceOptions? opts = null)- 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.
- Associate
Public boolIp Address Associate a public ip address with an instance in a VPC.
- Ebs
Block List<LaunchDevices Configuration Ebs Block Device Args> 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 List<LaunchDevices Configuration Ephemeral Block Device Args> Customize Ephemeral (also known as “Instance Store”) volumes on the instance. See Block Devices below for details.
- Iam
Instance stringProfile The name attribute of the IAM instance profile to associate with launched instances.
- Image
Id string The EC2 image ID to launch.
- Instance
Type string The size of instance to launch.
- Key
Name 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.
- Name
Prefix string Creates a unique name beginning with the specified prefix. Conflicts with
name.- Placement
Tenancy string The tenancy of the instance. Valid values are
"default"or"dedicated", see AWS’s Create Launch Configuration for more details- Root
Block LaunchDevice Configuration Root Block Device Args Customize details about the root block device of the instance. See Block Devices below for details.
- Security
Groups List<string> A list of associated security group IDS.
- Spot
Price string The maximum price to use for reserving spot instances.
- User
Data string The user data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see
user_data_base64instead.- User
Data stringBase64 Can be used instead of
user_datato pass base64-encoded binary data directly. Use this instead ofuser_datawhenever 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 stringLink Id The ID of a ClassicLink-enabled VPC. Only applies to EC2-Classic instances. (eg.
vpc-2730681a)- Vpc
Classic List<string>Link Security Groups 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.
- Associate
Public boolIp Address Associate a public ip address with an instance in a VPC.
- Ebs
Block []LaunchDevices Configuration Ebs Block Device 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 []LaunchDevices Configuration Ephemeral Block Device Customize Ephemeral (also known as “Instance Store”) volumes on the instance. See Block Devices below for details.
- Iam
Instance interface{}Profile The name attribute of the IAM instance profile to associate with launched instances.
- Image
Id string The EC2 image ID to launch.
- Instance
Type string The size of instance to launch.
- Key
Name 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.
- Name
Prefix string Creates a unique name beginning with the specified prefix. Conflicts with
name.- Placement
Tenancy string The tenancy of the instance. Valid values are
"default"or"dedicated", see AWS’s Create Launch Configuration for more details- Root
Block LaunchDevice Configuration Root Block Device Customize details about the root block device of the instance. See Block Devices below for details.
- Security
Groups []string A list of associated security group IDS.
- Spot
Price string The maximum price to use for reserving spot instances.
- User
Data string The user data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see
user_data_base64instead.- User
Data stringBase64 Can be used instead of
user_datato pass base64-encoded binary data directly. Use this instead ofuser_datawhenever 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 stringLink Id The ID of a ClassicLink-enabled VPC. Only applies to EC2-Classic instances. (eg.
vpc-2730681a)- Vpc
Classic []stringLink Security Groups 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.
- associate
Public booleanIp Address Associate a public ip address with an instance in a VPC.
- ebs
Block LaunchDevices Configuration Ebs Block Device[] Additional EBS block devices to attach to the instance. See Block Devices below for details.
- ebs
Optimized boolean If true, the launched EC2 instance will be EBS-optimized.
- enable
Monitoring boolean Enables/disables detailed monitoring. This is enabled by default.
- ephemeral
Block LaunchDevices Configuration Ephemeral Block Device[] Customize Ephemeral (also known as “Instance Store”) volumes on the instance. See Block Devices below for details.
- iam
Instance string | InstanceProfile Profile The name attribute of the IAM instance profile to associate with launched instances.
- image
Id string The EC2 image ID to launch.
- instance
Type string The size of instance to launch.
- key
Name 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.
- name
Prefix string Creates a unique name beginning with the specified prefix. Conflicts with
name.- placement
Tenancy string The tenancy of the instance. Valid values are
"default"or"dedicated", see AWS’s Create Launch Configuration for more details- root
Block LaunchDevice Configuration Root Block Device Customize details about the root block device of the instance. See Block Devices below for details.
- security
Groups string[] A list of associated security group IDS.
- spot
Price string The maximum price to use for reserving spot instances.
- user
Data string The user data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see
user_data_base64instead.- user
Data stringBase64 Can be used instead of
user_datato pass base64-encoded binary data directly. Use this instead ofuser_datawhenever 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 stringLink Id The ID of a ClassicLink-enabled VPC. Only applies to EC2-Classic instances. (eg.
vpc-2730681a)- vpc
Classic string[]Link Security Groups 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_ boolip_ address Associate a public ip address with an instance in a VPC.
- ebs_
block_ List[Launchdevices Configuration Ebs Block Device] 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_ List[Launchdevices Configuration Ephemeral Block Device] Customize Ephemeral (also known as “Instance Store”) volumes on the instance. See Block Devices below for details.
- iam_
instance_ string | strprofile 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_ Dict[Launchdevice Configuration Root Block Device] 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_base64instead.- user_
data_ strbase64 Can be used instead of
user_datato pass base64-encoded binary data directly. Use this instead ofuser_datawhenever 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_ strlink_ id The ID of a ClassicLink-enabled VPC. Only applies to EC2-Classic instances. (eg.
vpc-2730681a)- vpc_
classic_ List[str]link_ security_ groups The IDs of one or more security groups for the specified ClassicLink-enabled VPC (eg.
sg-46ae3d11).
Supporting Types
LaunchConfigurationEbsBlockDevice
LaunchConfigurationEphemeralBlockDevice
LaunchConfigurationRootBlockDevice
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.