Skip to content

Commit

Permalink
chore: updated field docs about allowed launch template and AMI type …
Browse files Browse the repository at this point in the history
…combinations
  • Loading branch information
Artemigos committed Aug 12, 2024
1 parent 57e282f commit 37adee8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion packages/aws-cdk-lib/aws-eks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,8 @@ cluster.addNodegroupCapacity('custom-node-group', {
});
```

To use a custom AMI for the node group, you can set `amiType` to `eks.NodegroupAmiType.CUSTOM` and provide a launch template.
To use a custom AMI for the node group, you can set `amiType` to `CUSTOM`.
A launch template must be provided.

```ts
declare const cluster: eks.Cluster;
Expand Down
8 changes: 5 additions & 3 deletions packages/aws-cdk-lib/aws-eks/lib/managed-nodegroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ export interface NodegroupOptions {
*/
readonly subnets?: SubnetSelection;
/**
* The AMI type for your node group. If you explicitly specify the launchTemplate with custom AMI, do not specify this property, or
* the node group deployment will fail. In other cases, you will need to specify correct amiType for the nodegroup.
* The AMI type for your node group. If you explicitly specify the launchTemplate with custom AMI, either set this property to `CUSTOM` or leave
* it undefined, otherwise the node group deployment will fail. In other cases, you will need to specify correct amiType for the nodegroup.
*
* @default - auto-determined from the instanceTypes property when launchTemplateSpec property is not specified
*/
Expand Down Expand Up @@ -296,7 +296,9 @@ export interface NodegroupOptions {
*/
readonly tags?: { [name: string]: string };
/**
* Launch template specification used for the nodegroup
* Launch template specification used for the nodegroup.
* Required when `amiType` is set to `CUSTOM`.
*
* @see https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html
* @default - no launch template
*/
Expand Down

0 comments on commit 37adee8

Please sign in to comment.