# CfnLaunchTemplateProps

Properties for defining a `CfnLaunchTemplate`.

Extends: CfnLaunchTemplateProps
Used as props by: CfnLaunchTemplate

- Source: Generated code
- Type last changed: v2.39.0 · 25 Aug 2022

## Example

```ts
declare const cluster: eks.Cluster;

const userData = `MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="==MYBOUNDARY=="

--==MYBOUNDARY==
Content-Type: text/x-shellscript; charset="us-ascii"

#!/bin/bash
echo "Running custom user data script"

--==MYBOUNDARY==--\\
`;
const lt = new ec2.CfnLaunchTemplate(this, 'LaunchTemplate', {
  launchTemplateData: {
    instanceType: 't3.small',
    userData: Fn.base64(userData),
  },
});

cluster.addNodegroupCapacity('extra-ng', {
  launchTemplateSpec: {
    id: lt.ref,
    version: lt.attrLatestVersionNumber,
  },
});
```

## Properties

- `launchTemplateData`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnLaunchTemplate.LaunchTemplateDataProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.CfnLaunchTemplate.LaunchTemplateDataProperty.html) (required) — The information for the launch template.

- `launchTemplateName`: string — A name for the launch template.

- `tagSpecifications`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnLaunchTemplate.LaunchTemplateTagSpecificationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.CfnLaunchTemplate.LaunchTemplateTagSpecificationProperty.html)[] — The tags to apply to the launch template on creation.

  To tag the launch template, the resource type must be `launch-template` .

  To specify the tags for resources that are created during instance launch, use [TagSpecifications](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-launchtemplatedata.html#cfn-ec2-launchtemplate-launchtemplatedata-tagspecifications) .

- `versionDescription`: string — A description for the first version of the launch template.
