NodeGroup

Manages an EKS Node Group, which can provision and optionally update an Auto Scaling Group of Kubernetes worker nodes compatible with EKS. Additional documentation about this functionality can be found in the EKS User Guide.

Example Usage

using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.Eks.NodeGroup("example", new Aws.Eks.NodeGroupArgs
        {
            ClusterName = aws_eks_cluster.Example.Name,
            NodeRoleArn = aws_iam_role.Example.Arn,
            SubnetIds = aws_subnet.Example.Select(__item => __item.Id).ToList(),
            ScalingConfig = new Aws.Eks.Inputs.NodeGroupScalingConfigArgs
            {
                DesiredSize = 1,
                MaxSize = 1,
                MinSize = 1,
            },
        }, new CustomResourceOptions
        {
            DependsOn = 
            {
                aws_iam_role_policy_attachment.Example_AmazonEKSWorkerNodePolicy,
                aws_iam_role_policy_attachment.Example_AmazonEKS_CNI_Policy,
                aws_iam_role_policy_attachment.Example_AmazonEC2ContainerRegistryReadOnly,
            },
        });
    }

}

Coming soon!

import pulumi
import pulumi_aws as aws

example = aws.eks.NodeGroup("example",
    cluster_name=aws_eks_cluster["example"]["name"],
    node_role_arn=aws_iam_role["example"]["arn"],
    subnet_ids=[__item["id"] for __item in aws_subnet["example"]],
    scaling_config=aws.eks.NodeGroupScalingConfigArgs(
        desired_size=1,
        max_size=1,
        min_size=1,
    ),
    opts=pulumi.ResourceOptions(depends_on=[
            aws_iam_role_policy_attachment["example-AmazonEKSWorkerNodePolicy"],
            aws_iam_role_policy_attachment["example-AmazonEKS_CNI_Policy"],
            aws_iam_role_policy_attachment["example-AmazonEC2ContainerRegistryReadOnly"],
        ]))
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.eks.NodeGroup("example", {
    clusterName: aws_eks_cluster.example.name,
    nodeRoleArn: aws_iam_role.example.arn,
    subnetIds: aws_subnet.example.map(__item => __item.id),
    scalingConfig: {
        desiredSize: 1,
        maxSize: 1,
        minSize: 1,
    },
}, {
    dependsOn: [
        aws_iam_role_policy_attachment["example-AmazonEKSWorkerNodePolicy"],
        aws_iam_role_policy_attachment["example-AmazonEKS_CNI_Policy"],
        aws_iam_role_policy_attachment["example-AmazonEC2ContainerRegistryReadOnly"],
    ],
});

Ignoring Changes to Desired Size

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        // ... other configurations ...
        var example = new Aws.Eks.NodeGroup("example", new Aws.Eks.NodeGroupArgs
        {
            ScalingConfig = new Aws.Eks.Inputs.NodeGroupScalingConfigArgs
            {
                DesiredSize = 2,
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/eks"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := eks.NewNodeGroup(ctx, "example", &eks.NodeGroupArgs{
			ScalingConfig: &eks.NodeGroupScalingConfigArgs{
				DesiredSize: pulumi.Int(2),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_aws as aws

# ... other configurations ...
example = aws.eks.NodeGroup("example", scaling_config=aws.eks.NodeGroupScalingConfigArgs(
    desired_size=2,
))
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

// ... other configurations ...
const example = new aws.eks.NodeGroup("example", {scalingConfig: {
    desiredSize: 2,
}});

Example IAM Role for EKS Node Group

using System.Collections.Generic;
using System.Text.Json;
using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.Iam.Role("example", new Aws.Iam.RoleArgs
        {
            AssumeRolePolicy = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                { "Statement", new[]
                    {
                        new Dictionary<string, object?>
                        {
                            { "Action", "sts:AssumeRole" },
                            { "Effect", "Allow" },
                            { "Principal", new Dictionary<string, object?>
                            {
                                { "Service", "ec2.amazonaws.com" },
                            } },
                        },
                    }
                 },
                { "Version", "2012-10-17" },
            }),
        });
        var example_AmazonEKSWorkerNodePolicy = new Aws.Iam.RolePolicyAttachment("example-AmazonEKSWorkerNodePolicy", new Aws.Iam.RolePolicyAttachmentArgs
        {
            PolicyArn = "arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy",
            Role = example.Name,
        });
        var example_AmazonEKSCNIPolicy = new Aws.Iam.RolePolicyAttachment("example-AmazonEKSCNIPolicy", new Aws.Iam.RolePolicyAttachmentArgs
        {
            PolicyArn = "arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy",
            Role = example.Name,
        });
        var example_AmazonEC2ContainerRegistryReadOnly = new Aws.Iam.RolePolicyAttachment("example-AmazonEC2ContainerRegistryReadOnly", new Aws.Iam.RolePolicyAttachmentArgs
        {
            PolicyArn = "arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly",
            Role = example.Name,
        });
    }

}
package main

