LaunchTemplate class
Provides an EC2 launch template resource. Can be used to create instances or auto scaling groups.
Optional
accountId(String) AWS Account where this resource is managed.region(String) Region where this resource is managed.
Using pulumi import, import Launch Templates using the id. For example:
$ pulumi import aws:ec2/launchTemplate:LaunchTemplate web lt-12345678
Constructors
- LaunchTemplate(String name, {LaunchTemplateArgs? args, CustomResourceOptions? options})
-
Creates a new LaunchTemplate.
nameThe Pulumi resource name.argsArguments used to configure this LaunchTemplate. The set of arguments for LaunchTemplate.optionsResource options controlling this resource's behavior. - LaunchTemplate.reference(String urn)
- Creates a typed reference to an existing LaunchTemplate resource.
Properties
-
arn
↔ Output<
String> -
ARN of the launch template.
latefinal
-
blockDeviceMappings
↔ Output<
List< LaunchTemplateBlockDeviceMapping> ?> -
Specify volumes to attach to the instance besides the volumes specified by the AMI.
See Block Devices below for details.
latefinal
-
capacityReservationSpecification
↔ Output<
LaunchTemplateCapacityReservationSpecification?> -
Targeting for EC2 capacity reservations. See Capacity Reservation Specification below for more details.
latefinal
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
cpuOptions
↔ Output<
LaunchTemplateCpuOptions?> -
The CPU options for the instance. See CPU Options below for more details.
latefinal
-
creditSpecification
↔ Output<
LaunchTemplateCreditSpecification?> -
Customize the credit specification of the instance. See Credit
Specification below for more details.
latefinal
-
defaultVersion
↔ Output<
int> -
Default Version of the launch template.
latefinal
-
description
↔ Output<
String?> -
Description of the launch template version (
VersionDescriptionin the EC2 API). Launch templates in AWS do not have a template-level description; whenever a change to this resource creates a new version, the new version is created with this description. To give each version a distinct description, update this argument in the same apply as the other changes.latefinal -
disableApiStop
↔ Output<
bool?> -
If true, enables EC2 Instance Stop Protection.
latefinal
-
disableApiTermination
↔ Output<
bool?> -
If
true, enables EC2 Instance Termination Protectionlatefinal -
ebsOptimized
↔ Output<
String?> -
If
true, the launched EC2 instance will be EBS-optimized.latefinal -
enclaveOptions
↔ Output<
LaunchTemplateEnclaveOptions?> -
Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
-
hibernationOptions
↔ Output<
LaunchTemplateHibernationOptions?> -
The hibernation options for the instance. See Hibernation Options below for more details.
latefinal
-
iamInstanceProfile
↔ Output<
LaunchTemplateIamInstanceProfile?> -
The IAM Instance Profile to launch the instance with. See Instance Profile
below for more details.
latefinal
-
id
↔ Output<
String> -
getter/setter pairinherited
-
imageId
↔ Output<
String?> -
The AMI from which to launch the instance or use a Systems Manager parameter convention e.g.
resolve:ssm:parameter-name. See docs for more details.latefinal -
instanceInitiatedShutdownBehavior
↔ Output<
String?> -
Shutdown behavior for the instance. Can be
stoporterminate. (Default:stop).latefinal -
instanceMarketOptions
↔ Output<
LaunchTemplateInstanceMarketOptions?> -
The market (purchasing) option for the instance. See Market Options
below for details.
latefinal
-
instanceRequirements
↔ Output<
LaunchTemplateInstanceRequirements?> -
The attribute requirements for the type of instance. If present then
instanceTypecannot be present.latefinal -
instanceType
↔ Output<
String?> -
The type of the instance. If present then
instanceRequirementscannot be present.latefinal - isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
kernelId
↔ Output<
String?> -
The kernel ID.
latefinal
-
keyName
↔ Output<
String?> -
The key name to use for the instance.
latefinal
-
latestVersion
↔ Output<
int> -
The latest version of the launch template.
latefinal
-
licenseSpecifications
↔ Output<
List< LaunchTemplateLicenseSpecification> ?> -
A list of license specifications to associate with. See License Specification below for more details.
latefinal
-
maintenanceOptions
↔ Output<
LaunchTemplateMaintenanceOptions?> -
The maintenance options for the instance. See Maintenance Options below for more details.
latefinal
-
metadataOptions
↔ Output<
LaunchTemplateMetadataOptions> -
Customize the metadata options for the instance. See Metadata Options below for more details.
latefinal
-
monitoring
↔ Output<
LaunchTemplateMonitoring?> -
The monitoring option for the instance. See Monitoring below for more details.
latefinal
-
name
↔ Output<
String> -
The name of the launch template. If you leave this blank, the provider will auto-generate a unique name.
latefinal
-
namePrefix
↔ Output<
String> -
Creates a unique name beginning with the specified prefix. Conflicts with
name.latefinal -
networkInterfaces
↔ Output<
List< LaunchTemplateNetworkInterface> ?> -
Customize network interfaces to be attached at instance boot time. See Network
Interfaces below for more details.
latefinal
-
networkPerformanceOptions
↔ Output<
LaunchTemplateNetworkPerformanceOptions?> -
latefinal
-
placement
↔ Output<
LaunchTemplatePlacement?> -
The placement of the instance. See Placement below for more details.
latefinal
-
privateDnsNameOptions
↔ Output<
LaunchTemplatePrivateDnsNameOptions?> -
The options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
latefinal
-
ramDiskId
↔ Output<
String?> -
The ID of the RAM disk.
latefinal
-
region
↔ Output<
String> -
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
secondaryInterfaces
↔ Output<
List< LaunchTemplateSecondaryInterface> ?> -
Secondary interfaces to associate with instances launched from the template. See Secondary
Interfaces below for more details.
latefinal
-
securityGroupNames
↔ Output<
List< String> ?> -
A list of security group names to associate with. If you are creating Instances in a VPC, use
vpcSecurityGroupIdsinstead.latefinal -
A map of tags to assign to the launch template. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.latefinal -
A map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.latefinal -
tagSpecifications
↔ Output<
List< LaunchTemplateTagSpecification> ?> -
The tags to apply to the resources during launch. See Tag Specifications below for more details. Default tags are currently not propagated to ASG created resources so you may wish to inject your default tags into this variable against the relevant child resource types created.
latefinal
-
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
updateDefaultVersion
↔ Output<
bool?> -
Whether to update Default Version each update. Conflicts with
defaultVersion.latefinal -
urn
↔ Output<
String> -
latefinalinherited
-
userData
↔ Output<
String?> -
The base64-encoded user data to provide when launching the instance.
latefinal
-
vpcSecurityGroupIds
↔ Output<
List< String> ?> -
A list of security group IDs to associate with. Conflicts with
network_interfaces.security_groupslatefinal
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
get(
String name, Input< String> id, {LaunchTemplateState? state, CustomResourceOptions? options}) → LaunchTemplate -
Gets an existing LaunchTemplate resource's state with the given
nameandid.