Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.eks.inputs.ClusterNodeGroupOptionsArgs Maven / Gradle / Ivy
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.eks.inputs;
import com.pulumi.aws.ec2.SecurityGroup;
import com.pulumi.aws.ec2.SecurityGroupRule;
import com.pulumi.aws.iam.InstanceProfile;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.eks.inputs.TaintArgs;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Describes the configuration options accepted by a cluster to create its own node groups.
*
*/
public final class ClusterNodeGroupOptionsArgs extends com.pulumi.resources.ResourceArgs {
public static final ClusterNodeGroupOptionsArgs Empty = new ClusterNodeGroupOptionsArgs();
/**
* The AMI ID to use for the worker nodes.
*
* Defaults to the latest recommended EKS Optimized Linux AMI from the AWS Systems Manager Parameter Store.
*
* Note: `amiId` and `gpu` are mutually exclusive.
*
* See for more details:
* - https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html.
*
*/
@Import(name="amiId")
private @Nullable Output amiId;
/**
* @return The AMI ID to use for the worker nodes.
*
* Defaults to the latest recommended EKS Optimized Linux AMI from the AWS Systems Manager Parameter Store.
*
* Note: `amiId` and `gpu` are mutually exclusive.
*
* See for more details:
* - https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html.
*
*/
public Optional> amiId() {
return Optional.ofNullable(this.amiId);
}
/**
* The AMI Type to use for the worker nodes.
*
* Only applicable when setting an AMI ID that is of type `arm64`.
*
* Note: `amiType` and `gpu` are mutually exclusive.
*
*/
@Import(name="amiType")
private @Nullable Output amiType;
/**
* @return The AMI Type to use for the worker nodes.
*
* Only applicable when setting an AMI ID that is of type `arm64`.
*
* Note: `amiType` and `gpu` are mutually exclusive.
*
*/
public Optional> amiType() {
return Optional.ofNullable(this.amiType);
}
/**
* The tags to apply to the NodeGroup's AutoScalingGroup in the CloudFormation Stack.
*
* Per AWS, all stack-level tags, including automatically created tags, and the `cloudFormationTags` option are propagated to resources that AWS CloudFormation supports, including the AutoScalingGroup. See https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html
*
* Note: Given the inheritance of auto-generated CF tags and `cloudFormationTags`, you should either supply the tag in `autoScalingGroupTags` or `cloudFormationTags`, but not both.
*
*/
@Import(name="autoScalingGroupTags")
private @Nullable Output> autoScalingGroupTags;
/**
* @return The tags to apply to the NodeGroup's AutoScalingGroup in the CloudFormation Stack.
*
* Per AWS, all stack-level tags, including automatically created tags, and the `cloudFormationTags` option are propagated to resources that AWS CloudFormation supports, including the AutoScalingGroup. See https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html
*
* Note: Given the inheritance of auto-generated CF tags and `cloudFormationTags`, you should either supply the tag in `autoScalingGroupTags` or `cloudFormationTags`, but not both.
*
*/
public Optional>> autoScalingGroupTags() {
return Optional.ofNullable(this.autoScalingGroupTags);
}
/**
* Additional args to pass directly to `/etc/eks/bootstrap.sh`. For details on available options, see: https://github.com/awslabs/amazon-eks-ami/blob/master/files/bootstrap.sh. Note that the `--apiserver-endpoint`, `--b64-cluster-ca` and `--kubelet-extra-args` flags are included automatically based on other configuration parameters.
*
*/
@Import(name="bootstrapExtraArgs")
private @Nullable String bootstrapExtraArgs;
/**
* @return Additional args to pass directly to `/etc/eks/bootstrap.sh`. For details on available options, see: https://github.com/awslabs/amazon-eks-ami/blob/master/files/bootstrap.sh. Note that the `--apiserver-endpoint`, `--b64-cluster-ca` and `--kubelet-extra-args` flags are included automatically based on other configuration parameters.
*
*/
public Optional bootstrapExtraArgs() {
return Optional.ofNullable(this.bootstrapExtraArgs);
}
/**
* The tags to apply to the CloudFormation Stack of the Worker NodeGroup.
*
* Note: Given the inheritance of auto-generated CF tags and `cloudFormationTags`, you should either supply the tag in `autoScalingGroupTags` or `cloudFormationTags`, but not both.
*
*/
@Import(name="cloudFormationTags")
private @Nullable Output> cloudFormationTags;
/**
* @return The tags to apply to the CloudFormation Stack of the Worker NodeGroup.
*
* Note: Given the inheritance of auto-generated CF tags and `cloudFormationTags`, you should either supply the tag in `autoScalingGroupTags` or `cloudFormationTags`, but not both.
*
*/
public Optional>> cloudFormationTags() {
return Optional.ofNullable(this.cloudFormationTags);
}
/**
* The ingress rule that gives node group access.
*
*/
@Import(name="clusterIngressRule")
private @Nullable Output clusterIngressRule;
/**
* @return The ingress rule that gives node group access.
*
*/
public Optional> clusterIngressRule() {
return Optional.ofNullable(this.clusterIngressRule);
}
/**
* The number of worker nodes that should be running in the cluster. Defaults to 2.
*
*/
@Import(name="desiredCapacity")
private @Nullable Output desiredCapacity;
/**
* @return The number of worker nodes that should be running in the cluster. Defaults to 2.
*
*/
public Optional> desiredCapacity() {
return Optional.ofNullable(this.desiredCapacity);
}
/**
* Enables/disables detailed monitoring of the EC2 instances.
*
* With detailed monitoring, all metrics, including status check metrics, are available in 1-minute intervals.
* When enabled, you can also get aggregated data across groups of similar instances.
*
* Note: You are charged per metric that is sent to CloudWatch. You are not charged for data storage.
* For more information, see "Paid tier" and "Example 1 - EC2 Detailed Monitoring" here https://aws.amazon.com/cloudwatch/pricing/.
*
*/
@Import(name="enableDetailedMonitoring")
private @Nullable Output enableDetailedMonitoring;
/**
* @return Enables/disables detailed monitoring of the EC2 instances.
*
* With detailed monitoring, all metrics, including status check metrics, are available in 1-minute intervals.
* When enabled, you can also get aggregated data across groups of similar instances.
*
* Note: You are charged per metric that is sent to CloudWatch. You are not charged for data storage.
* For more information, see "Paid tier" and "Example 1 - EC2 Detailed Monitoring" here https://aws.amazon.com/cloudwatch/pricing/.
*
*/
public Optional> enableDetailedMonitoring() {
return Optional.ofNullable(this.enableDetailedMonitoring);
}
/**
* Encrypt the root block device of the nodes in the node group.
*
*/
@Import(name="encryptRootBlockDevice")
private @Nullable Output encryptRootBlockDevice;
/**
* @return Encrypt the root block device of the nodes in the node group.
*
*/
public Optional> encryptRootBlockDevice() {
return Optional.ofNullable(this.encryptRootBlockDevice);
}
/**
* Extra security groups to attach on all nodes in this worker node group.
*
* This additional set of security groups captures any user application rules that will be needed for the nodes.
*
*/
@Import(name="extraNodeSecurityGroups")
private @Nullable Output> extraNodeSecurityGroups;
/**
* @return Extra security groups to attach on all nodes in this worker node group.
*
* This additional set of security groups captures any user application rules that will be needed for the nodes.
*
*/
public Optional>> extraNodeSecurityGroups() {
return Optional.ofNullable(this.extraNodeSecurityGroups);
}
/**
* Use the latest recommended EKS Optimized Linux AMI with GPU support for the worker nodes from the AWS Systems Manager Parameter Store.
*
* Defaults to false.
*
* Note: `gpu` and `amiId` are mutually exclusive.
*
* See for more details:
* - https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html
* - https://docs.aws.amazon.com/eks/latest/userguide/retrieve-ami-id.html
*
*/
@Import(name="gpu")
private @Nullable Output gpu;
/**
* @return Use the latest recommended EKS Optimized Linux AMI with GPU support for the worker nodes from the AWS Systems Manager Parameter Store.
*
* Defaults to false.
*
* Note: `gpu` and `amiId` are mutually exclusive.
*
* See for more details:
* - https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html
* - https://docs.aws.amazon.com/eks/latest/userguide/retrieve-ami-id.html
*
*/
public Optional> gpu() {
return Optional.ofNullable(this.gpu);
}
/**
* The ingress rule that gives node group access.
*
*/
@Import(name="instanceProfile")
private @Nullable InstanceProfile instanceProfile;
/**
* @return The ingress rule that gives node group access.
*
*/
public Optional instanceProfile() {
return Optional.ofNullable(this.instanceProfile);
}
/**
* The instance type to use for the cluster's nodes. Defaults to "t2.medium".
*
*/
@Import(name="instanceType")
private @Nullable Output instanceType;
/**
* @return The instance type to use for the cluster's nodes. Defaults to "t2.medium".
*
*/
public Optional> instanceType() {
return Optional.ofNullable(this.instanceType);
}
/**
* Name of the key pair to use for SSH access to worker nodes.
*
*/
@Import(name="keyName")
private @Nullable Output keyName;
/**
* @return Name of the key pair to use for SSH access to worker nodes.
*
*/
public Optional> keyName() {
return Optional.ofNullable(this.keyName);
}
/**
* Extra args to pass to the Kubelet. Corresponds to the options passed in the `--kubeletExtraArgs` flag to `/etc/eks/bootstrap.sh`. For example, '--port=10251 --address=0.0.0.0'. Note that the `labels` and `taints` properties will be applied to this list (using `--node-labels` and `--register-with-taints` respectively) after to the explicit `kubeletExtraArgs`.
*
*/
@Import(name="kubeletExtraArgs")
private @Nullable String kubeletExtraArgs;
/**
* @return Extra args to pass to the Kubelet. Corresponds to the options passed in the `--kubeletExtraArgs` flag to `/etc/eks/bootstrap.sh`. For example, '--port=10251 --address=0.0.0.0'. Note that the `labels` and `taints` properties will be applied to this list (using `--node-labels` and `--register-with-taints` respectively) after to the explicit `kubeletExtraArgs`.
*
*/
public Optional kubeletExtraArgs() {
return Optional.ofNullable(this.kubeletExtraArgs);
}
/**
* Custom k8s node labels to be attached to each worker node. Adds the given key/value pairs to the `--node-labels` kubelet argument.
*
*/
@Import(name="labels")
private @Nullable Map labels;
/**
* @return Custom k8s node labels to be attached to each worker node. Adds the given key/value pairs to the `--node-labels` kubelet argument.
*
*/
public Optional> labels() {
return Optional.ofNullable(this.labels);
}
/**
* The maximum number of worker nodes running in the cluster. Defaults to 2.
*
*/
@Import(name="maxSize")
private @Nullable Output maxSize;
/**
* @return The maximum number of worker nodes running in the cluster. Defaults to 2.
*
*/
public Optional> maxSize() {
return Optional.ofNullable(this.maxSize);
}
/**
* The minimum number of worker nodes running in the cluster. Defaults to 1.
*
*/
@Import(name="minSize")
private @Nullable Output minSize;
/**
* @return The minimum number of worker nodes running in the cluster. Defaults to 1.
*
*/
public Optional> minSize() {
return Optional.ofNullable(this.minSize);
}
/**
* Whether or not to auto-assign public IP addresses on the EKS worker nodes. If this toggle is set to true, the EKS workers will be auto-assigned public IPs. If false, they will not be auto-assigned public IPs.
*
*/
@Import(name="nodeAssociatePublicIpAddress")
private @Nullable Boolean nodeAssociatePublicIpAddress;
/**
* @return Whether or not to auto-assign public IP addresses on the EKS worker nodes. If this toggle is set to true, the EKS workers will be auto-assigned public IPs. If false, they will not be auto-assigned public IPs.
*
*/
public Optional nodeAssociatePublicIpAddress() {
return Optional.ofNullable(this.nodeAssociatePublicIpAddress);
}
/**
* Public key material for SSH access to worker nodes. See allowed formats at:
* https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html
* If not provided, no SSH access is enabled on VMs.
*
*/
@Import(name="nodePublicKey")
private @Nullable Output nodePublicKey;
/**
* @return Public key material for SSH access to worker nodes. See allowed formats at:
* https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html
* If not provided, no SSH access is enabled on VMs.
*
*/
public Optional> nodePublicKey() {
return Optional.ofNullable(this.nodePublicKey);
}
/**
* Whether the root block device should be deleted on termination of the instance. Defaults to true.
*
*/
@Import(name="nodeRootVolumeDeleteOnTermination")
private @Nullable Output nodeRootVolumeDeleteOnTermination;
/**
* @return Whether the root block device should be deleted on termination of the instance. Defaults to true.
*
*/
public Optional> nodeRootVolumeDeleteOnTermination() {
return Optional.ofNullable(this.nodeRootVolumeDeleteOnTermination);
}
/**
* Whether to encrypt a cluster node's root volume. Defaults to false.
*
*/
@Import(name="nodeRootVolumeEncrypted")
private @Nullable Output nodeRootVolumeEncrypted;
/**
* @return Whether to encrypt a cluster node's root volume. Defaults to false.
*
*/
public Optional> nodeRootVolumeEncrypted() {
return Optional.ofNullable(this.nodeRootVolumeEncrypted);
}
/**
* The amount of provisioned IOPS. This is only valid with a volumeType of 'io1'.
*
*/
@Import(name="nodeRootVolumeIops")
private @Nullable Output nodeRootVolumeIops;
/**
* @return The amount of provisioned IOPS. This is only valid with a volumeType of 'io1'.
*
*/
public Optional> nodeRootVolumeIops() {
return Optional.ofNullable(this.nodeRootVolumeIops);
}
/**
* The size in GiB of a cluster node's root volume. Defaults to 20.
*
*/
@Import(name="nodeRootVolumeSize")
private @Nullable Output nodeRootVolumeSize;
/**
* @return The size in GiB of a cluster node's root volume. Defaults to 20.
*
*/
public Optional> nodeRootVolumeSize() {
return Optional.ofNullable(this.nodeRootVolumeSize);
}
/**
* Provisioned throughput performance in integer MiB/s for a cluster node's root volume. This is only valid with a volumeType of 'gp3'.
*
*/
@Import(name="nodeRootVolumeThroughput")
private @Nullable Output nodeRootVolumeThroughput;
/**
* @return Provisioned throughput performance in integer MiB/s for a cluster node's root volume. This is only valid with a volumeType of 'gp3'.
*
*/
public Optional> nodeRootVolumeThroughput() {
return Optional.ofNullable(this.nodeRootVolumeThroughput);
}
/**
* Configured EBS type for a cluster node's root volume. Default is 'gp2'. Supported values are 'standard', 'gp2', 'gp3', 'st1', 'sc1', 'io1'.
*
*/
@Import(name="nodeRootVolumeType")
private @Nullable Output nodeRootVolumeType;
/**
* @return Configured EBS type for a cluster node's root volume. Default is 'gp2'. Supported values are 'standard', 'gp2', 'gp3', 'st1', 'sc1', 'io1'.
*
*/
public Optional> nodeRootVolumeType() {
return Optional.ofNullable(this.nodeRootVolumeType);
}
/**
* The security group for the worker node group to communicate with the cluster.
*
* This security group requires specific inbound and outbound rules.
*
* See for more details:
* https://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html
*
* Note: The `nodeSecurityGroup` option and the cluster option`nodeSecurityGroupTags` are mutually exclusive.
*
*/
@Import(name="nodeSecurityGroup")
private @Nullable Output nodeSecurityGroup;
/**
* @return The security group for the worker node group to communicate with the cluster.
*
* This security group requires specific inbound and outbound rules.
*
* See for more details:
* https://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html
*
* Note: The `nodeSecurityGroup` option and the cluster option`nodeSecurityGroupTags` are mutually exclusive.
*
*/
public Optional> nodeSecurityGroup() {
return Optional.ofNullable(this.nodeSecurityGroup);
}
/**
* The set of subnets to override and use for the worker node group.
*
* Setting this option overrides which subnets to use for the worker node group, regardless if the cluster's `subnetIds` is set, or if `publicSubnetIds` and/or `privateSubnetIds` were set.
*
*/
@Import(name="nodeSubnetIds")
private @Nullable Output> nodeSubnetIds;
/**
* @return The set of subnets to override and use for the worker node group.
*
* Setting this option overrides which subnets to use for the worker node group, regardless if the cluster's `subnetIds` is set, or if `publicSubnetIds` and/or `privateSubnetIds` were set.
*
*/
public Optional>> nodeSubnetIds() {
return Optional.ofNullable(this.nodeSubnetIds);
}
/**
* Extra code to run on node startup. This code will run after the AWS EKS bootstrapping code and before the node signals its readiness to the managing CloudFormation stack. This code must be a typical user data script: critically it must begin with an interpreter directive (i.e. a `#!`).
*
*/
@Import(name="nodeUserData")
private @Nullable Output nodeUserData;
/**
* @return Extra code to run on node startup. This code will run after the AWS EKS bootstrapping code and before the node signals its readiness to the managing CloudFormation stack. This code must be a typical user data script: critically it must begin with an interpreter directive (i.e. a `#!`).
*
*/
public Optional> nodeUserData() {
return Optional.ofNullable(this.nodeUserData);
}
/**
* User specified code to run on node startup. This code is expected to handle the full AWS EKS bootstrapping code and signal node readiness to the managing CloudFormation stack. This code must be a complete and executable user data script in bash (Linux) or powershell (Windows).
*
* See for more details: https://docs.aws.amazon.com/eks/latest/userguide/worker.html
*
*/
@Import(name="nodeUserDataOverride")
private @Nullable Output nodeUserDataOverride;
/**
* @return User specified code to run on node startup. This code is expected to handle the full AWS EKS bootstrapping code and signal node readiness to the managing CloudFormation stack. This code must be a complete and executable user data script in bash (Linux) or powershell (Windows).
*
* See for more details: https://docs.aws.amazon.com/eks/latest/userguide/worker.html
*
*/
public Optional> nodeUserDataOverride() {
return Optional.ofNullable(this.nodeUserDataOverride);
}
/**
* Bidding price for spot instance. If set, only spot instances will be added as worker node.
*
*/
@Import(name="spotPrice")
private @Nullable Output spotPrice;
/**
* @return Bidding price for spot instance. If set, only spot instances will be added as worker node.
*
*/
public Optional> spotPrice() {
return Optional.ofNullable(this.spotPrice);
}
/**
* Custom k8s node taints to be attached to each worker node. Adds the given taints to the `--register-with-taints` kubelet argument
*
*/
@Import(name="taints")
private @Nullable Map taints;
/**
* @return Custom k8s node taints to be attached to each worker node. Adds the given taints to the `--register-with-taints` kubelet argument
*
*/
public Optional> taints() {
return Optional.ofNullable(this.taints);
}
/**
* Desired Kubernetes master / control plane version. If you do not specify a value, the latest available version is used.
*
*/
@Import(name="version")
private @Nullable Output version;
/**
* @return Desired Kubernetes master / control plane version. If you do not specify a value, the latest available version is used.
*
*/
public Optional> version() {
return Optional.ofNullable(this.version);
}
private ClusterNodeGroupOptionsArgs() {}
private ClusterNodeGroupOptionsArgs(ClusterNodeGroupOptionsArgs $) {
this.amiId = $.amiId;
this.amiType = $.amiType;
this.autoScalingGroupTags = $.autoScalingGroupTags;
this.bootstrapExtraArgs = $.bootstrapExtraArgs;
this.cloudFormationTags = $.cloudFormationTags;
this.clusterIngressRule = $.clusterIngressRule;
this.desiredCapacity = $.desiredCapacity;
this.enableDetailedMonitoring = $.enableDetailedMonitoring;
this.encryptRootBlockDevice = $.encryptRootBlockDevice;
this.extraNodeSecurityGroups = $.extraNodeSecurityGroups;
this.gpu = $.gpu;
this.instanceProfile = $.instanceProfile;
this.instanceType = $.instanceType;
this.keyName = $.keyName;
this.kubeletExtraArgs = $.kubeletExtraArgs;
this.labels = $.labels;
this.maxSize = $.maxSize;
this.minSize = $.minSize;
this.nodeAssociatePublicIpAddress = $.nodeAssociatePublicIpAddress;
this.nodePublicKey = $.nodePublicKey;
this.nodeRootVolumeDeleteOnTermination = $.nodeRootVolumeDeleteOnTermination;
this.nodeRootVolumeEncrypted = $.nodeRootVolumeEncrypted;
this.nodeRootVolumeIops = $.nodeRootVolumeIops;
this.nodeRootVolumeSize = $.nodeRootVolumeSize;
this.nodeRootVolumeThroughput = $.nodeRootVolumeThroughput;
this.nodeRootVolumeType = $.nodeRootVolumeType;
this.nodeSecurityGroup = $.nodeSecurityGroup;
this.nodeSubnetIds = $.nodeSubnetIds;
this.nodeUserData = $.nodeUserData;
this.nodeUserDataOverride = $.nodeUserDataOverride;
this.spotPrice = $.spotPrice;
this.taints = $.taints;
this.version = $.version;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(ClusterNodeGroupOptionsArgs defaults) {
return new Builder(defaults);
}
public static final class Builder {
private ClusterNodeGroupOptionsArgs $;
public Builder() {
$ = new ClusterNodeGroupOptionsArgs();
}
public Builder(ClusterNodeGroupOptionsArgs defaults) {
$ = new ClusterNodeGroupOptionsArgs(Objects.requireNonNull(defaults));
}
/**
* @param amiId The AMI ID to use for the worker nodes.
*
* Defaults to the latest recommended EKS Optimized Linux AMI from the AWS Systems Manager Parameter Store.
*
* Note: `amiId` and `gpu` are mutually exclusive.
*
* See for more details:
* - https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html.
*
* @return builder
*
*/
public Builder amiId(@Nullable Output amiId) {
$.amiId = amiId;
return this;
}
/**
* @param amiId The AMI ID to use for the worker nodes.
*
* Defaults to the latest recommended EKS Optimized Linux AMI from the AWS Systems Manager Parameter Store.
*
* Note: `amiId` and `gpu` are mutually exclusive.
*
* See for more details:
* - https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html.
*
* @return builder
*
*/
public Builder amiId(String amiId) {
return amiId(Output.of(amiId));
}
/**
* @param amiType The AMI Type to use for the worker nodes.
*
* Only applicable when setting an AMI ID that is of type `arm64`.
*
* Note: `amiType` and `gpu` are mutually exclusive.
*
* @return builder
*
*/
public Builder amiType(@Nullable Output amiType) {
$.amiType = amiType;
return this;
}
/**
* @param amiType The AMI Type to use for the worker nodes.
*
* Only applicable when setting an AMI ID that is of type `arm64`.
*
* Note: `amiType` and `gpu` are mutually exclusive.
*
* @return builder
*
*/
public Builder amiType(String amiType) {
return amiType(Output.of(amiType));
}
/**
* @param autoScalingGroupTags The tags to apply to the NodeGroup's AutoScalingGroup in the CloudFormation Stack.
*
* Per AWS, all stack-level tags, including automatically created tags, and the `cloudFormationTags` option are propagated to resources that AWS CloudFormation supports, including the AutoScalingGroup. See https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html
*
* Note: Given the inheritance of auto-generated CF tags and `cloudFormationTags`, you should either supply the tag in `autoScalingGroupTags` or `cloudFormationTags`, but not both.
*
* @return builder
*
*/
public Builder autoScalingGroupTags(@Nullable Output> autoScalingGroupTags) {
$.autoScalingGroupTags = autoScalingGroupTags;
return this;
}
/**
* @param autoScalingGroupTags The tags to apply to the NodeGroup's AutoScalingGroup in the CloudFormation Stack.
*
* Per AWS, all stack-level tags, including automatically created tags, and the `cloudFormationTags` option are propagated to resources that AWS CloudFormation supports, including the AutoScalingGroup. See https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html
*
* Note: Given the inheritance of auto-generated CF tags and `cloudFormationTags`, you should either supply the tag in `autoScalingGroupTags` or `cloudFormationTags`, but not both.
*
* @return builder
*
*/
public Builder autoScalingGroupTags(Map autoScalingGroupTags) {
return autoScalingGroupTags(Output.of(autoScalingGroupTags));
}
/**
* @param bootstrapExtraArgs Additional args to pass directly to `/etc/eks/bootstrap.sh`. For details on available options, see: https://github.com/awslabs/amazon-eks-ami/blob/master/files/bootstrap.sh. Note that the `--apiserver-endpoint`, `--b64-cluster-ca` and `--kubelet-extra-args` flags are included automatically based on other configuration parameters.
*
* @return builder
*
*/
public Builder bootstrapExtraArgs(@Nullable String bootstrapExtraArgs) {
$.bootstrapExtraArgs = bootstrapExtraArgs;
return this;
}
/**
* @param cloudFormationTags The tags to apply to the CloudFormation Stack of the Worker NodeGroup.
*
* Note: Given the inheritance of auto-generated CF tags and `cloudFormationTags`, you should either supply the tag in `autoScalingGroupTags` or `cloudFormationTags`, but not both.
*
* @return builder
*
*/
public Builder cloudFormationTags(@Nullable Output> cloudFormationTags) {
$.cloudFormationTags = cloudFormationTags;
return this;
}
/**
* @param cloudFormationTags The tags to apply to the CloudFormation Stack of the Worker NodeGroup.
*
* Note: Given the inheritance of auto-generated CF tags and `cloudFormationTags`, you should either supply the tag in `autoScalingGroupTags` or `cloudFormationTags`, but not both.
*
* @return builder
*
*/
public Builder cloudFormationTags(Map cloudFormationTags) {
return cloudFormationTags(Output.of(cloudFormationTags));
}
/**
* @param clusterIngressRule The ingress rule that gives node group access.
*
* @return builder
*
*/
public Builder clusterIngressRule(@Nullable Output clusterIngressRule) {
$.clusterIngressRule = clusterIngressRule;
return this;
}
/**
* @param clusterIngressRule The ingress rule that gives node group access.
*
* @return builder
*
*/
public Builder clusterIngressRule(SecurityGroupRule clusterIngressRule) {
return clusterIngressRule(Output.of(clusterIngressRule));
}
/**
* @param desiredCapacity The number of worker nodes that should be running in the cluster. Defaults to 2.
*
* @return builder
*
*/
public Builder desiredCapacity(@Nullable Output desiredCapacity) {
$.desiredCapacity = desiredCapacity;
return this;
}
/**
* @param desiredCapacity The number of worker nodes that should be running in the cluster. Defaults to 2.
*
* @return builder
*
*/
public Builder desiredCapacity(Integer desiredCapacity) {
return desiredCapacity(Output.of(desiredCapacity));
}
/**
* @param enableDetailedMonitoring Enables/disables detailed monitoring of the EC2 instances.
*
* With detailed monitoring, all metrics, including status check metrics, are available in 1-minute intervals.
* When enabled, you can also get aggregated data across groups of similar instances.
*
* Note: You are charged per metric that is sent to CloudWatch. You are not charged for data storage.
* For more information, see "Paid tier" and "Example 1 - EC2 Detailed Monitoring" here https://aws.amazon.com/cloudwatch/pricing/.
*
* @return builder
*
*/
public Builder enableDetailedMonitoring(@Nullable Output enableDetailedMonitoring) {
$.enableDetailedMonitoring = enableDetailedMonitoring;
return this;
}
/**
* @param enableDetailedMonitoring Enables/disables detailed monitoring of the EC2 instances.
*
* With detailed monitoring, all metrics, including status check metrics, are available in 1-minute intervals.
* When enabled, you can also get aggregated data across groups of similar instances.
*
* Note: You are charged per metric that is sent to CloudWatch. You are not charged for data storage.
* For more information, see "Paid tier" and "Example 1 - EC2 Detailed Monitoring" here https://aws.amazon.com/cloudwatch/pricing/.
*
* @return builder
*
*/
public Builder enableDetailedMonitoring(Boolean enableDetailedMonitoring) {
return enableDetailedMonitoring(Output.of(enableDetailedMonitoring));
}
/**
* @param encryptRootBlockDevice Encrypt the root block device of the nodes in the node group.
*
* @return builder
*
*/
public Builder encryptRootBlockDevice(@Nullable Output encryptRootBlockDevice) {
$.encryptRootBlockDevice = encryptRootBlockDevice;
return this;
}
/**
* @param encryptRootBlockDevice Encrypt the root block device of the nodes in the node group.
*
* @return builder
*
*/
public Builder encryptRootBlockDevice(Boolean encryptRootBlockDevice) {
return encryptRootBlockDevice(Output.of(encryptRootBlockDevice));
}
/**
* @param extraNodeSecurityGroups Extra security groups to attach on all nodes in this worker node group.
*
* This additional set of security groups captures any user application rules that will be needed for the nodes.
*
* @return builder
*
*/
public Builder extraNodeSecurityGroups(@Nullable Output> extraNodeSecurityGroups) {
$.extraNodeSecurityGroups = extraNodeSecurityGroups;
return this;
}
/**
* @param extraNodeSecurityGroups Extra security groups to attach on all nodes in this worker node group.
*
* This additional set of security groups captures any user application rules that will be needed for the nodes.
*
* @return builder
*
*/
public Builder extraNodeSecurityGroups(List extraNodeSecurityGroups) {
return extraNodeSecurityGroups(Output.of(extraNodeSecurityGroups));
}
/**
* @param extraNodeSecurityGroups Extra security groups to attach on all nodes in this worker node group.
*
* This additional set of security groups captures any user application rules that will be needed for the nodes.
*
* @return builder
*
*/
public Builder extraNodeSecurityGroups(SecurityGroup... extraNodeSecurityGroups) {
return extraNodeSecurityGroups(List.of(extraNodeSecurityGroups));
}
/**
* @param gpu Use the latest recommended EKS Optimized Linux AMI with GPU support for the worker nodes from the AWS Systems Manager Parameter Store.
*
* Defaults to false.
*
* Note: `gpu` and `amiId` are mutually exclusive.
*
* See for more details:
* - https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html
* - https://docs.aws.amazon.com/eks/latest/userguide/retrieve-ami-id.html
*
* @return builder
*
*/
public Builder gpu(@Nullable Output gpu) {
$.gpu = gpu;
return this;
}
/**
* @param gpu Use the latest recommended EKS Optimized Linux AMI with GPU support for the worker nodes from the AWS Systems Manager Parameter Store.
*
* Defaults to false.
*
* Note: `gpu` and `amiId` are mutually exclusive.
*
* See for more details:
* - https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html
* - https://docs.aws.amazon.com/eks/latest/userguide/retrieve-ami-id.html
*
* @return builder
*
*/
public Builder gpu(Boolean gpu) {
return gpu(Output.of(gpu));
}
/**
* @param instanceProfile The ingress rule that gives node group access.
*
* @return builder
*
*/
public Builder instanceProfile(@Nullable InstanceProfile instanceProfile) {
$.instanceProfile = instanceProfile;
return this;
}
/**
* @param instanceType The instance type to use for the cluster's nodes. Defaults to "t2.medium".
*
* @return builder
*
*/
public Builder instanceType(@Nullable Output instanceType) {
$.instanceType = instanceType;
return this;
}
/**
* @param instanceType The instance type to use for the cluster's nodes. Defaults to "t2.medium".
*
* @return builder
*
*/
public Builder instanceType(String instanceType) {
return instanceType(Output.of(instanceType));
}
/**
* @param keyName Name of the key pair to use for SSH access to worker nodes.
*
* @return builder
*
*/
public Builder keyName(@Nullable Output keyName) {
$.keyName = keyName;
return this;
}
/**
* @param keyName Name of the key pair to use for SSH access to worker nodes.
*
* @return builder
*
*/
public Builder keyName(String keyName) {
return keyName(Output.of(keyName));
}
/**
* @param kubeletExtraArgs Extra args to pass to the Kubelet. Corresponds to the options passed in the `--kubeletExtraArgs` flag to `/etc/eks/bootstrap.sh`. For example, '--port=10251 --address=0.0.0.0'. Note that the `labels` and `taints` properties will be applied to this list (using `--node-labels` and `--register-with-taints` respectively) after to the explicit `kubeletExtraArgs`.
*
* @return builder
*
*/
public Builder kubeletExtraArgs(@Nullable String kubeletExtraArgs) {
$.kubeletExtraArgs = kubeletExtraArgs;
return this;
}
/**
* @param labels Custom k8s node labels to be attached to each worker node. Adds the given key/value pairs to the `--node-labels` kubelet argument.
*
* @return builder
*
*/
public Builder labels(@Nullable Map labels) {
$.labels = labels;
return this;
}
/**
* @param maxSize The maximum number of worker nodes running in the cluster. Defaults to 2.
*
* @return builder
*
*/
public Builder maxSize(@Nullable Output maxSize) {
$.maxSize = maxSize;
return this;
}
/**
* @param maxSize The maximum number of worker nodes running in the cluster. Defaults to 2.
*
* @return builder
*
*/
public Builder maxSize(Integer maxSize) {
return maxSize(Output.of(maxSize));
}
/**
* @param minSize The minimum number of worker nodes running in the cluster. Defaults to 1.
*
* @return builder
*
*/
public Builder minSize(@Nullable Output minSize) {
$.minSize = minSize;
return this;
}
/**
* @param minSize The minimum number of worker nodes running in the cluster. Defaults to 1.
*
* @return builder
*
*/
public Builder minSize(Integer minSize) {
return minSize(Output.of(minSize));
}
/**
* @param nodeAssociatePublicIpAddress Whether or not to auto-assign public IP addresses on the EKS worker nodes. If this toggle is set to true, the EKS workers will be auto-assigned public IPs. If false, they will not be auto-assigned public IPs.
*
* @return builder
*
*/
public Builder nodeAssociatePublicIpAddress(@Nullable Boolean nodeAssociatePublicIpAddress) {
$.nodeAssociatePublicIpAddress = nodeAssociatePublicIpAddress;
return this;
}
/**
* @param nodePublicKey Public key material for SSH access to worker nodes. See allowed formats at:
* https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html
* If not provided, no SSH access is enabled on VMs.
*
* @return builder
*
*/
public Builder nodePublicKey(@Nullable Output nodePublicKey) {
$.nodePublicKey = nodePublicKey;
return this;
}
/**
* @param nodePublicKey Public key material for SSH access to worker nodes. See allowed formats at:
* https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html
* If not provided, no SSH access is enabled on VMs.
*
* @return builder
*
*/
public Builder nodePublicKey(String nodePublicKey) {
return nodePublicKey(Output.of(nodePublicKey));
}
/**
* @param nodeRootVolumeDeleteOnTermination Whether the root block device should be deleted on termination of the instance. Defaults to true.
*
* @return builder
*
*/
public Builder nodeRootVolumeDeleteOnTermination(@Nullable Output nodeRootVolumeDeleteOnTermination) {
$.nodeRootVolumeDeleteOnTermination = nodeRootVolumeDeleteOnTermination;
return this;
}
/**
* @param nodeRootVolumeDeleteOnTermination Whether the root block device should be deleted on termination of the instance. Defaults to true.
*
* @return builder
*
*/
public Builder nodeRootVolumeDeleteOnTermination(Boolean nodeRootVolumeDeleteOnTermination) {
return nodeRootVolumeDeleteOnTermination(Output.of(nodeRootVolumeDeleteOnTermination));
}
/**
* @param nodeRootVolumeEncrypted Whether to encrypt a cluster node's root volume. Defaults to false.
*
* @return builder
*
*/
public Builder nodeRootVolumeEncrypted(@Nullable Output nodeRootVolumeEncrypted) {
$.nodeRootVolumeEncrypted = nodeRootVolumeEncrypted;
return this;
}
/**
* @param nodeRootVolumeEncrypted Whether to encrypt a cluster node's root volume. Defaults to false.
*
* @return builder
*
*/
public Builder nodeRootVolumeEncrypted(Boolean nodeRootVolumeEncrypted) {
return nodeRootVolumeEncrypted(Output.of(nodeRootVolumeEncrypted));
}
/**
* @param nodeRootVolumeIops The amount of provisioned IOPS. This is only valid with a volumeType of 'io1'.
*
* @return builder
*
*/
public Builder nodeRootVolumeIops(@Nullable Output nodeRootVolumeIops) {
$.nodeRootVolumeIops = nodeRootVolumeIops;
return this;
}
/**
* @param nodeRootVolumeIops The amount of provisioned IOPS. This is only valid with a volumeType of 'io1'.
*
* @return builder
*
*/
public Builder nodeRootVolumeIops(Integer nodeRootVolumeIops) {
return nodeRootVolumeIops(Output.of(nodeRootVolumeIops));
}
/**
* @param nodeRootVolumeSize The size in GiB of a cluster node's root volume. Defaults to 20.
*
* @return builder
*
*/
public Builder nodeRootVolumeSize(@Nullable Output nodeRootVolumeSize) {
$.nodeRootVolumeSize = nodeRootVolumeSize;
return this;
}
/**
* @param nodeRootVolumeSize The size in GiB of a cluster node's root volume. Defaults to 20.
*
* @return builder
*
*/
public Builder nodeRootVolumeSize(Integer nodeRootVolumeSize) {
return nodeRootVolumeSize(Output.of(nodeRootVolumeSize));
}
/**
* @param nodeRootVolumeThroughput Provisioned throughput performance in integer MiB/s for a cluster node's root volume. This is only valid with a volumeType of 'gp3'.
*
* @return builder
*
*/
public Builder nodeRootVolumeThroughput(@Nullable Output nodeRootVolumeThroughput) {
$.nodeRootVolumeThroughput = nodeRootVolumeThroughput;
return this;
}
/**
* @param nodeRootVolumeThroughput Provisioned throughput performance in integer MiB/s for a cluster node's root volume. This is only valid with a volumeType of 'gp3'.
*
* @return builder
*
*/
public Builder nodeRootVolumeThroughput(Integer nodeRootVolumeThroughput) {
return nodeRootVolumeThroughput(Output.of(nodeRootVolumeThroughput));
}
/**
* @param nodeRootVolumeType Configured EBS type for a cluster node's root volume. Default is 'gp2'. Supported values are 'standard', 'gp2', 'gp3', 'st1', 'sc1', 'io1'.
*
* @return builder
*
*/
public Builder nodeRootVolumeType(@Nullable Output nodeRootVolumeType) {
$.nodeRootVolumeType = nodeRootVolumeType;
return this;
}
/**
* @param nodeRootVolumeType Configured EBS type for a cluster node's root volume. Default is 'gp2'. Supported values are 'standard', 'gp2', 'gp3', 'st1', 'sc1', 'io1'.
*
* @return builder
*
*/
public Builder nodeRootVolumeType(String nodeRootVolumeType) {
return nodeRootVolumeType(Output.of(nodeRootVolumeType));
}
/**
* @param nodeSecurityGroup The security group for the worker node group to communicate with the cluster.
*
* This security group requires specific inbound and outbound rules.
*
* See for more details:
* https://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html
*
* Note: The `nodeSecurityGroup` option and the cluster option`nodeSecurityGroupTags` are mutually exclusive.
*
* @return builder
*
*/
public Builder nodeSecurityGroup(@Nullable Output nodeSecurityGroup) {
$.nodeSecurityGroup = nodeSecurityGroup;
return this;
}
/**
* @param nodeSecurityGroup The security group for the worker node group to communicate with the cluster.
*
* This security group requires specific inbound and outbound rules.
*
* See for more details:
* https://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html
*
* Note: The `nodeSecurityGroup` option and the cluster option`nodeSecurityGroupTags` are mutually exclusive.
*
* @return builder
*
*/
public Builder nodeSecurityGroup(SecurityGroup nodeSecurityGroup) {
return nodeSecurityGroup(Output.of(nodeSecurityGroup));
}
/**
* @param nodeSubnetIds The set of subnets to override and use for the worker node group.
*
* Setting this option overrides which subnets to use for the worker node group, regardless if the cluster's `subnetIds` is set, or if `publicSubnetIds` and/or `privateSubnetIds` were set.
*
* @return builder
*
*/
public Builder nodeSubnetIds(@Nullable Output> nodeSubnetIds) {
$.nodeSubnetIds = nodeSubnetIds;
return this;
}
/**
* @param nodeSubnetIds The set of subnets to override and use for the worker node group.
*
* Setting this option overrides which subnets to use for the worker node group, regardless if the cluster's `subnetIds` is set, or if `publicSubnetIds` and/or `privateSubnetIds` were set.
*
* @return builder
*
*/
public Builder nodeSubnetIds(List nodeSubnetIds) {
return nodeSubnetIds(Output.of(nodeSubnetIds));
}
/**
* @param nodeSubnetIds The set of subnets to override and use for the worker node group.
*
* Setting this option overrides which subnets to use for the worker node group, regardless if the cluster's `subnetIds` is set, or if `publicSubnetIds` and/or `privateSubnetIds` were set.
*
* @return builder
*
*/
public Builder nodeSubnetIds(String... nodeSubnetIds) {
return nodeSubnetIds(List.of(nodeSubnetIds));
}
/**
* @param nodeUserData Extra code to run on node startup. This code will run after the AWS EKS bootstrapping code and before the node signals its readiness to the managing CloudFormation stack. This code must be a typical user data script: critically it must begin with an interpreter directive (i.e. a `#!`).
*
* @return builder
*
*/
public Builder nodeUserData(@Nullable Output nodeUserData) {
$.nodeUserData = nodeUserData;
return this;
}
/**
* @param nodeUserData Extra code to run on node startup. This code will run after the AWS EKS bootstrapping code and before the node signals its readiness to the managing CloudFormation stack. This code must be a typical user data script: critically it must begin with an interpreter directive (i.e. a `#!`).
*
* @return builder
*
*/
public Builder nodeUserData(String nodeUserData) {
return nodeUserData(Output.of(nodeUserData));
}
/**
* @param nodeUserDataOverride User specified code to run on node startup. This code is expected to handle the full AWS EKS bootstrapping code and signal node readiness to the managing CloudFormation stack. This code must be a complete and executable user data script in bash (Linux) or powershell (Windows).
*
* See for more details: https://docs.aws.amazon.com/eks/latest/userguide/worker.html
*
* @return builder
*
*/
public Builder nodeUserDataOverride(@Nullable Output nodeUserDataOverride) {
$.nodeUserDataOverride = nodeUserDataOverride;
return this;
}
/**
* @param nodeUserDataOverride User specified code to run on node startup. This code is expected to handle the full AWS EKS bootstrapping code and signal node readiness to the managing CloudFormation stack. This code must be a complete and executable user data script in bash (Linux) or powershell (Windows).
*
* See for more details: https://docs.aws.amazon.com/eks/latest/userguide/worker.html
*
* @return builder
*
*/
public Builder nodeUserDataOverride(String nodeUserDataOverride) {
return nodeUserDataOverride(Output.of(nodeUserDataOverride));
}
/**
* @param spotPrice Bidding price for spot instance. If set, only spot instances will be added as worker node.
*
* @return builder
*
*/
public Builder spotPrice(@Nullable Output spotPrice) {
$.spotPrice = spotPrice;
return this;
}
/**
* @param spotPrice Bidding price for spot instance. If set, only spot instances will be added as worker node.
*
* @return builder
*
*/
public Builder spotPrice(String spotPrice) {
return spotPrice(Output.of(spotPrice));
}
/**
* @param taints Custom k8s node taints to be attached to each worker node. Adds the given taints to the `--register-with-taints` kubelet argument
*
* @return builder
*
*/
public Builder taints(@Nullable Map taints) {
$.taints = taints;
return this;
}
/**
* @param version Desired Kubernetes master / control plane version. If you do not specify a value, the latest available version is used.
*
* @return builder
*
*/
public Builder version(@Nullable Output version) {
$.version = version;
return this;
}
/**
* @param version Desired Kubernetes master / control plane version. If you do not specify a value, the latest available version is used.
*
* @return builder
*
*/
public Builder version(String version) {
return version(Output.of(version));
}
public ClusterNodeGroupOptionsArgs build() {
return $;
}
}
}