AwsLaunchTemplateArgs
interface AwsLaunchTemplateArgs extends Omit<aws.ec2.LaunchTemplateArgs, 'blockDeviceMappings' | 'imageId' | 'metadataOptions' | 'name' | 'namePrefix' | 'networkInterfaces' | 'secondaryInterfaces' | 'region' | 'tagSpecifications' | 'tags' | 'defaultVersion' | 'updateDefaultVersion' | 'userData'> {
blockDeviceMappings?: Input<Input<AwsLaunchTemplateBlockDeviceMappingArgs>[]>;
capacityReservationSpecification?: Input<LaunchTemplateCapacityReservationSpecification | undefined>;
cpuOptions?: Input<LaunchTemplateCpuOptions | undefined>;
creditSpecification?: Input<LaunchTemplateCreditSpecification | undefined>;
description?: Input<string | undefined>;
disableApiStop?: Input<boolean | undefined>;
disableApiTermination?: Input<boolean | undefined>;
ebsOptimized?: Input<string | undefined>;
enclaveOptions?: Input<LaunchTemplateEnclaveOptions | undefined>;
hibernationOptions?: Input<LaunchTemplateHibernationOptions | undefined>;
iamInstanceProfile?: Input<LaunchTemplateIamInstanceProfile | undefined>;
imageId: AwsLaunchTemplateImageId;
instanceInitiatedShutdownBehavior?: Input<string | undefined>;
instanceMarketOptions?: Input<LaunchTemplateInstanceMarketOptions | undefined>;
instanceRequirements?: Input<LaunchTemplateInstanceRequirements | undefined>;
instanceType?: Input<string | undefined>;
kernelId?: Input<string | undefined>;
keyName?: Input<string | undefined>;
licenseSpecifications?: Input<Input<LaunchTemplateLicenseSpecification>[] | undefined>;
maintenanceOptions?: Input<LaunchTemplateMaintenanceOptions | undefined>;
metadataOptions?: AwsLaunchTemplateMetadataOptionsArgs;
monitoring?: Input<LaunchTemplateMonitoring | undefined>;
name: string;
networkPerformanceOptions?: Input<LaunchTemplateNetworkPerformanceOptions | undefined>;
placement?: Input<LaunchTemplatePlacement | undefined>;
privateDnsNameOptions?: Input<LaunchTemplatePrivateDnsNameOptions | undefined>;
ramDiskId?: Input<string | undefined>;
region?: string;
securityGroupNames?: Input<Input<string>[] | undefined>;
tags?: Input<Record<string, Input<string>>>;
userDataRaw?: Input<string>;
vpcSecurityGroupIds?: Input<Input<string>[] | undefined>;
}Input arguments for AwsLaunchTemplate.
Remarks
name is a required camelCase purpose. It becomes the AWS name using stackAndPurpose, ${env}-${projectHash}-${purpose}. AWS limits launch-template names to 128 characters, so name is limited to 115 characters in the default runtime context prefix.
The component always requires IMDSv2, constructs an encrypted mapping for the resolved AMI root device, enables encryption on additional EBS mappings, and updates the default template version after each change. Network-interface configuration is intentionally unsupported, preventing a template from requesting public addressing. Both ECS image selectors require instanceType so the component can select a compatible AMI; the GPU selector requires an x86_64 type with a GPU. userDataRaw is encoded by the component; do not pre-encode it.
Example
const workers = new AwsLaunchTemplate({
name: 'ecsWorkers',
imageId: { kind: 'ecsLatest' },
instanceType: 'm7g.large',
iamInstanceProfile: { name: 'ecs-instance-profile' },
userDataRaw: '#!/bin/bash\necho ready',
});Hierarchy
LaunchTemplateArgs, "blockDeviceMappings" | "imageId" | "metadataOptions" | "name" | "namePrefix" | "networkInterfaces" | "secondaryInterfaces" | "region" | "tagSpecifications" | "tags" | "defaultVersion" | "updateDefaultVersion" | "userData">AwsLaunchTemplateArgs
Properties
blockDeviceMappings: Input<Input<AwsLaunchTemplateBlockDeviceMappingArgs>[]>
Additional EBS mappings with mandatory encryption. The AMI root mapping is always constructed and encrypted.
capacityReservationSpecification: Input<LaunchTemplateCapacityReservationSpecification | undefined>
Inherited from capacityReservationSpecification
Targeting for EC2 capacity reservations. See Capacity Reservation Specification below for more details.
cpuOptions: Input<LaunchTemplateCpuOptions | undefined>
Inherited from cpuOptions
The CPU options for the instance. See CPU Options below for more details.
creditSpecification: Input<LaunchTemplateCreditSpecification | undefined>
Inherited from creditSpecification
Customize the credit specification of the instance. See Credit Specification below for more details.
description: Input<string | undefined>
Inherited from description
Description of the launch template version (VersionDescription in 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.
disableApiStop: Input<boolean | undefined>
Inherited from disableApiStop
If true, enables EC2 Instance Stop Protection.
disableApiTermination: Input<boolean | undefined>
Inherited from disableApiTermination
If true, enables EC2 Instance Termination Protection
ebsOptimized: Input<string | undefined>
Inherited from ebsOptimized
If true, the launched EC2 instance will be EBS-optimized.
enclaveOptions: Input<LaunchTemplateEnclaveOptions | undefined>
Inherited from enclaveOptions
Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
hibernationOptions: Input<LaunchTemplateHibernationOptions | undefined>
Inherited from hibernationOptions
The hibernation options for the instance. See Hibernation Options below for more details.
iamInstanceProfile: Input<LaunchTemplateIamInstanceProfile | undefined>
Inherited from iamInstanceProfile
The IAM Instance Profile to launch the instance with. See Instance Profile below for more details.
imageId: AwsLaunchTemplateImageId
Direct AMI identifier or an AWS-managed ECS image selector. ECS selectors require instanceType.
instanceInitiatedShutdownBehavior: Input<string | undefined>
Inherited from instanceInitiatedShutdownBehavior
Shutdown behavior for the instance. Can be stop or terminate. (Default: stop).
instanceMarketOptions: Input<LaunchTemplateInstanceMarketOptions | undefined>
Inherited from instanceMarketOptions
The market (purchasing) option for the instance. See Market Options below for details.
instanceRequirements: Input<LaunchTemplateInstanceRequirements | undefined>
Inherited from instanceRequirements
The attribute requirements for the type of instance. If present then instanceType cannot be present.
instanceType: Input<string | undefined>
Inherited from instanceType
The type of the instance. If present then instanceRequirements cannot be present.
kernelId: Input<string | undefined>
Inherited from kernelId
The kernel ID.
keyName: Input<string | undefined>
Inherited from keyName
The key name to use for the instance.
licenseSpecifications: Input<Input<LaunchTemplateLicenseSpecification>[] | undefined>
Inherited from licenseSpecifications
A list of license specifications to associate with. See License Specification below for more details.
maintenanceOptions: Input<LaunchTemplateMaintenanceOptions | undefined>
Inherited from maintenanceOptions
The maintenance options for the instance. See Maintenance Options below for more details.
metadataOptions: AwsLaunchTemplateMetadataOptionsArgs
Safe IMDS settings; IMDSv2 is always required.
monitoring: Input<LaunchTemplateMonitoring | undefined>
Inherited from monitoring
The monitoring option for the instance. See Monitoring below for more details.
name: string
Required camelCase purpose used for the component identity and AWS launch-template name.
networkPerformanceOptions: Input<LaunchTemplateNetworkPerformanceOptions | undefined>
Inherited from networkPerformanceOptions
placement: Input<LaunchTemplatePlacement | undefined>
Inherited from placement
The placement of the instance. See Placement below for more details.
privateDnsNameOptions: Input<LaunchTemplatePrivateDnsNameOptions | undefined>
Inherited from privateDnsNameOptions
The options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
ramDiskId: Input<string | undefined>
Inherited from ramDiskId
The ID of the RAM disk.
region: string
AWS Region used for the launch template and all image lookups. Must be a synchronous non-empty string when set.
Default: ```ts The selected AWS provider's region. ```
securityGroupNames: Input<Input<string>[] | undefined>
Inherited from securityGroupNames
A list of security group names to associate with. If you are creating Instances in a VPC, use vpcSecurityGroupIds instead.
tags: Input<Record<string, Input<string>>>
Tags applied to the launch template and its instances, EBS volumes, network interfaces, and Spot requests. Consumer values take precedence for matching keys.
Default: `jobcloud:project` and `jobcloud:env` tags derived from the Pulumi project and stack.
userDataRaw: Input<string>
Plain-text initialisation data encoded to base64 by the component.
vpcSecurityGroupIds: Input<Input<string>[] | undefined>
Inherited from vpcSecurityGroupIds
A list of security group IDs to associate with. Conflicts with network_interfaces.security_groups