import (
	"encoding/json"

	"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/iam"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		tmpJSON0, err := json.Marshal(map[string]interface{}{
			"Statement": []map[string]interface{}{
				map[string]interface{}{
					"Action": "sts:AssumeRole",
					"Effect": "Allow",
					"Principal": map[string]interface{}{
						"Service": "ec2.amazonaws.com",
					},
				},
			},
			"Version": "2012-10-17",
		})
		if err != nil {
			return err
		}
		json0 := string(tmpJSON0)
		example, err := iam.NewRole(ctx, "example", &iam.RoleArgs{
			AssumeRolePolicy: pulumi.String(json0),
		})
		if err != nil {
			return err
		}
		_, err = iam.NewRolePolicyAttachment(ctx, "example_AmazonEKSWorkerNodePolicy", &iam.RolePolicyAttachmentArgs{
			PolicyArn: pulumi.String("arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy"),
			Role:      example.Name,
		})
		if err != nil {
			return err
		}
		_, err = iam.NewRolePolicyAttachment(ctx, "example_AmazonEKSCNIPolicy", &iam.RolePolicyAttachmentArgs{
			PolicyArn: pulumi.String("arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy"),
			Role:      example.Name,
		})
		if err != nil {
			return err
		}
		_, err = iam.NewRolePolicyAttachment(ctx, "example_AmazonEC2ContainerRegistryReadOnly", &iam.RolePolicyAttachmentArgs{
			PolicyArn: pulumi.String("arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly"),
			Role:      example.Name,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import json
import pulumi_aws as aws

example = aws.iam.Role("example", assume_role_policy=json.dumps({
    "Statement": [{
        "Action": "sts:AssumeRole",
        "Effect": "Allow",
        "Principal": {
            "Service": "ec2.amazonaws.com",
        },
    }],
    "Version": "2012-10-17",
}))
example__amazon_eks_worker_node_policy = aws.iam.RolePolicyAttachment("example-AmazonEKSWorkerNodePolicy",
    policy_arn="arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy",
    role=example.name)
example__amazon_ekscni_policy = aws.iam.RolePolicyAttachment("example-AmazonEKSCNIPolicy",
    policy_arn="arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy",
    role=example.name)
example__amazon_ec2_container_registry_read_only = aws.iam.RolePolicyAttachment("example-AmazonEC2ContainerRegistryReadOnly",
    policy_arn="arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly",
    role=example.name)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.iam.Role("example", {assumeRolePolicy: JSON.stringify({
    Statement: [{
        Action: "sts:AssumeRole",
        Effect: "Allow",
        Principal: {
            Service: "ec2.amazonaws.com",
        },
    }],
    Version: "2012-10-17",
})});
const example_AmazonEKSWorkerNodePolicy = new aws.iam.RolePolicyAttachment("example-AmazonEKSWorkerNodePolicy", {
    policyArn: "arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy",
    role: example.name,
});
const example_AmazonEKSCNIPolicy = new aws.iam.RolePolicyAttachment("example-AmazonEKSCNIPolicy", {
    policyArn: "arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy",
    role: example.name,
});
const example_AmazonEC2ContainerRegistryReadOnly = new aws.iam.RolePolicyAttachment("example-AmazonEC2ContainerRegistryReadOnly", {
    policyArn: "arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly",
    role: example.name,
});

Create a NodeGroup Resource

new NodeGroup(name: string, args: NodeGroupArgs, opts?: CustomResourceOptions);
@overload
def NodeGroup(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              ami_type: Optional[str] = None,
              capacity_type: Optional[str] = None,
              cluster_name: Optional[str] = None,
              disk_size: Optional[int] = None,
              force_update_version: Optional[bool] = None,
              instance_types: Optional[Sequence[str]] = None,
              labels: Optional[Mapping[str, str]] = None,
              launch_template: Optional[NodeGroupLaunchTemplateArgs] = None,
              node_group_name: Optional[str] = None,
              node_role_arn: Optional[str] = None,
              release_version: Optional[str] = None,
              remote_access: Optional[NodeGroupRemoteAccessArgs] = None,
              scaling_config: Optional[NodeGroupScalingConfigArgs] = None,
              subnet_ids: Optional[Sequence[str]] = None,
              tags: Optional[Mapping[str, str]] = None,
              version: Optional[str] = None)
@overload
def NodeGroup(resource_name: str,
              args: NodeGroupArgs,
              opts: Optional[ResourceOptions] = None)
func NewNodeGroup(ctx *Context, name string, args NodeGroupArgs, opts ...ResourceOption) (*NodeGroup, error)
public NodeGroup(string name, NodeGroupArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args NodeGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args NodeGroupArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args NodeGroupArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args NodeGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

NodeGroup Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The NodeGroup resource accepts the following input properties:

ClusterName string
Name of the EKS Cluster.
NodeRoleArn string
Amazon Resource Name (ARN) of the IAM Role that provides permissions for the EKS Node Group.
ScalingConfig NodeGroupScalingConfigArgs
Configuration block with scaling settings. Detailed below.
SubnetIds List<string>
Identifiers of EC2 Subnets to associate with the EKS Node Group. These subnets must have the following resource tag: kubernetes.io/cluster/CLUSTER_NAME (where CLUSTER_NAME is replaced with the name of the EKS Cluster).
AmiType string
Type of Amazon Machine Image (AMI) associated with the EKS Node Group. Defaults to AL2_x86_64. Valid values: AL2_x86_64, AL2_x86_64_GPU, AL2_ARM_64. This provider will only perform drift detection if a configuration value is provided.
CapacityType string
Type of capacity associated with the EKS Node Group. Valid values: ON_DEMAND, SPOT. This provider will only perform drift detection if a configuration value is provided.
DiskSize int
Disk size in GiB for worker nodes. Defaults to 20. This provider will only perform drift detection if a configuration value is provided.
ForceUpdateVersion bool
Force version update if existing pods are unable to be drained due to a pod disruption budget issue.
InstanceTypes List<string>
List of instance types associated with the EKS Node Group. Defaults to ["t3.medium"]. This provider will only perform drift detection if a configuration value is provided.
Labels Dictionary<string, string>
Key-value map of Kubernetes labels. Only labels that are applied with the EKS API are managed by this argument. Other Kubernetes labels applied to the EKS Node Group will not be managed.
LaunchTemplate NodeGroupLaunchTemplateArgs
Configuration block with Launch Template settings. Detailed below.
NodeGroupName string
Name of the EKS Node Group.
ReleaseVersion string
AMI version of the EKS Node Group. Defaults to latest version for Kubernetes version.
RemoteAccess NodeGroupRemoteAccessArgs
Configuration block with remote access settings. Detailed below.
Tags Dictionary<string, string>
Key-value mapping of resource tags.
Version string
EC2 Launch Template version number. While the API accepts values like $Default and $Latest, the API will convert the value to the associated version number (e.g. 1) on read and This provider will show a difference on next plan. Using the default_version or latest_version attribute of the aws.ec2.LaunchTemplate resource or data source is recommended for this argument.
ClusterName string
Name of the EKS Cluster.
NodeRoleArn string
Amazon Resource Name (ARN) of the IAM Role that provides permissions for the EKS Node Group.
ScalingConfig NodeGroupScalingConfig
Configuration block with scaling settings. Detailed below.
SubnetIds []string
Identifiers of EC2 Subnets to associate with the EKS Node Group. These subnets must have the following resource tag: kubernetes.io/cluster/CLUSTER_NAME (where CLUSTER_NAME is replaced with the name of the EKS Cluster).
AmiType string
Type of Amazon Machine Image (AMI) associated with the EKS Node Group. Defaults to AL2_x86_64. Valid values: AL2_x86_64, AL2_x86_64_GPU, AL2_ARM_64. This provider will only perform drift detection if a configuration value is provided.
CapacityType string
Type of capacity associated with the EKS Node Group. Valid values: ON_DEMAND, SPOT. This provider will only perform drift detection if a configuration value is provided.
DiskSize int
Disk size in GiB for worker nodes. Defaults to 20. This provider will only perform drift detection if a configuration value is provided.
ForceUpdateVersion bool
Force version update if existing pods are unable to be drained due to a pod disruption budget issue.
InstanceTypes []string
List of instance types associated with the EKS Node Group. Defaults to ["t3.medium"]. This provider will only perform drift detection if a configuration value is provided.
Labels map[string]string
Key-value map of Kubernetes labels. Only labels that are applied with the EKS API are managed by this argument. Other Kubernetes labels applied to the EKS Node Group will not be managed.
LaunchTemplate NodeGroupLaunchTemplate
Configuration block with Launch Template settings. Detailed below.
NodeGroupName string
Name of the EKS Node Group.
ReleaseVersion string
AMI version of the EKS Node Group. Defaults to latest version for Kubernetes version.
RemoteAccess NodeGroupRemoteAccess
Configuration block with remote access settings. Detailed below.
Tags map[string]string
Key-value mapping of resource tags.
Version string
EC2 Launch Template version number. While the API accepts values like $Default and $Latest, the API will convert the value to the associated version number (e.g. 1) on read and This provider will show a difference on next plan. Using the default_version or latest_version attribute of the aws.ec2.LaunchTemplate resource or data source is recommended for this argument.
clusterName string
Name of the EKS Cluster.
nodeRoleArn string
Amazon Resource Name (ARN) of the IAM Role that provides permissions for the EKS Node Group.
scalingConfig NodeGroupScalingConfigArgs
Configuration block with scaling settings. Detailed below.
subnetIds string[]
Identifiers of EC2 Subnets to associate with the EKS Node Group. These subnets must have the following resource tag: kubernetes.io/cluster/CLUSTER_NAME (where CLUSTER_NAME is replaced with the name of the EKS Cluster).
amiType string
Type of Amazon Machine Image (AMI) associated with the EKS Node Group. Defaults to AL2_x86_64. Valid values: AL2_x86_64, AL2_x86_64_GPU, AL2_ARM_64. This provider will only perform drift detection if a configuration value is provided.
capacityType string
Type of capacity associated with the EKS Node Group. Valid values: ON_DEMAND, SPOT. This provider will only perform drift detection if a configuration value is provided.
diskSize number
Disk size in GiB for worker nodes. Defaults to 20. This provider will only perform drift detection if a configuration value is provided.
forceUpdateVersion boolean
Force version update if existing pods are unable to be drained due to a pod disruption budget issue.
instanceTypes string[]
List of instance types associated with the EKS Node Group. Defaults to ["t3.medium"]. This provider will only perform drift detection if a configuration value is provided.
labels {[key: string]: string}
Key-value map of Kubernetes labels. Only labels that are applied with the EKS API are managed by this argument. Other Kubernetes labels applied to the EKS Node Group will not be managed.
launchTemplate NodeGroupLaunchTemplateArgs
Configuration block with Launch Template settings. Detailed below.
nodeGroupName string
Name of the EKS Node Group.
releaseVersion string
AMI version of the EKS Node Group. Defaults to latest version for Kubernetes version.
remoteAccess NodeGroupRemoteAccessArgs
Configuration block with remote access settings. Detailed below.
tags {[key: string]: string}
Key-value mapping of resource tags.
version string
EC2 Launch Template version number. While the API accepts values like $Default and $Latest, the API will convert the value to the associated version number (e.g. 1) on read and This provider will show a difference on next plan. Using the default_version or latest_version attribute of the aws.ec2.LaunchTemplate resource or data source is recommended for this argument.
cluster_name str
Name of the EKS Cluster.
node_role_arn str
Amazon Resource Name (ARN) of the IAM Role that provides permissions for the EKS Node Group.
scaling_config NodeGroupScalingConfigArgs
Configuration block with scaling settings. Detailed below.
subnet_ids Sequence[str]
Identifiers of EC2 Subnets to associate with the EKS Node Group. These subnets must have the following resource tag: kubernetes.io/cluster/CLUSTER_NAME (where CLUSTER_NAME is replaced with the name of the EKS Cluster).
ami_type str
Type of Amazon Machine Image (AMI) associated with the EKS Node Group. Defaults to AL2_x86_64. Valid values: AL2_x86_64, AL2_x86_64_GPU, AL2_ARM_64. This provider will only perform drift detection if a configuration value is provided.
capacity_type str
Type of capacity associated with the EKS Node Group. Valid values: ON_DEMAND, SPOT. This provider will only perform drift detection if a configuration value is provided.
disk_size int
Disk size in GiB for worker nodes. Defaults to 20. This provider will only perform drift detection if a configuration value is provided.
force_update_version bool
Force version update if existing pods are unable to be drained due to a pod disruption budget issue.
instance_types Sequence[str]
List of instance types associated with the EKS Node Group. Defaults to ["t3.medium"]. This provider will only perform drift detection if a configuration value is provided.
labels Mapping[str, str]
Key-value map of Kubernetes labels. Only labels that are applied with the EKS API are managed by this argument. Other Kubernetes labels applied to the EKS Node Group will not be managed.
launch_template NodeGroupLaunchTemplateArgs
Configuration block with Launch Template settings. Detailed below.
node_group_name str
Name of the EKS Node Group.
release_version str
AMI version of the EKS Node Group. Defaults to latest version for Kubernetes version.
remote_access NodeGroupRemoteAccessArgs
Configuration block with remote access settings. Detailed below.
tags Mapping[str, str]
Key-value mapping of resource tags.
version str
EC2 Launch Template version number. While the API accepts values like $Default and $Latest, the API will convert the value to the associated version number (e.g. 1) on read and This provider will show a difference on next plan. Using the default_version or latest_version attribute of the aws.ec2.LaunchTemplate resource or data source is recommended for this argument.

Outputs

All input properties are implicitly available as output properties. Additionally, the NodeGroup resource produces the following output properties:

Arn string
Amazon Resource Name (ARN) of the EKS Node Group.
Id string
The provider-assigned unique ID for this managed resource.
Resources List<NodeGroupResource>
List of objects containing information about underlying resources.
Status string
Status of the EKS Node Group.
Arn string
Amazon Resource Name (ARN) of the EKS Node Group.
Id string
The provider-assigned unique ID for this managed resource.
Resources []NodeGroupResource
List of objects containing information about underlying resources.
Status string
Status of the EKS Node Group.
arn string
Amazon Resource Name (ARN) of the EKS Node Group.
id string
The provider-assigned unique ID for this managed resource.
resources NodeGroupResource[]
List of objects containing information about underlying resources.
status string
Status of the EKS Node Group.
arn str
Amazon Resource Name (ARN) of the EKS Node Group.
id str
The provider-assigned unique ID for this managed resource.
resources Sequence[NodeGroupResource]
List of objects containing information about underlying resources.
status str
Status of the EKS Node Group.

Look up an Existing NodeGroup Resource

Get an existing NodeGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: NodeGroupState, opts?: CustomResourceOptions): NodeGroup
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        ami_type: Optional[str] = None,
        arn: Optional[str] = None,
        capacity_type: Optional[str] = None,
        cluster_name: Optional[str] = None,
        disk_size: Optional[int] = None,
        force_update_version: Optional[bool] = None,
        instance_types: Optional[Sequence[str]] = None,
        labels: Optional[Mapping[str, str]] = None,
        launch_template: Optional[NodeGroupLaunchTemplateArgs] = None,
        node_group_name: Optional[str] = None,
        node_role_arn: Optional[str] = None,
        release_version: Optional[str] = None,
        remote_access: Optional[NodeGroupRemoteAccessArgs] = None,
        resources: Optional[Sequence[NodeGroupResourceArgs]] = None,
        scaling_config: Optional[NodeGroupScalingConfigArgs] = None,
        status: Optional[str] = None,
        subnet_ids: Optional[Sequence[str]] = None,
        tags: Optional[Mapping[str, str]] = None,
        version: Optional[str] = None) -> NodeGroup
func GetNodeGroup(ctx *Context, name string, id IDInput, state *NodeGroupState, opts ...ResourceOption) (*NodeGroup, error)
public static NodeGroup Get(string name, Input<string> id, NodeGroupState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

AmiType string
Type of Amazon Machine Image (AMI) associated with the EKS Node Group. Defaults to AL2_x86_64. Valid values: AL2_x86_64, AL2_x86_64_GPU, AL2_ARM_64. This provider will only perform drift detection if a configuration value is provided.
Arn string
Amazon Resource Name (ARN) of the EKS Node Group.
CapacityType string
Type of capacity associated with the EKS Node Group. Valid values: ON_DEMAND, SPOT. This provider will only perform drift detection if a configuration value is provided.
ClusterName string
Name of the EKS Cluster.
DiskSize int
Disk size in GiB for worker nodes. Defaults to 20. This provider will only perform drift detection if a configuration value is provided.
ForceUpdateVersion bool
Force version update if existing pods are unable to be drained due to a pod disruption budget issue.
InstanceTypes List<string>
List of instance types associated with the EKS Node Group. Defaults to ["t3.medium"]. This provider will only perform drift detection if a configuration value is provided.
Labels Dictionary<string, string>
Key-value map of Kubernetes labels. Only labels that are applied with the EKS API are managed by this argument. Other Kubernetes labels applied to the EKS Node Group will not be managed.
LaunchTemplate NodeGroupLaunchTemplateArgs
Configuration block with Launch Template settings. Detailed below.
NodeGroupName string
Name of the EKS Node Group.
NodeRoleArn string
Amazon Resource Name (ARN) of the IAM Role that provides permissions for the EKS Node Group.
ReleaseVersion string
AMI version of the EKS Node Group. Defaults to latest version for Kubernetes version.
RemoteAccess NodeGroupRemoteAccessArgs
Configuration block with remote access settings. Detailed below.
Resources List<NodeGroupResourceArgs>
List of objects containing information about underlying resources.
ScalingConfig NodeGroupScalingConfigArgs
Configuration block with scaling settings. Detailed below.
Status string
Status of the EKS Node Group.
SubnetIds List<string>
Identifiers of EC2 Subnets to associate with the EKS Node Group. These subnets must have the following resource tag: kubernetes.io/cluster/CLUSTER_NAME (where CLUSTER_NAME is replaced with the name of the EKS Cluster).
Tags Dictionary<string, string>
Key-value mapping of resource tags.
Version string
EC2 Launch Template version number. While the API accepts values like $Default and $Latest, the API will convert the value to the associated version number (e.g. 1) on read and This provider will show a difference on next plan. Using the default_version or latest_version attribute of the aws.ec2.LaunchTemplate resource or data source is recommended for this argument.
AmiType string
Type of Amazon Machine Image (AMI) associated with the EKS Node Group. Defaults to AL2_x86_64. Valid values: AL2_x86_64, AL2_x86_64_GPU, AL2_ARM_64. This provider will only perform drift detection if a configuration value is provided.
Arn string
Amazon Resource Name (ARN) of the EKS Node Group.
CapacityType string
Type of capacity associated with the EKS Node Group. Valid values: ON_DEMAND, SPOT. This provider will only perform drift detection if a configuration value is provided.
ClusterName string
Name of the EKS Cluster.
DiskSize int
Disk size in GiB for worker nodes. Defaults to 20. This provider will only perform drift detection if a configuration value is provided.
ForceUpdateVersion bool
Force version update if existing pods are unable to be drained due to a pod disruption budget issue.
InstanceTypes []string
List of instance types associated with the EKS Node Group. Defaults to ["t3.medium"]. This provider will only perform drift detection if a configuration value is provided.
Labels map[string]string
Key-value map of Kubernetes labels. Only labels that are applied with the EKS API are managed by this argument. Other Kubernetes labels applied to the EKS Node Group will not be managed.
LaunchTemplate NodeGroupLaunchTemplate
Configuration block with Launch Template settings. Detailed below.
NodeGroupName string
Name of the EKS Node Group.
NodeRoleArn string
Amazon Resource Name (ARN) of the IAM Role that provides permissions for the EKS Node Group.
ReleaseVersion string
AMI version of the EKS Node Group. Defaults to latest version for Kubernetes version.
RemoteAccess NodeGroupRemoteAccess
Configuration block with remote access settings. Detailed below.
Resources []NodeGroupResource
List of objects containing information about underlying resources.
ScalingConfig NodeGroupScalingConfig
Configuration block with scaling settings. Detailed below.
Status string
Status of the EKS Node Group.
SubnetIds []string
Identifiers of EC2 Subnets to associate with the EKS Node Group. These subnets must have the following resource tag: kubernetes.io/cluster/CLUSTER_NAME (where CLUSTER_NAME is replaced with the name of the EKS Cluster).
Tags map[string]string
Key-value mapping of resource tags.
Version string
EC2 Launch Template version number. While the API accepts values like $Default and $Latest, the API will convert the value to the associated version number (e.g. 1) on read and This provider will show a difference on next plan. Using the default_version or latest_version attribute of the aws.ec2.LaunchTemplate resource or data source is recommended for this argument.
amiType string
Type of Amazon Machine Image (AMI) associated with the EKS Node Group. Defaults to AL2_x86_64. Valid values: AL2_x86_64, AL2_x86_64_GPU, AL2_ARM_64. This provider will only perform drift detection if a configuration value is provided.
arn string
Amazon Resource Name (ARN) of the EKS Node Group.
capacityType string
Type of capacity associated with the EKS Node Group. Valid values: ON_DEMAND, SPOT. This provider will only perform drift detection if a configuration value is provided.
clusterName string
Name of the EKS Cluster.
diskSize number
Disk size in GiB for worker nodes. Defaults to 20. This provider will only perform drift detection if a configuration value is provided.
forceUpdateVersion boolean
Force version update if existing pods are unable to be drained due to a pod disruption budget issue.
instanceTypes string[]
List of instance types associated with the EKS Node Group. Defaults to ["t3.medium"]. This provider will only perform drift detection if a configuration value is provided.
labels {[key: string]: string}
Key-value map of Kubernetes labels. Only labels that are applied with the EKS API are managed by this argument. Other Kubernetes labels applied to the EKS Node Group will not be managed.
launchTemplate NodeGroupLaunchTemplateArgs
Configuration block with Launch Template settings. Detailed below.
nodeGroupName string
Name of the EKS Node Group.
nodeRoleArn string
Amazon Resource Name (ARN) of the IAM Role that provides permissions for the EKS Node Group.
releaseVersion string
AMI version of the EKS Node Group. Defaults to latest version for Kubernetes version.
remoteAccess NodeGroupRemoteAccessArgs
Configuration block with remote access settings. Detailed below.
resources NodeGroupResourceArgs[]
List of objects containing information about underlying resources.
scalingConfig NodeGroupScalingConfigArgs
Configuration block with scaling settings. Detailed below.
status string
Status of the EKS Node Group.
subnetIds string[]
Identifiers of EC2 Subnets to associate with the EKS Node Group. These subnets must have the following resource tag: kubernetes.io/cluster/CLUSTER_NAME (where CLUSTER_NAME is replaced with the name of the EKS Cluster).
tags {[key: string]: string}
Key-value mapping of resource tags.
version string
EC2 Launch Template version number. While the API accepts values like $Default and $Latest, the API will convert the value to the associated version number (e.g. 1) on read and This provider will show a difference on next plan. Using the default_version or latest_version attribute of the aws.ec2.LaunchTemplate resource or data source is recommended for this argument.
ami_type str
Type of Amazon Machine Image (AMI) associated with the EKS Node Group. Defaults to AL2_x86_64. Valid values: AL2_x86_64, AL2_x86_64_GPU, AL2_ARM_64. This provider will only perform drift detection if a configuration value is provided.
arn str
Amazon Resource Name (ARN) of the EKS Node Group.
capacity_type str
Type of capacity associated with the EKS Node Group. Valid values: ON_DEMAND, SPOT. This provider will only perform drift detection if a configuration value is provided.
cluster_name str
Name of the EKS Cluster.
disk_size int
Disk size in GiB for worker nodes. Defaults to 20. This provider will only perform drift detection if a configuration value is provided.
force_update_version bool
Force version update if existing pods are unable to be drained due to a pod disruption budget issue.
instance_types Sequence[str]
List of instance types associated with the EKS Node Group. Defaults to ["t3.medium"]. This provider will only perform drift detection if a configuration value is provided.
labels Mapping[str, str]
Key-value map of Kubernetes labels. Only labels that are applied with the EKS API are managed by this argument. Other Kubernetes labels applied to the EKS Node Group will not be managed.
launch_template NodeGroupLaunchTemplateArgs
Configuration block with Launch Template settings. Detailed below.
node_group_name str
Name of the EKS Node Group.
node_role_arn str
Amazon Resource Name (ARN) of the IAM Role that provides permissions for the EKS Node Group.
release_version str
AMI version of the EKS Node Group. Defaults to latest version for Kubernetes version.
remote_access NodeGroupRemoteAccessArgs
Configuration block with remote access settings. Detailed below.
resources Sequence[NodeGroupResourceArgs]
List of objects containing information about underlying resources.
scaling_config NodeGroupScalingConfigArgs
Configuration block with scaling settings. Detailed below.
status str
Status of the EKS Node Group.
subnet_ids Sequence[str]
Identifiers of EC2 Subnets to associate with the EKS Node Group. These subnets must have the following resource tag: kubernetes.io/cluster/CLUSTER_NAME (where CLUSTER_NAME is replaced with the name of the EKS Cluster).
tags Mapping[str, str]
Key-value mapping of resource tags.
version str
EC2 Launch Template version number. While the API accepts values like $Default and $Latest, the API will convert the value to the associated version number (e.g. 1) on read and This provider will show a difference on next plan. Using the default_version or latest_version attribute of the aws.ec2.LaunchTemplate resource or data source is recommended for this argument.

Supporting Types

NodeGroupLaunchTemplate

Version string
EC2 Launch Template version number. While the API accepts values like $Default and $Latest, the API will convert the value to the associated version number (e.g. 1) on read and This provider will show a difference on next plan. Using the default_version or latest_version attribute of the aws.ec2.LaunchTemplate resource or data source is recommended for this argument.
Id string
Identifier of the EC2 Launch Template. Conflicts with name.
Name string
Name of the EC2 Launch Template. Conflicts with id.
Version string
EC2 Launch Template version number. While the API accepts values like $Default and $Latest, the API will convert the value to the associated version number (e.g. 1) on read and This provider will show a difference on next plan. Using the default_version or latest_version attribute of the aws.ec2.LaunchTemplate resource or data source is recommended for this argument.
Id string
Identifier of the EC2 Launch Template. Conflicts with name.
Name string
Name of the EC2 Launch Template. Conflicts with id.
version string
EC2 Launch Template version number. While the API accepts values like $Default and $Latest, the API will convert the value to the associated version number (e.g. 1) on read and This provider will show a difference on next plan. Using the default_version or latest_version attribute of the aws.ec2.LaunchTemplate resource or data source is recommended for this argument.
id string
Identifier of the EC2 Launch Template. Conflicts with name.
name string
Name of the EC2 Launch Template. Conflicts with id.
version str
EC2 Launch Template version number. While the API accepts values like $Default and $Latest, the API will convert the value to the associated version number (e.g. 1) on read and This provider will show a difference on next plan. Using the default_version or latest_version attribute of the aws.ec2.LaunchTemplate resource or data source is recommended for this argument.
id str
Identifier of the EC2 Launch Template. Conflicts with name.
name str
Name of the EC2 Launch Template. Conflicts with id.

NodeGroupRemoteAccess

Ec2SshKey string
EC2 Key Pair name that provides access for SSH communication with the worker nodes in the EKS Node Group. If you specify this configuration, but do not specify source_security_group_ids when you create an EKS Node Group, port 22 on the worker nodes is opened to the Internet (0.0.0.0/0).
SourceSecurityGroupIds List<string>
Set of EC2 Security Group IDs to allow SSH access (port 22) from on the worker nodes. If you specify ec2_ssh_key, but do not specify this configuration when you create an EKS Node Group, port 22 on the worker nodes is opened to the Internet (0.0.0.0/0).
Ec2SshKey string
EC2 Key Pair name that provides access for SSH communication with the worker nodes in the EKS Node Group. If you specify this configuration, but do not specify source_security_group_ids when you create an EKS Node Group, port 22 on the worker nodes is opened to the Internet (0.0.0.0/0).
SourceSecurityGroupIds []string
Set of EC2 Security Group IDs to allow SSH access (port 22) from on the worker nodes. If you specify ec2_ssh_key, but do not specify this configuration when you create an EKS Node Group, port 22 on the worker nodes is opened to the Internet (0.0.0.0/0).
ec2SshKey string
EC2 Key Pair name that provides access for SSH communication with the worker nodes in the EKS Node Group. If you specify this configuration, but do not specify source_security_group_ids when you create an EKS Node Group, port 22 on the worker nodes is opened to the Internet (0.0.0.0/0).
sourceSecurityGroupIds string[]
Set of EC2 Security Group IDs to allow SSH access (port 22) from on the worker nodes. If you specify ec2_ssh_key, but do not specify this configuration when you create an EKS Node Group, port 22 on the worker nodes is opened to the Internet (0.0.0.0/0).
ec2_ssh_key str
EC2 Key Pair name that provides access for SSH communication with the worker nodes in the EKS Node Group. If you specify this configuration, but do not specify source_security_group_ids when you create an EKS Node Group, port 22 on the worker nodes is opened to the Internet (0.0.0.0/0).
source_security_group_ids Sequence[str]
Set of EC2 Security Group IDs to allow SSH access (port 22) from on the worker nodes. If you specify ec2_ssh_key, but do not specify this configuration when you create an EKS Node Group, port 22 on the worker nodes is opened to the Internet (0.0.0.0/0).

NodeGroupResource

AutoscalingGroups List<NodeGroupResourceAutoscalingGroupArgs>
List of objects containing information about AutoScaling Groups.
RemoteAccessSecurityGroupId string
Identifier of the remote access EC2 Security Group.
AutoscalingGroups []NodeGroupResourceAutoscalingGroup
List of objects containing information about AutoScaling Groups.
RemoteAccessSecurityGroupId string
Identifier of the remote access EC2 Security Group.
autoscalingGroups NodeGroupResourceAutoscalingGroupArgs[]
List of objects containing information about AutoScaling Groups.
remoteAccessSecurityGroupId string
Identifier of the remote access EC2 Security Group.
autoscaling_groups Sequence[NodeGroupResourceAutoscalingGroupArgs]
List of objects containing information about AutoScaling Groups.
remote_access_security_group_id str
Identifier of the remote access EC2 Security Group.

NodeGroupResourceAutoscalingGroup

Name string
Name of the EC2 Launch Template. Conflicts with id.
Name string
Name of the EC2 Launch Template. Conflicts with id.
name string
Name of the EC2 Launch Template. Conflicts with id.
name str
Name of the EC2 Launch Template. Conflicts with id.

NodeGroupScalingConfig

DesiredSize int
Desired number of worker nodes.
MaxSize int
Maximum number of worker nodes.
MinSize int
Minimum number of worker nodes.
DesiredSize int
Desired number of worker nodes.
MaxSize int
Maximum number of worker nodes.
MinSize int
Minimum number of worker nodes.
desiredSize number
Desired number of worker nodes.
maxSize number
Maximum number of worker nodes.
minSize number
Minimum number of worker nodes.
desired_size int
Desired number of worker nodes.
max_size int
Maximum number of worker nodes.
min_size int
Minimum number of worker nodes.

Import

EKS Node Groups can be imported using the cluster_name and node_group_name separated by a colon (:), e.g.

 $ pulumi import aws:eks/nodeGroup:NodeGroup my_node_group my_cluster:my_node_group

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.