LaunchTemplate is the Schema for the LaunchTemplates API. Provides an EC2 launch template resource. Can be used to create instances or auto scaling groups.
Type
CRD
Group
ec2.aws.upbound.io
Version
apiVersion: ec2.aws.upbound.io/v1beta1
kind: LaunchTemplate
LaunchTemplateSpec defines the desired state of LaunchTemplate
No description provided.
Specify volumes to attach to the instance besides the volumes specified by the AMI. See Block Devices below for details.
Configure EBS volume properties.
Reference to a Key in kms to populate kmsKeyId.
Policies for referencing.
Selector for a Key in kms to populate kmsKeyId.
Policies for selection.
Targeting for EC2 capacity reservations. See Capacity Reservation Specification below for more details.
Used to target a specific Capacity Reservation:
The CPU options for the instance. See CPU Options below for more details.
Customize the credit specification of the instance. See Credit Specification below for more details.
The elastic GPU to attach to the instance. See Elastic GPU below for more details.
Configuration block containing an Elastic Inference Accelerator to attach to the instance. See Elastic Inference Accelerator below for more details.
Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
The hibernation options for the instance. See Hibernation Options below for more details.
The IAM Instance Profile to launch the instance with. See Instance Profile below for more details.
Reference to a InstanceProfile in iam to populate arn.
Policies for referencing.
Selector for a InstanceProfile in iam to populate arn.
Policies for selection.
Reference to a InstanceProfile in iam to populate name.
Policies for referencing.
Selector for a InstanceProfile in iam to populate name.
Policies for selection.
The market (purchasing) option for the instance. See Market Options below for details.
The options for Spot Instance
The attribute requirements for the type of instance. If present then instance_type cannot be present.
List of accelerator manufacturer names. Default is any manufacturer.
List of accelerator names. Default is any acclerator.
List of accelerator types. Default is any accelerator type.
List of instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes. You can use strings with one or more wild cards, represented by an asterisk (), to allow an instance type, size, or generation. The following are examples: m5.8xlarge, c5., m5a., r*, 3. For example, if you specify c5*, you are allowing the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, you are allowing all the M5a instance types, but not the M5n instance types. Maximum of 400 entries in the list; each entry is limited to 30 characters. Default is all instance types.
List of CPU manufacturer names. Default is any manufacturer.
List of instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge, c5., m5a., r*, 3. For example, if you specify c5*, you are excluding the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, you are excluding all the M5a instance types, but not the M5n instance types. Maximum of 400 entries in the list; each entry is limited to 30 characters. Default is no excluded instance types.
List of instance generation names. Default is any generation.
List of local storage type names. Default any storage type.
A list of license specifications to associate with. See License Specification below for more details.
The maintenance options for the instance. See Maintenance Options below for more details.
Customize the metadata options for the instance. See Metadata Options below for more details.
The monitoring option for the instance. See Monitoring below for more details.
Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
One or more private IPv4 addresses to associate. Conflicts with ipv4_address_count
One or more IPv4 prefixes to be assigned to the network interface. Conflicts with ipv4_prefix_count
One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. Conflicts with ipv6_address_count
One or more IPv6 prefixes to be assigned to the network interface. Conflicts with ipv6_prefix_count
Reference to a NetworkInterface in ec2 to populate networkInterfaceId.
Policies for referencing.
Selector for a NetworkInterface in ec2 to populate networkInterfaceId.
Policies for selection.
References to SecurityGroup in ec2 to populate securityGroups.
Policies for referencing.
Selector for a list of SecurityGroup in ec2 to populate securityGroups.
Policies for selection.
A list of security group IDs to associate.
Reference to a Subnet in ec2 to populate subnetId.
Policies for referencing.
Selector for a Subnet in ec2 to populate subnetId.
Policies for selection.
The placement of the instance. See Placement below for more details.
The options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
References to SecurityGroup in ec2 to populate securityGroupNames.
Policies for referencing.
Selector for a list of SecurityGroup in ec2 to populate securityGroupNames.
Policies for selection.
A list of security group names to associate with. If you are creating Instances in a VPC, use vpc_security_group_ids instead.
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.
References to SecurityGroup in ec2 to populate vpcSecurityGroupIds.
Policies for referencing.
Selector for a list of SecurityGroup in ec2 to populate vpcSecurityGroupIds.
Policies for selection.
A list of security group IDs to associate with. Conflicts with network_interfaces.security_groups
THIS IS A BETA FIELD. It will be honored unless the Management Policies feature flag is disabled. InitProvider holds the same fields as ForProvider, with the exception of Identifier and other resource reference fields. The fields that are in InitProvider are merged into ForProvider when the resource is created. The same fields are also added to the terraform ignore_changes hook, to avoid updating them after creation. This is useful for fields that are required on creation, but we do not desire to update them after creation, for example because of an external controller is managing them, like an autoscaler.
Specify volumes to attach to the instance besides the volumes specified by the AMI. See Block Devices below for details.
Configure EBS volume properties.
Reference to a Key in kms to populate kmsKeyId.
Policies for referencing.
Selector for a Key in kms to populate kmsKeyId.
Policies for selection.
Targeting for EC2 capacity reservations. See Capacity Reservation Specification below for more details.
Used to target a specific Capacity Reservation:
The CPU options for the instance. See CPU Options below for more details.
Customize the credit specification of the instance. See Credit Specification below for more details.
The elastic GPU to attach to the instance. See Elastic GPU below for more details.
Configuration block containing an Elastic Inference Accelerator to attach to the instance. See Elastic Inference Accelerator below for more details.
Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
The hibernation options for the instance. See Hibernation Options below for more details.
The IAM Instance Profile to launch the instance with. See Instance Profile below for more details.
Reference to a InstanceProfile in iam to populate arn.
Policies for referencing.
Selector for a InstanceProfile in iam to populate arn.
Policies for selection.
Reference to a InstanceProfile in iam to populate name.
Policies for referencing.
Selector for a InstanceProfile in iam to populate name.
Policies for selection.
The market (purchasing) option for the instance. See Market Options below for details.
The options for Spot Instance
The attribute requirements for the type of instance. If present then instance_type cannot be present.
List of accelerator manufacturer names. Default is any manufacturer.
List of accelerator names. Default is any acclerator.
List of accelerator types. Default is any accelerator type.
List of instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes. You can use strings with one or more wild cards, represented by an asterisk (), to allow an instance type, size, or generation. The following are examples: m5.8xlarge, c5., m5a., r*, 3. For example, if you specify c5*, you are allowing the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, you are allowing all the M5a instance types, but not the M5n instance types. Maximum of 400 entries in the list; each entry is limited to 30 characters. Default is all instance types.
List of CPU manufacturer names. Default is any manufacturer.
List of instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge, c5., m5a., r*, 3. For example, if you specify c5*, you are excluding the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, you are excluding all the M5a instance types, but not the M5n instance types. Maximum of 400 entries in the list; each entry is limited to 30 characters. Default is no excluded instance types.
List of instance generation names. Default is any generation.
List of local storage type names. Default any storage type.
A list of license specifications to associate with. See License Specification below for more details.
The maintenance options for the instance. See Maintenance Options below for more details.
Customize the metadata options for the instance. See Metadata Options below for more details.
The monitoring option for the instance. See Monitoring below for more details.
Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
One or more private IPv4 addresses to associate. Conflicts with ipv4_address_count
One or more IPv4 prefixes to be assigned to the network interface. Conflicts with ipv4_prefix_count
One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. Conflicts with ipv6_address_count
One or more IPv6 prefixes to be assigned to the network interface. Conflicts with ipv6_prefix_count
Reference to a NetworkInterface in ec2 to populate networkInterfaceId.
Policies for referencing.
Selector for a NetworkInterface in ec2 to populate networkInterfaceId.
Policies for selection.
References to SecurityGroup in ec2 to populate securityGroups.
Policies for referencing.
Selector for a list of SecurityGroup in ec2 to populate securityGroups.
Policies for selection.
A list of security group IDs to associate.
Reference to a Subnet in ec2 to populate subnetId.
Policies for referencing.
Selector for a Subnet in ec2 to populate subnetId.
Policies for selection.
The placement of the instance. See Placement below for more details.
The options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
References to SecurityGroup in ec2 to populate securityGroupNames.
Policies for referencing.
Selector for a list of SecurityGroup in ec2 to populate securityGroupNames.
Policies for selection.
A list of security group names to associate with. If you are creating Instances in a VPC, use vpc_security_group_ids instead.
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.
References to SecurityGroup in ec2 to populate vpcSecurityGroupIds.
Policies for referencing.
Selector for a list of SecurityGroup in ec2 to populate vpcSecurityGroupIds.
Policies for selection.
A list of security group IDs to associate with. Conflicts with network_interfaces.security_groups
THIS IS A BETA FIELD. It is on by default but can be opted out through a Crossplane feature flag. ManagementPolicies specify the array of actions Crossplane is allowed to take on the managed and external resources. This field is planned to replace the DeletionPolicy field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. If both are custom, the DeletionPolicy field will be ignored. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md
ProviderConfigReference specifies how the provider that will be used to create, observe, update, and delete this managed resource should be configured.
Policies for referencing.
PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret store config to which any connection details for this managed resource should be written. Connection details frequently include the endpoint, username, and password required to connect to the managed resource.
WriteConnectionSecretToReference specifies the namespace and name of a Secret to which any connection details for this managed resource should be written. Connection details frequently include the endpoint, username, and password required to connect to the managed resource. This field is planned to be replaced in a future release in favor of PublishConnectionDetailsTo. Currently, both could be set independently and connection details would be published to both without affecting each other.
LaunchTemplateStatus defines the observed state of LaunchTemplate.
No description provided.
Specify volumes to attach to the instance besides the volumes specified by the AMI. See Block Devices below for details.
Configure EBS volume properties.
Targeting for EC2 capacity reservations. See Capacity Reservation Specification below for more details.
Used to target a specific Capacity Reservation:
The CPU options for the instance. See CPU Options below for more details.
Customize the credit specification of the instance. See Credit Specification below for more details.
The elastic GPU to attach to the instance. See Elastic GPU below for more details.
Configuration block containing an Elastic Inference Accelerator to attach to the instance. See Elastic Inference Accelerator below for more details.
Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
The hibernation options for the instance. See Hibernation Options below for more details.
The market (purchasing) option for the instance. See Market Options below for details.
The options for Spot Instance
The attribute requirements for the type of instance. If present then instance_type cannot be present.
List of accelerator manufacturer names. Default is any manufacturer.
List of accelerator names. Default is any acclerator.
List of accelerator types. Default is any accelerator type.
List of instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes. You can use strings with one or more wild cards, represented by an asterisk (), to allow an instance type, size, or generation. The following are examples: m5.8xlarge, c5., m5a., r*, 3. For example, if you specify c5*, you are allowing the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, you are allowing all the M5a instance types, but not the M5n instance types. Maximum of 400 entries in the list; each entry is limited to 30 characters. Default is all instance types.
List of CPU manufacturer names. Default is any manufacturer.
List of instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge, c5., m5a., r*, 3. For example, if you specify c5*, you are excluding the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, you are excluding all the M5a instance types, but not the M5n instance types. Maximum of 400 entries in the list; each entry is limited to 30 characters. Default is no excluded instance types.
List of instance generation names. Default is any generation.
List of local storage type names. Default any storage type.
A list of license specifications to associate with. See License Specification below for more details.
The maintenance options for the instance. See Maintenance Options below for more details.
Customize the metadata options for the instance. See Metadata Options below for more details.
The monitoring option for the instance. See Monitoring below for more details.
Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
One or more private IPv4 addresses to associate. Conflicts with ipv4_address_count
One or more IPv4 prefixes to be assigned to the network interface. Conflicts with ipv4_prefix_count
One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. Conflicts with ipv6_address_count
One or more IPv6 prefixes to be assigned to the network interface. Conflicts with ipv6_prefix_count
A list of security group IDs to associate.
The placement of the instance. See Placement below for more details.
The options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
A list of security group names to associate with. If you are creating Instances in a VPC, use vpc_security_group_ids instead.
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.
A list of security group IDs to associate with. Conflicts with network_interfaces.security_groups
Conditions of the resource.
example
apiVersion: ec2.aws.upbound.io/v1beta1
kind: LaunchTemplate
metadata:
name: example
spec:
forProvider:
blockDeviceMappings:
- deviceName: /dev/sda1
ebs:
- volumeSize: 20
capacityReservationSpecification:
- capacityReservationPreference: open
cpuOptions:
- coreCount: 4
threadsPerCore: 2
creditSpecification:
- cpuCredits: standard
disableApiTermination: true
ebsOptimized: "true"
instanceInitiatedShutdownBehavior: terminate
instanceMarketOptions:
- marketType: spot
instanceType: t2.micro
keyName: test
metadataOptions:
- httpEndpoint: enabled
httpPutResponseHopLimit: 1
httpTokens: required
instanceMetadataTags: enabled
monitoring:
- enabled: true
name: foo
networkInterfaces:
- associatePublicIpAddress: "true"
placement:
- availabilityZone: us-west-2a
region: us-west-1
tagSpecifications:
- resourceType: instance
tags:
Name: test
updateDefaultVersion: true
example-encrypted
apiVersion: ec2.aws.upbound.io/v1beta1
kind: LaunchTemplate
metadata:
name: example-encrypted
spec:
forProvider:
blockDeviceMappings:
- deviceName: /dev/sda1
ebs:
- encrypted: "true"
kmsKeyIdSelector:
matchLabels:
testing.upbound.io/example-name: launchtemplate-key
volumeSize: 20
capacityReservationSpecification:
- capacityReservationPreference: open
cpuOptions:
- coreCount: 4
threadsPerCore: 2
creditSpecification:
- cpuCredits: standard
disableApiTermination: true
ebsOptimized: "true"
elasticGpuSpecifications:
- type: test
elasticInferenceAccelerator:
- type: eia1.medium
instanceInitiatedShutdownBehavior: terminate
instanceMarketOptions:
- marketType: spot
instanceType: t2.micro
keyName: test
metadataOptions:
- httpEndpoint: enabled
httpPutResponseHopLimit: 1
httpTokens: required
instanceMetadataTags: enabled
monitoring:
- enabled: true
name: foo
networkInterfaces:
- associatePublicIpAddress: "true"
placement:
- availabilityZone: us-west-2a
region: us-west-1
tagSpecifications:
- resourceType: instance
tags:
Name: test
© 2022 Upbound, Inc.
Discover the building blocksfor your internal cloud platform.