diff --git a/sdk/java/src/main/java/com/pulumi/eks/Cluster.java b/sdk/java/src/main/java/com/pulumi/eks/Cluster.java index 6d02c0149..40b7a7eeb 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/Cluster.java +++ b/sdk/java/src/main/java/com/pulumi/eks/Cluster.java @@ -24,6 +24,40 @@ /** * Cluster is a component that wraps the AWS and Kubernetes resources necessary to run an EKS cluster, its worker nodes, its optional StorageClasses, and an optional deployment of the Kubernetes Dashboard. * + * ## Example Usage + * + * ### Provisioning a New EKS Cluster + * + * <!--Start PulumiCodeChooser --> + * + * ```java + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.eks.Cluster; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * // Create an EKS cluster with the default configuration. + * var cluster = new Cluster("cluster"); + * + * // Export the cluster's kubeconfig. + * ctx.export("kubeconfig", cluster.kubeconfig()); + * } + * } + * ``` + * <!--End PulumiCodeChooser --> + * */ @ResourceType(type="eks:index:Cluster") public class Cluster extends com.pulumi.resources.ComponentResource { diff --git a/sdk/java/src/main/java/com/pulumi/eks/inputs/CoreDataArgs.java b/sdk/java/src/main/java/com/pulumi/eks/inputs/CoreDataArgs.java index 5dd55553d..b6ee5f4e4 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/inputs/CoreDataArgs.java +++ b/sdk/java/src/main/java/com/pulumi/eks/inputs/CoreDataArgs.java @@ -83,44 +83,92 @@ public Optional> encryptionConfig() { return Optional.ofNullable(this.encryptionConfig); } + /** + * The EKS cluster's Kubernetes API server endpoint. + * + */ @Import(name="endpoint", required=true) private Output endpoint; + /** + * @return The EKS cluster's Kubernetes API server endpoint. + * + */ public Output endpoint() { return this.endpoint; } + /** + * The Fargate profile used to manage which pods run on Fargate. + * + */ @Import(name="fargateProfile") private @Nullable Output fargateProfile; + /** + * @return The Fargate profile used to manage which pods run on Fargate. + * + */ public Optional> fargateProfile() { return Optional.ofNullable(this.fargateProfile); } + /** + * The IAM instance roles for the cluster's nodes. + * + */ @Import(name="instanceRoles", required=true) private Output> instanceRoles; + /** + * @return The IAM instance roles for the cluster's nodes. + * + */ public Output> instanceRoles() { return this.instanceRoles; } + /** + * The kubeconfig file for the cluster. + * + */ @Import(name="kubeconfig") private @Nullable Output kubeconfig; + /** + * @return The kubeconfig file for the cluster. + * + */ public Optional> kubeconfig() { return Optional.ofNullable(this.kubeconfig); } + /** + * The cluster's node group options. + * + */ @Import(name="nodeGroupOptions", required=true) private Output nodeGroupOptions; + /** + * @return The cluster's node group options. + * + */ public Output nodeGroupOptions() { return this.nodeGroupOptions; } + /** + * Tags attached to the security groups associated with the cluster's worker nodes. + * + */ @Import(name="nodeSecurityGroupTags") private @Nullable Output> nodeSecurityGroupTags; + /** + * @return Tags attached to the security groups associated with the cluster's worker nodes. + * + */ public Optional>> nodeSecurityGroupTags() { return Optional.ofNullable(this.nodeSecurityGroupTags); } @@ -132,9 +180,17 @@ public Optional> oidcProvider() { return Optional.ofNullable(this.oidcProvider); } + /** + * List of subnet IDs for the private subnets. + * + */ @Import(name="privateSubnetIds") private @Nullable Output> privateSubnetIds; + /** + * @return List of subnet IDs for the private subnets. + * + */ public Optional>> privateSubnetIds() { return Optional.ofNullable(this.privateSubnetIds); } @@ -146,44 +202,92 @@ public Output provider() { return this.provider; } + /** + * List of subnet IDs for the public subnets. + * + */ @Import(name="publicSubnetIds") private @Nullable Output> publicSubnetIds; + /** + * @return List of subnet IDs for the public subnets. + * + */ public Optional>> publicSubnetIds() { return Optional.ofNullable(this.publicSubnetIds); } + /** + * The storage class used for persistent storage by the cluster. + * + */ @Import(name="storageClasses") private @Nullable Output> storageClasses; + /** + * @return The storage class used for persistent storage by the cluster. + * + */ public Optional>> storageClasses() { return Optional.ofNullable(this.storageClasses); } + /** + * List of subnet IDs for the EKS cluster. + * + */ @Import(name="subnetIds", required=true) private Output> subnetIds; + /** + * @return List of subnet IDs for the EKS cluster. + * + */ public Output> subnetIds() { return this.subnetIds; } + /** + * A map of tags assigned to the EKS cluster. + * + */ @Import(name="tags") private @Nullable Output> tags; + /** + * @return A map of tags assigned to the EKS cluster. + * + */ public Optional>> tags() { return Optional.ofNullable(this.tags); } + /** + * The VPC CNI for the cluster. + * + */ @Import(name="vpcCni") private @Nullable Output vpcCni; + /** + * @return The VPC CNI for the cluster. + * + */ public Optional> vpcCni() { return Optional.ofNullable(this.vpcCni); } + /** + * ID of the cluster's VPC. + * + */ @Import(name="vpcId", required=true) private Output vpcId; + /** + * @return ID of the cluster's VPC. + * + */ public Output vpcId() { return this.vpcId; } @@ -298,60 +402,138 @@ public Builder encryptionConfig(ClusterEncryptionConfigArgs encryptionConfig) { return encryptionConfig(Output.of(encryptionConfig)); } + /** + * @param endpoint The EKS cluster's Kubernetes API server endpoint. + * + * @return builder + * + */ public Builder endpoint(Output endpoint) { $.endpoint = endpoint; return this; } + /** + * @param endpoint The EKS cluster's Kubernetes API server endpoint. + * + * @return builder + * + */ public Builder endpoint(String endpoint) { return endpoint(Output.of(endpoint)); } + /** + * @param fargateProfile The Fargate profile used to manage which pods run on Fargate. + * + * @return builder + * + */ public Builder fargateProfile(@Nullable Output fargateProfile) { $.fargateProfile = fargateProfile; return this; } + /** + * @param fargateProfile The Fargate profile used to manage which pods run on Fargate. + * + * @return builder + * + */ public Builder fargateProfile(FargateProfile fargateProfile) { return fargateProfile(Output.of(fargateProfile)); } + /** + * @param instanceRoles The IAM instance roles for the cluster's nodes. + * + * @return builder + * + */ public Builder instanceRoles(Output> instanceRoles) { $.instanceRoles = instanceRoles; return this; } + /** + * @param instanceRoles The IAM instance roles for the cluster's nodes. + * + * @return builder + * + */ public Builder instanceRoles(List instanceRoles) { return instanceRoles(Output.of(instanceRoles)); } + /** + * @param instanceRoles The IAM instance roles for the cluster's nodes. + * + * @return builder + * + */ public Builder instanceRoles(Role... instanceRoles) { return instanceRoles(List.of(instanceRoles)); } + /** + * @param kubeconfig The kubeconfig file for the cluster. + * + * @return builder + * + */ public Builder kubeconfig(@Nullable Output kubeconfig) { $.kubeconfig = kubeconfig; return this; } + /** + * @param kubeconfig The kubeconfig file for the cluster. + * + * @return builder + * + */ public Builder kubeconfig(Object kubeconfig) { return kubeconfig(Output.of(kubeconfig)); } + /** + * @param nodeGroupOptions The cluster's node group options. + * + * @return builder + * + */ public Builder nodeGroupOptions(Output nodeGroupOptions) { $.nodeGroupOptions = nodeGroupOptions; return this; } + /** + * @param nodeGroupOptions The cluster's node group options. + * + * @return builder + * + */ public Builder nodeGroupOptions(ClusterNodeGroupOptionsArgs nodeGroupOptions) { return nodeGroupOptions(Output.of(nodeGroupOptions)); } + /** + * @param nodeSecurityGroupTags Tags attached to the security groups associated with the cluster's worker nodes. + * + * @return builder + * + */ public Builder nodeSecurityGroupTags(@Nullable Output> nodeSecurityGroupTags) { $.nodeSecurityGroupTags = nodeSecurityGroupTags; return this; } + /** + * @param nodeSecurityGroupTags Tags attached to the security groups associated with the cluster's worker nodes. + * + * @return builder + * + */ public Builder nodeSecurityGroupTags(Map nodeSecurityGroupTags) { return nodeSecurityGroupTags(Output.of(nodeSecurityGroupTags)); } @@ -365,15 +547,33 @@ public Builder oidcProvider(OpenIdConnectProvider oidcProvider) { return oidcProvider(Output.of(oidcProvider)); } + /** + * @param privateSubnetIds List of subnet IDs for the private subnets. + * + * @return builder + * + */ public Builder privateSubnetIds(@Nullable Output> privateSubnetIds) { $.privateSubnetIds = privateSubnetIds; return this; } + /** + * @param privateSubnetIds List of subnet IDs for the private subnets. + * + * @return builder + * + */ public Builder privateSubnetIds(List privateSubnetIds) { return privateSubnetIds(Output.of(privateSubnetIds)); } + /** + * @param privateSubnetIds List of subnet IDs for the private subnets. + * + * @return builder + * + */ public Builder privateSubnetIds(String... privateSubnetIds) { return privateSubnetIds(List.of(privateSubnetIds)); } @@ -387,64 +587,148 @@ public Builder provider(com.pulumi.kubernetes.Provider provider) { return provider(Output.of(provider)); } + /** + * @param publicSubnetIds List of subnet IDs for the public subnets. + * + * @return builder + * + */ public Builder publicSubnetIds(@Nullable Output> publicSubnetIds) { $.publicSubnetIds = publicSubnetIds; return this; } + /** + * @param publicSubnetIds List of subnet IDs for the public subnets. + * + * @return builder + * + */ public Builder publicSubnetIds(List publicSubnetIds) { return publicSubnetIds(Output.of(publicSubnetIds)); } + /** + * @param publicSubnetIds List of subnet IDs for the public subnets. + * + * @return builder + * + */ public Builder publicSubnetIds(String... publicSubnetIds) { return publicSubnetIds(List.of(publicSubnetIds)); } + /** + * @param storageClasses The storage class used for persistent storage by the cluster. + * + * @return builder + * + */ public Builder storageClasses(@Nullable Output> storageClasses) { $.storageClasses = storageClasses; return this; } + /** + * @param storageClasses The storage class used for persistent storage by the cluster. + * + * @return builder + * + */ public Builder storageClasses(Map storageClasses) { return storageClasses(Output.of(storageClasses)); } + /** + * @param subnetIds List of subnet IDs for the EKS cluster. + * + * @return builder + * + */ public Builder subnetIds(Output> subnetIds) { $.subnetIds = subnetIds; return this; } + /** + * @param subnetIds List of subnet IDs for the EKS cluster. + * + * @return builder + * + */ public Builder subnetIds(List subnetIds) { return subnetIds(Output.of(subnetIds)); } + /** + * @param subnetIds List of subnet IDs for the EKS cluster. + * + * @return builder + * + */ public Builder subnetIds(String... subnetIds) { return subnetIds(List.of(subnetIds)); } + /** + * @param tags A map of tags assigned to the EKS cluster. + * + * @return builder + * + */ public Builder tags(@Nullable Output> tags) { $.tags = tags; return this; } + /** + * @param tags A map of tags assigned to the EKS cluster. + * + * @return builder + * + */ public Builder tags(Map tags) { return tags(Output.of(tags)); } + /** + * @param vpcCni The VPC CNI for the cluster. + * + * @return builder + * + */ public Builder vpcCni(@Nullable Output vpcCni) { $.vpcCni = vpcCni; return this; } + /** + * @param vpcCni The VPC CNI for the cluster. + * + * @return builder + * + */ public Builder vpcCni(VpcCni vpcCni) { return vpcCni(Output.of(vpcCni)); } + /** + * @param vpcId ID of the cluster's VPC. + * + * @return builder + * + */ public Builder vpcId(Output vpcId) { $.vpcId = vpcId; return this; } + /** + * @param vpcId ID of the cluster's VPC. + * + * @return builder + * + */ public Builder vpcId(String vpcId) { return vpcId(Output.of(vpcId)); } diff --git a/sdk/java/src/main/java/com/pulumi/eks/outputs/CoreData.java b/sdk/java/src/main/java/com/pulumi/eks/outputs/CoreData.java index 37dcbe00f..6c0c7dd21 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/outputs/CoreData.java +++ b/sdk/java/src/main/java/com/pulumi/eks/outputs/CoreData.java @@ -35,20 +35,72 @@ public final class CoreData { private SecurityGroup clusterSecurityGroup; private @Nullable ConfigMap eksNodeAccess; private @Nullable ClusterEncryptionConfig encryptionConfig; + /** + * @return The EKS cluster's Kubernetes API server endpoint. + * + */ private String endpoint; + /** + * @return The Fargate profile used to manage which pods run on Fargate. + * + */ private @Nullable FargateProfile fargateProfile; + /** + * @return The IAM instance roles for the cluster's nodes. + * + */ private List instanceRoles; + /** + * @return The kubeconfig file for the cluster. + * + */ private @Nullable Object kubeconfig; + /** + * @return The cluster's node group options. + * + */ private ClusterNodeGroupOptions nodeGroupOptions; + /** + * @return Tags attached to the security groups associated with the cluster's worker nodes. + * + */ private @Nullable Map nodeSecurityGroupTags; private @Nullable OpenIdConnectProvider oidcProvider; + /** + * @return List of subnet IDs for the private subnets. + * + */ private @Nullable List privateSubnetIds; private com.pulumi.kubernetes.Provider provider; + /** + * @return List of subnet IDs for the public subnets. + * + */ private @Nullable List publicSubnetIds; + /** + * @return The storage class used for persistent storage by the cluster. + * + */ private @Nullable Map storageClasses; + /** + * @return List of subnet IDs for the EKS cluster. + * + */ private List subnetIds; + /** + * @return A map of tags assigned to the EKS cluster. + * + */ private @Nullable Map tags; + /** + * @return The VPC CNI for the cluster. + * + */ private @Nullable VpcCni vpcCni; + /** + * @return ID of the cluster's VPC. + * + */ private String vpcId; private CoreData() {} @@ -74,48 +126,100 @@ public Optional eksNodeAccess() { public Optional encryptionConfig() { return Optional.ofNullable(this.encryptionConfig); } + /** + * @return The EKS cluster's Kubernetes API server endpoint. + * + */ public String endpoint() { return this.endpoint; } + /** + * @return The Fargate profile used to manage which pods run on Fargate. + * + */ public Optional fargateProfile() { return Optional.ofNullable(this.fargateProfile); } + /** + * @return The IAM instance roles for the cluster's nodes. + * + */ public List instanceRoles() { return this.instanceRoles; } + /** + * @return The kubeconfig file for the cluster. + * + */ public Optional kubeconfig() { return Optional.ofNullable(this.kubeconfig); } + /** + * @return The cluster's node group options. + * + */ public ClusterNodeGroupOptions nodeGroupOptions() { return this.nodeGroupOptions; } + /** + * @return Tags attached to the security groups associated with the cluster's worker nodes. + * + */ public Map nodeSecurityGroupTags() { return this.nodeSecurityGroupTags == null ? Map.of() : this.nodeSecurityGroupTags; } public Optional oidcProvider() { return Optional.ofNullable(this.oidcProvider); } + /** + * @return List of subnet IDs for the private subnets. + * + */ public List privateSubnetIds() { return this.privateSubnetIds == null ? List.of() : this.privateSubnetIds; } public com.pulumi.kubernetes.Provider provider() { return this.provider; } + /** + * @return List of subnet IDs for the public subnets. + * + */ public List publicSubnetIds() { return this.publicSubnetIds == null ? List.of() : this.publicSubnetIds; } + /** + * @return The storage class used for persistent storage by the cluster. + * + */ public Map storageClasses() { return this.storageClasses == null ? Map.of() : this.storageClasses; } + /** + * @return List of subnet IDs for the EKS cluster. + * + */ public List subnetIds() { return this.subnetIds; } + /** + * @return A map of tags assigned to the EKS cluster. + * + */ public Map tags() { return this.tags == null ? Map.of() : this.tags; } + /** + * @return The VPC CNI for the cluster. + * + */ public Optional vpcCni() { return Optional.ofNullable(this.vpcCni); } + /** + * @return ID of the cluster's VPC. + * + */ public String vpcId() { return this.vpcId; }