From 3fa365a06d01451a496f0ce7a2bac68090258bda Mon Sep 17 00:00:00 2001 From: Florian Stadler Date: Mon, 30 Sep 2024 18:06:38 +0200 Subject: [PATCH 1/2] Add migration guide for EKS v3 (#1400) This change adds the migration guide for EKS v3. We'll also publish this to the docs as part of Relates to https://github.com/pulumi/home/issues/3626, but by having it in the repo we can already send it to alpha users. Relates to https://github.com/pulumi/home/issues/3626 --- docs/eks-v3-migration.md | 150 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 docs/eks-v3-migration.md diff --git a/docs/eks-v3-migration.md b/docs/eks-v3-migration.md new file mode 100644 index 000000000..81750d0e9 --- /dev/null +++ b/docs/eks-v3-migration.md @@ -0,0 +1,150 @@ +# EKS v3 Migration Guide + +AWS recently announced the deprecation of two features used by default in Pulumi EKS: the aws-auth ConfigMap and the AL2 operating system. Pulumi EKS v3 addresses these deprecations, enhances the maintainability of the provider, and aligns it with EKS best practices. + +## New Features + +- **Custom AMI, GPU Node, and User Data Support for `ManagedNodeGroup`** + `ManagedNodeGroup` now allows greater customization of node groups by supporting custom Amazon Machine Images (AMIs). This feature is particularly useful for users who require specific configurations or optimizations in their node images. + Additionally, you can now automatically select the right AMIs for nodes with GPUs by setting the `gpu` flag. + You can now also configure custom user data, giving more flexibility to users who need to run specific scripts or commands on node startup. + +- **Default Instance Type Update: t3.medium** + The default instance type for node groups has been updated from `t2.medium` to `t3.medium`. The `t3.medium` instance type provides several advantages: + + - **Higher Availability**: `t2.medium` is an older instance type that is being phased out in AWS regions, which can cause capacity issues during scaling. The newer `t3.medium` instance type offers better availability. + - **Improved Cost Efficiency**: `t3.medium` is marginally cheaper than `t2.medium` ($0.0416 vs $0.0464 per hour), providing better performance at a lower cost. + + +- **New `operatingSystem` Property for Node Groups** + A new `operatingSystem` property has been introduced for node groups, giving users the flexibility to choose which OS their nodes should run. Supported options include Amazon Linux 2023 (AL2023) and Bottlerocket, allowing you to select the OS that best fits your workloads and compliance needs. + + - **`RECOMMENDED` Default Setting**: By default, the `RECOMMENDED` option will be used, which ensures your nodes are always running the OS recommended by AWS for optimal security and performance. This default setting will be kept in sync with AWS’s updates. + + +- **EKS Cluster Addon Management: `vpc-cni`, `coredns` and `kube-proxy`** + The EKS cluster components `vpc-cni`, `coredns` and `kube-proxy` are now configured as EKS managed addons. This change eliminates the dependency on `kubectl` for managing these components and automates their updates, ensuring that clusters stay up to date without manual intervention. + This also simplifies management of clusters with private API endpoints because those components are managed via AWS APIs. + If you want to manage those EKS components yourself, you can do so by disabling them in the cluster component. + +- **Support for Cluster Autoscaler and External Scaling** + Pulumi EKS v3 introduces support for integrating with the Kubernetes cluster-autoscaler, which allows your cluster to scale dynamically based on resource needs. A new `ignoreScalingChanges` parameter has been added for node groups. This parameter allows Pulumi to ignore external scaling changes (e.g., changes to the desired size made by the cluster-autoscaler). + +- **Cluster Version Tracking in `ManagedNodeGroup`** + `ManagedNodeGroup` now automatically tracks the EKS cluster version, ensuring smoother version upgrades and preventing version mismatches. Since EKS only allows one minor version skew between the cluster control plane and the nodes, this automatic tracking helps prevent upgrade failures due to version incompatibility. + +# Migration + +## VPC CNI Component changes + +The VPC CNI cluster component is now configured as an EKS addon as mentioned in the “New Features” section above. This brings the following changes: + +- Removed `enableIpv6` input property. The component automatically configures the IP version now depending on whether the cluster is running in IPv4 or IPv6 mode. +- Removed `image`, `initImage`, `nodeAgentImage` input properties. The component now automatically selects an image registry in the cluster’s region to pull the images from. + +## Node Group Updates + +### `NodeGroup` component deprecation + +The `NodeGroup` component uses the deprecated AWS Launch Configuration (see [AWS docs](https://docs.aws.amazon.com/autoscaling/ec2/userguide/launch-configurations.html)). Launch Configurations do not support new instance types released after December 31, 2022 and starting on October 1, 2024, new AWS accounts will not be able to create launch configurations. +Its successor, the `NodeGroupV2` component is functionally equivalent and easier to operate because it does not use CloudFormation templates under the hood like `NodeGroup` did. + +The default node group of the `Cluster` component has been updated to use the `NodeGroupV2` component as well. +Updates to the default node group will be done by first creating the new replacement nodes and then shutting down the old ones which will move pods to the new nodes. If you need to perform the update gracefully, please have a look at [Gracefully upgrading node groups](#gracefully-upgrading-node-groups). + +### Default OS of node groups updated to AL2023 + +AWS recently deprecated the Amazon Linux 2 (AL2) operating system. It will reach end of life in June 2025, after which it will receive no more security and maintenance updates. +Until now, this was the OS used by node groups created with the Pulumi EKS provider. +To align the provider with EKS best practices we’ve updated the default operating system to the new AWS-recommended option, Amazon Linux 2023 (AL2023). + +You can either upgrade the OS right away, or intentionally configure AL2 as the desired operating system by using the `operatingSystem` parameter that’s available on all node groups. + +Have a look at [Gracefully upgrading node groups](#gracefully-upgrading-node-groups) for more information around the upgrade procedure. + +### Gracefully upgrading node groups + +The `ManagedNodeGroup` component gracefully handles updates by default. EKS will: +- boot the updated replacement nodes +- cordon the old nodes to ensure no new pods get launched onto them +- drain the old nodes one-by-one +- shut down the empty old nodes + +The detailed update procedure can be seen in the [AWS docs](https://docs.aws.amazon.com/eks/latest/userguide/managed-node-update-behavior.html). + +For self-managed node groups (i.e., the `NodeGroup` and `NodeGroupV2` components) you have two options: + +1. Update the node group in place. Pulumi does this by first creating the new replacement nodes and then shutting down the old ones which will move pods to the new nodes forcibly. This is the default behavior when node groups are updated. +2. Create a new node group and move your Pods to that group. Migrating to a new node group is more graceful than simply updating the node group in place. This is because the migration process taints the old node group as `NoSchedule` and drains the nodes gradually. + +The second option involves the following steps: + +1. Create the replacement node group side-by-side with the existing node group. When doing this you need to make sure that the two node groups are allowed to communicate with each other. You can achieve this in the following way: + +```ts +const oldNG = new eks.NodeGroupV2("old", { + cluster: cluster, + operatingSystem: eks.OperatingSystem.AL2, + instanceProfile: instanceProfile, +}); +const export oldAsgName = oldNG.autoScalingGroup.name; + +const newNG = new eks.NodeGroupV2("new", { + cluster: cluster, + operatingSystem: eks.OperatingSystem.AL2023, + instanceProfile: instanceProfile, +}); + +// Allow all traffic between the old & new NG +const oldToNew = new aws.vpc.SecurityGroupIngressRule("oldToNew", { + securityGroupId: oldNG.nodeSecurityGroup.id, + referencedSecurityGroupId: newNG.nodeSecurityGroup.id, + fromPort: 0, + ipProtocol: "-1", + toPort: 0, +}); +const newToOld = new aws.vpc.SecurityGroupIngressRule("newToOld", { + securityGroupId: newNG.nodeSecurityGroup.id, + referencedSecurityGroupId: oldNG.nodeSecurityGroup.id, + fromPort: 0, + ipProtocol: "-1", + toPort: 0, +}); +``` + +2. Find the nodes of the old node group. First take a note of the name of the auto scaling group associated with that node group and then run the following AWS CLI command, replacing `$ASG_GROUP_NAME` with the actual name of the auto scaling group: + +```bash +aws ec2 describe-instances --filter "Name=tag:aws:autoscaling:groupName,Values=$ASG_GROUP_NAME" \ + | jq -r '.Reservations[].Instances[].PrivateDnsName' +``` + +3. Drain each of the nodes of the old node group one by one. This will mark the nodes as unschedulable and gracefully move pods to other nodes. For more information have a look at this article in the [kubernetes documentation](https://kubernetes.io/docs/tasks/administer-cluster/safely-drain-node/). + +```bash +kubectl drain $NODE_NAME --ignore-daemonsets --delete-emptydir-data +``` + +4. The old nodes are now empty and can be safely shut down. Remove them from your pulumi program and run `pulumi up` + +## aws-auth ConfigMap Deprecation + +AWS introduced a new method for granting IAM principals access to Kubernetes resources called [Access Entries](https://docs.aws.amazon.com/eks/latest/userguide/grant-k8s-access.html#authentication-modes). In contrast to the existing approach using the aws-auth ConfigMap, this solely relies on AWS resources for managing Kubernetes auth. +Recently the aws-auth ConfigMap has been deprecated in favor of Access Entries. +You can start using Access Entries with your cluster by changing the `authenticationMode` to `API`. +A step-by-step migration guide can be found [here](https://github.com/pulumi/pulumi-eks/blob/master/docs/authentication-mode-migration.md). + +We currently recommend users create all new clusters with the `API` authentication mode. +More details about this can be found [here](https://docs.aws.amazon.com/eks/latest/userguide/grant-k8s-access.html). + +## Nodejs SDK changes + +The Nodejs SDK is updated to use state of the art Pulumi tooling, improving stability, documentation and security. The update requires the following changes to programs: + +- Properties of the components are now outputs instead of plain types. Notable cases where you need to change your program are: + - The [`Cluster::getKubeConfig`](https://www.pulumi.com/registry/packages/eks/api-docs/cluster/#method_GetKubeconfig) method now returns an output. + - Creating an IRSA based IAM role now requires you to use `apply` for accessing the OIDC provider ARN and URL. An example of how this works can be found [here](https://github.com/pulumi/pulumi-eks/blob/release-3.x.x/examples/oidc-iam-sa/index.ts). + - `k8s.Provider` will be deleted if not referenced (no impact, but it will appear in the diff) + - `clusterOidcProvider` is an output now. `getKubeConfig` returns an output now +- The deprecated input property `deployDashboard` of the `Cluster` component has been removed from the Nodejs SDK. This has already been removed from the other SDKs in the past. If you’d like to continue using it, you can adopt the existing code into your own program from [here](https://github.com/pulumi/pulumi-eks/blob/bcc170e72b802a78e7f0a99bc92316a5f8a62b0e/nodejs/eks/dashboard.ts). +- The `createManagedNodeGroup` function will now create an Pulumi EKS `ManagedNodeGroup` instead of creating the underlying `aws.eks.NodeGroup` resource directly. During the upgrade to Pulumi EKS v3 you'll see the additional wrapper component being created. From 120f84dc926bdc4ce6a2465f693fa6ae908a0b4a Mon Sep 17 00:00:00 2001 From: Florian Stadler Date: Mon, 30 Sep 2024 19:33:56 +0200 Subject: [PATCH 2/2] Upgrade javagen to v0.16.1 (#1408) Upgrades javagen to v0.16.1. This might solve the problems in #1402 --- Makefile | 2 +- sdk/dotnet/Pulumi.Eks.csproj | 2 +- sdk/dotnet/pulumi-plugin.json | 2 +- sdk/java/build.gradle | 4 +- .../src/main/java/com/pulumi/eks/Addon.java | 17 ++++-- .../main/java/com/pulumi/eks/AddonArgs.java | 9 ++- .../src/main/java/com/pulumi/eks/Cluster.java | 29 +++++---- .../main/java/com/pulumi/eks/ClusterArgs.java | 12 ++-- .../eks/ClusterCreationRoleProvider.java | 17 ++++-- .../java/com/pulumi/eks/ManagedNodeGroup.java | 17 ++++-- .../com/pulumi/eks/ManagedNodeGroupArgs.java | 5 +- .../main/java/com/pulumi/eks/NodeGroup.java | 17 ++++-- .../java/com/pulumi/eks/NodeGroupArgs.java | 5 +- .../pulumi/eks/NodeGroupSecurityGroup.java | 17 ++++-- .../eks/NodeGroupSecurityGroupArgs.java | 13 +++- .../main/java/com/pulumi/eks/NodeGroupV2.java | 17 ++++-- .../java/com/pulumi/eks/NodeGroupV2Args.java | 5 +- .../main/java/com/pulumi/eks/Provider.java | 17 ++++-- .../main/java/com/pulumi/eks/Utilities.java | 14 ++--- .../main/java/com/pulumi/eks/VpcCniAddon.java | 23 +++++--- .../java/com/pulumi/eks/VpcCniAddonArgs.java | 5 +- .../com/pulumi/eks/enums/AccessEntryType.java | 2 +- .../java/com/pulumi/eks/enums/AmiType.java | 2 +- .../pulumi/eks/enums/AuthenticationMode.java | 2 +- .../com/pulumi/eks/enums/OperatingSystem.java | 2 +- .../eks/enums/ResolveConflictsOnCreate.java | 2 +- .../eks/enums/ResolveConflictsOnUpdate.java | 2 +- .../pulumi/eks/inputs/AccessEntryArgs.java | 5 +- .../inputs/AccessPolicyAssociationArgs.java | 9 ++- .../com/pulumi/eks/inputs/CoreDataArgs.java | 37 +++++++++--- .../eks/inputs/CreationRoleProviderArgs.java | 9 ++- .../pulumi/eks/inputs/NodeadmOptionsArgs.java | 9 ++- .../pulumi/eks/inputs/RoleMappingArgs.java | 13 +++- .../pulumi/eks/inputs/StorageClassArgs.java | 5 +- .../java/com/pulumi/eks/inputs/TaintArgs.java | 9 ++- .../pulumi/eks/inputs/UserMappingArgs.java | 13 +++- .../com/pulumi/eks/outputs/AccessEntry.java | 11 +++- .../eks/outputs/AccessPolicyAssociation.java | 11 +++- .../eks/outputs/ClusterNodeGroupOptions.java | 39 ++++++++++++ .../java/com/pulumi/eks/outputs/CoreData.java | 59 ++++++++++++++++--- .../com/pulumi/eks/outputs/NodeGroupData.java | 16 ++++- .../pulumi/eks/outputs/NodeadmOptions.java | 11 +++- .../java/com/pulumi/eks/outputs/Taint.java | 11 +++- sdk/nodejs/package.json | 4 +- sdk/python/pulumi_eks/pulumi-plugin.json | 2 +- sdk/python/pyproject.toml | 2 +- 46 files changed, 402 insertions(+), 134 deletions(-) diff --git a/Makefile b/Makefile index f50e5ed63..b2d2248ed 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ GZIP_PREFIX := pulumi-resource-${PACK}-v${VERSION_GENERIC} WORKING_DIR := $(shell pwd) JAVA_GEN := pulumi-java-gen -JAVA_GEN_VERSION := v0.9.8 +JAVA_GEN_VERSION := v0.16.1 EKS_SRC := $(wildcard nodejs/eks/*.*) $(wildcard nodejs/eks/*/*.ts) $(wildcard nodejs/eks/*/*/*.ts) diff --git a/sdk/dotnet/Pulumi.Eks.csproj b/sdk/dotnet/Pulumi.Eks.csproj index 77b67d22f..71e84f84a 100644 --- a/sdk/dotnet/Pulumi.Eks.csproj +++ b/sdk/dotnet/Pulumi.Eks.csproj @@ -9,7 +9,7 @@ https://pulumi.com https://github.com/pulumi/pulumi-eks logo.png - 2.0.0-alpha.0+dev + 3.0.0-alpha.0+dev net6.0 enable diff --git a/sdk/dotnet/pulumi-plugin.json b/sdk/dotnet/pulumi-plugin.json index 0244f9406..82c03af58 100644 --- a/sdk/dotnet/pulumi-plugin.json +++ b/sdk/dotnet/pulumi-plugin.json @@ -1,5 +1,5 @@ { "resource": true, "name": "eks", - "version": "2.0.0-alpha.0+dev" + "version": "3.0.0-alpha.0+dev" } diff --git a/sdk/java/build.gradle b/sdk/java/build.gradle index 2207a3bd5..dc2c0ceb7 100644 --- a/sdk/java/build.gradle +++ b/sdk/java/build.gradle @@ -46,7 +46,7 @@ dependencies { implementation("com.google.code.gson:gson:2.8.9") implementation("com.pulumi:aws:6.18.2") implementation("com.pulumi:kubernetes:4.4.0") - implementation("com.pulumi:pulumi:0.9.8") + implementation("com.pulumi:pulumi:0.16.1") } task sourcesJar(type: Jar) { @@ -152,4 +152,4 @@ if (signingKey) { useInMemoryPgpKeys(signingKey, signingPassword) sign publishing.publications.mainPublication } -} \ No newline at end of file +} diff --git a/sdk/java/src/main/java/com/pulumi/eks/Addon.java b/sdk/java/src/main/java/com/pulumi/eks/Addon.java index ac40941d3..26e670b27 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/Addon.java +++ b/sdk/java/src/main/java/com/pulumi/eks/Addon.java @@ -21,7 +21,7 @@ public class Addon extends com.pulumi.resources.ComponentResource { * * @param name The _unique_ name of the resulting resource. */ - public Addon(String name) { + public Addon(java.lang.String name) { this(name, AddonArgs.Empty); } /** @@ -29,7 +29,7 @@ public Addon(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public Addon(String name, AddonArgs args) { + public Addon(java.lang.String name, AddonArgs args) { this(name, args, null); } /** @@ -38,11 +38,18 @@ public Addon(String name, AddonArgs args) { * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ - public Addon(String name, AddonArgs args, @Nullable com.pulumi.resources.ComponentResourceOptions options) { - super("eks:index:Addon", name, args == null ? AddonArgs.Empty : args, makeResourceOptions(options, Codegen.empty()), true); + public Addon(java.lang.String name, AddonArgs args, @Nullable com.pulumi.resources.ComponentResourceOptions options) { + super("eks:index:Addon", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), true); } - private static com.pulumi.resources.ComponentResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.ComponentResourceOptions options, @Nullable Output id) { + private static AddonArgs makeArgs(AddonArgs args, @Nullable com.pulumi.resources.ComponentResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? AddonArgs.Empty : args; + } + + private static com.pulumi.resources.ComponentResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.ComponentResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.ComponentResourceOptions.builder() .version(Utilities.getVersion()) .build(); diff --git a/sdk/java/src/main/java/com/pulumi/eks/AddonArgs.java b/sdk/java/src/main/java/com/pulumi/eks/AddonArgs.java index 708a8266e..7721a34eb 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/AddonArgs.java +++ b/sdk/java/src/main/java/com/pulumi/eks/AddonArgs.java @@ -6,6 +6,7 @@ import com.pulumi.core.Output; import com.pulumi.core.annotations.Import; import com.pulumi.eks.Cluster; +import com.pulumi.exceptions.MissingRequiredPropertyException; import java.lang.Boolean; import java.lang.Object; import java.lang.String; @@ -395,8 +396,12 @@ public Builder tags(Map... tags) { } public AddonArgs build() { - $.addonName = Objects.requireNonNull($.addonName, "expected parameter 'addonName' to be non-null"); - $.cluster = Objects.requireNonNull($.cluster, "expected parameter 'cluster' to be non-null"); + if ($.addonName == null) { + throw new MissingRequiredPropertyException("AddonArgs", "addonName"); + } + if ($.cluster == null) { + throw new MissingRequiredPropertyException("AddonArgs", "cluster"); + } return $; } } 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 959a59f1d..3fd81ce0b 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/Cluster.java +++ b/sdk/java/src/main/java/com/pulumi/eks/Cluster.java @@ -30,7 +30,8 @@ * * <!--Start PulumiCodeChooser --> * - * ```java + *
+ * {@code
  * import com.pulumi.Context;
  * import com.pulumi.Pulumi;
  * import com.pulumi.core.Output;
@@ -49,13 +50,14 @@
  * 
  * 	 public static void stack(Context ctx) {
  *  		// Create an EKS cluster with the default configuration.
- *  		var cluster = new Cluster("cluster");
+ *  		var cluster = new Cluster("cluster");
  *  
- *  		// Export the cluster's kubeconfig.
- * 		ctx.export("kubeconfig", cluster.kubeconfig());
+ *  		// Export the cluster's kubeconfig.
+ * 		ctx.export("kubeconfig", cluster.kubeconfig());
  * 	}
  *  }
- * ```
+ * }
+ * 
* <!--End PulumiCodeChooser --> * */ @@ -206,7 +208,7 @@ public Output nodeSecurityGroup() { * * @param name The _unique_ name of the resulting resource. */ - public Cluster(String name) { + public Cluster(java.lang.String name) { this(name, ClusterArgs.Empty); } /** @@ -214,7 +216,7 @@ public Cluster(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public Cluster(String name, @Nullable ClusterArgs args) { + public Cluster(java.lang.String name, @Nullable ClusterArgs args) { this(name, args, null); } /** @@ -223,11 +225,18 @@ public Cluster(String name, @Nullable ClusterArgs args) { * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ - public Cluster(String name, @Nullable ClusterArgs args, @Nullable com.pulumi.resources.ComponentResourceOptions options) { - super("eks:index:Cluster", name, args == null ? ClusterArgs.Empty : args, makeResourceOptions(options, Codegen.empty()), true); + public Cluster(java.lang.String name, @Nullable ClusterArgs args, @Nullable com.pulumi.resources.ComponentResourceOptions options) { + super("eks:index:Cluster", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), true); } - private static com.pulumi.resources.ComponentResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.ComponentResourceOptions options, @Nullable Output id) { + private static ClusterArgs makeArgs(@Nullable ClusterArgs args, @Nullable com.pulumi.resources.ComponentResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? ClusterArgs.Empty : args; + } + + private static com.pulumi.resources.ComponentResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.ComponentResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.ComponentResourceOptions.builder() .version(Utilities.getVersion()) .build(); diff --git a/sdk/java/src/main/java/com/pulumi/eks/ClusterArgs.java b/sdk/java/src/main/java/com/pulumi/eks/ClusterArgs.java index c988f8101..088fa445d 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/ClusterArgs.java +++ b/sdk/java/src/main/java/com/pulumi/eks/ClusterArgs.java @@ -790,12 +790,12 @@ public Optional> providerCredentialOpts() { * This option is required iff the proxy environment variables are not set. * * Format: <protocol>://<host>:<port> - * Auth Format: <protocol>://<username>:<password>@<host>:<port> + * Auth Format: <protocol>://<username>:<password>{@literal @}<host>:<port> * * Ex: * - "http://proxy.example.com:3128" * - "https://proxy.example.com" - * - "http://username:password@proxy.example.com:3128" + * - "http://username:password{@literal @}proxy.example.com:3128" * */ @Import(name="proxy") @@ -811,12 +811,12 @@ public Optional> providerCredentialOpts() { * This option is required iff the proxy environment variables are not set. * * Format: <protocol>://<host>:<port> - * Auth Format: <protocol>://<username>:<password>@<host>:<port> + * Auth Format: <protocol>://<username>:<password>{@literal @}<host>:<port> * * Ex: * - "http://proxy.example.com:3128" * - "https://proxy.example.com" - * - "http://username:password@proxy.example.com:3128" + * - "http://username:password{@literal @}proxy.example.com:3128" * */ public Optional proxy() { @@ -2129,12 +2129,12 @@ public Builder providerCredentialOpts(KubeconfigOptionsArgs providerCredentialOp * This option is required iff the proxy environment variables are not set. * * Format: <protocol>://<host>:<port> - * Auth Format: <protocol>://<username>:<password>@<host>:<port> + * Auth Format: <protocol>://<username>:<password>{@literal @}<host>:<port> * * Ex: * - "http://proxy.example.com:3128" * - "https://proxy.example.com" - * - "http://username:password@proxy.example.com:3128" + * - "http://username:password{@literal @}proxy.example.com:3128" * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/eks/ClusterCreationRoleProvider.java b/sdk/java/src/main/java/com/pulumi/eks/ClusterCreationRoleProvider.java index a630ab9b8..940f59217 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/ClusterCreationRoleProvider.java +++ b/sdk/java/src/main/java/com/pulumi/eks/ClusterCreationRoleProvider.java @@ -29,7 +29,7 @@ public Output role() { * * @param name The _unique_ name of the resulting resource. */ - public ClusterCreationRoleProvider(String name) { + public ClusterCreationRoleProvider(java.lang.String name) { this(name, ClusterCreationRoleProviderArgs.Empty); } /** @@ -37,7 +37,7 @@ public ClusterCreationRoleProvider(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public ClusterCreationRoleProvider(String name, @Nullable ClusterCreationRoleProviderArgs args) { + public ClusterCreationRoleProvider(java.lang.String name, @Nullable ClusterCreationRoleProviderArgs args) { this(name, args, null); } /** @@ -46,11 +46,18 @@ public ClusterCreationRoleProvider(String name, @Nullable ClusterCreationRolePro * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ - public ClusterCreationRoleProvider(String name, @Nullable ClusterCreationRoleProviderArgs args, @Nullable com.pulumi.resources.ComponentResourceOptions options) { - super("eks:index:ClusterCreationRoleProvider", name, args == null ? ClusterCreationRoleProviderArgs.Empty : args, makeResourceOptions(options, Codegen.empty()), true); + public ClusterCreationRoleProvider(java.lang.String name, @Nullable ClusterCreationRoleProviderArgs args, @Nullable com.pulumi.resources.ComponentResourceOptions options) { + super("eks:index:ClusterCreationRoleProvider", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), true); } - private static com.pulumi.resources.ComponentResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.ComponentResourceOptions options, @Nullable Output id) { + private static ClusterCreationRoleProviderArgs makeArgs(@Nullable ClusterCreationRoleProviderArgs args, @Nullable com.pulumi.resources.ComponentResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? ClusterCreationRoleProviderArgs.Empty : args; + } + + private static com.pulumi.resources.ComponentResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.ComponentResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.ComponentResourceOptions.builder() .version(Utilities.getVersion()) .build(); diff --git a/sdk/java/src/main/java/com/pulumi/eks/ManagedNodeGroup.java b/sdk/java/src/main/java/com/pulumi/eks/ManagedNodeGroup.java index ad4aff9b4..828c85743 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/ManagedNodeGroup.java +++ b/sdk/java/src/main/java/com/pulumi/eks/ManagedNodeGroup.java @@ -40,7 +40,7 @@ public Output nodeGroup() { * * @param name The _unique_ name of the resulting resource. */ - public ManagedNodeGroup(String name) { + public ManagedNodeGroup(java.lang.String name) { this(name, ManagedNodeGroupArgs.Empty); } /** @@ -48,7 +48,7 @@ public ManagedNodeGroup(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public ManagedNodeGroup(String name, ManagedNodeGroupArgs args) { + public ManagedNodeGroup(java.lang.String name, ManagedNodeGroupArgs args) { this(name, args, null); } /** @@ -57,11 +57,18 @@ public ManagedNodeGroup(String name, ManagedNodeGroupArgs args) { * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ - public ManagedNodeGroup(String name, ManagedNodeGroupArgs args, @Nullable com.pulumi.resources.ComponentResourceOptions options) { - super("eks:index:ManagedNodeGroup", name, args == null ? ManagedNodeGroupArgs.Empty : args, makeResourceOptions(options, Codegen.empty()), true); + public ManagedNodeGroup(java.lang.String name, ManagedNodeGroupArgs args, @Nullable com.pulumi.resources.ComponentResourceOptions options) { + super("eks:index:ManagedNodeGroup", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), true); } - private static com.pulumi.resources.ComponentResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.ComponentResourceOptions options, @Nullable Output id) { + private static ManagedNodeGroupArgs makeArgs(ManagedNodeGroupArgs args, @Nullable com.pulumi.resources.ComponentResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? ManagedNodeGroupArgs.Empty : args; + } + + private static com.pulumi.resources.ComponentResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.ComponentResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.ComponentResourceOptions.builder() .version(Utilities.getVersion()) .build(); diff --git a/sdk/java/src/main/java/com/pulumi/eks/ManagedNodeGroupArgs.java b/sdk/java/src/main/java/com/pulumi/eks/ManagedNodeGroupArgs.java index 9dc2f5ae6..17876fa19 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/ManagedNodeGroupArgs.java +++ b/sdk/java/src/main/java/com/pulumi/eks/ManagedNodeGroupArgs.java @@ -15,6 +15,7 @@ import com.pulumi.eks.enums.OperatingSystem; import com.pulumi.eks.inputs.CoreDataArgs; import com.pulumi.eks.inputs.NodeadmOptionsArgs; +import com.pulumi.exceptions.MissingRequiredPropertyException; import java.lang.Boolean; import java.lang.Integer; import java.lang.Object; @@ -1425,7 +1426,9 @@ public Builder version(String version) { } public ManagedNodeGroupArgs build() { - $.cluster = Objects.requireNonNull($.cluster, "expected parameter 'cluster' to be non-null"); + if ($.cluster == null) { + throw new MissingRequiredPropertyException("ManagedNodeGroupArgs", "cluster"); + } return $; } } diff --git a/sdk/java/src/main/java/com/pulumi/eks/NodeGroup.java b/sdk/java/src/main/java/com/pulumi/eks/NodeGroup.java index 783d94141..4dd455618 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/NodeGroup.java +++ b/sdk/java/src/main/java/com/pulumi/eks/NodeGroup.java @@ -86,7 +86,7 @@ public Output nodeSecurityGroup() { * * @param name The _unique_ name of the resulting resource. */ - public NodeGroup(String name) { + public NodeGroup(java.lang.String name) { this(name, NodeGroupArgs.Empty); } /** @@ -94,7 +94,7 @@ public NodeGroup(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public NodeGroup(String name, NodeGroupArgs args) { + public NodeGroup(java.lang.String name, NodeGroupArgs args) { this(name, args, null); } /** @@ -103,11 +103,18 @@ public NodeGroup(String name, NodeGroupArgs args) { * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ - public NodeGroup(String name, NodeGroupArgs args, @Nullable com.pulumi.resources.ComponentResourceOptions options) { - super("eks:index:NodeGroup", name, args == null ? NodeGroupArgs.Empty : args, makeResourceOptions(options, Codegen.empty()), true); + public NodeGroup(java.lang.String name, NodeGroupArgs args, @Nullable com.pulumi.resources.ComponentResourceOptions options) { + super("eks:index:NodeGroup", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), true); } - private static com.pulumi.resources.ComponentResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.ComponentResourceOptions options, @Nullable Output id) { + private static NodeGroupArgs makeArgs(NodeGroupArgs args, @Nullable com.pulumi.resources.ComponentResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? NodeGroupArgs.Empty : args; + } + + private static com.pulumi.resources.ComponentResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.ComponentResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.ComponentResourceOptions.builder() .version(Utilities.getVersion()) .build(); diff --git a/sdk/java/src/main/java/com/pulumi/eks/NodeGroupArgs.java b/sdk/java/src/main/java/com/pulumi/eks/NodeGroupArgs.java index b56329499..58b8d5eaa 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/NodeGroupArgs.java +++ b/sdk/java/src/main/java/com/pulumi/eks/NodeGroupArgs.java @@ -14,6 +14,7 @@ import com.pulumi.eks.inputs.CoreDataArgs; import com.pulumi.eks.inputs.NodeadmOptionsArgs; import com.pulumi.eks.inputs.TaintArgs; +import com.pulumi.exceptions.MissingRequiredPropertyException; import java.lang.Boolean; import java.lang.Integer; import java.lang.Object; @@ -1698,7 +1699,9 @@ public Builder version(String version) { } public NodeGroupArgs build() { - $.cluster = Objects.requireNonNull($.cluster, "expected parameter 'cluster' to be non-null"); + if ($.cluster == null) { + throw new MissingRequiredPropertyException("NodeGroupArgs", "cluster"); + } return $; } } diff --git a/sdk/java/src/main/java/com/pulumi/eks/NodeGroupSecurityGroup.java b/sdk/java/src/main/java/com/pulumi/eks/NodeGroupSecurityGroup.java index 49665795c..5acbc55b9 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/NodeGroupSecurityGroup.java +++ b/sdk/java/src/main/java/com/pulumi/eks/NodeGroupSecurityGroup.java @@ -52,7 +52,7 @@ public Output securityGroupRule() { * * @param name The _unique_ name of the resulting resource. */ - public NodeGroupSecurityGroup(String name) { + public NodeGroupSecurityGroup(java.lang.String name) { this(name, NodeGroupSecurityGroupArgs.Empty); } /** @@ -60,7 +60,7 @@ public NodeGroupSecurityGroup(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public NodeGroupSecurityGroup(String name, NodeGroupSecurityGroupArgs args) { + public NodeGroupSecurityGroup(java.lang.String name, NodeGroupSecurityGroupArgs args) { this(name, args, null); } /** @@ -69,11 +69,18 @@ public NodeGroupSecurityGroup(String name, NodeGroupSecurityGroupArgs args) { * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ - public NodeGroupSecurityGroup(String name, NodeGroupSecurityGroupArgs args, @Nullable com.pulumi.resources.ComponentResourceOptions options) { - super("eks:index:NodeGroupSecurityGroup", name, args == null ? NodeGroupSecurityGroupArgs.Empty : args, makeResourceOptions(options, Codegen.empty()), true); + public NodeGroupSecurityGroup(java.lang.String name, NodeGroupSecurityGroupArgs args, @Nullable com.pulumi.resources.ComponentResourceOptions options) { + super("eks:index:NodeGroupSecurityGroup", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), true); } - private static com.pulumi.resources.ComponentResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.ComponentResourceOptions options, @Nullable Output id) { + private static NodeGroupSecurityGroupArgs makeArgs(NodeGroupSecurityGroupArgs args, @Nullable com.pulumi.resources.ComponentResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? NodeGroupSecurityGroupArgs.Empty : args; + } + + private static com.pulumi.resources.ComponentResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.ComponentResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.ComponentResourceOptions.builder() .version(Utilities.getVersion()) .build(); diff --git a/sdk/java/src/main/java/com/pulumi/eks/NodeGroupSecurityGroupArgs.java b/sdk/java/src/main/java/com/pulumi/eks/NodeGroupSecurityGroupArgs.java index d59b0e500..c25e954aa 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/NodeGroupSecurityGroupArgs.java +++ b/sdk/java/src/main/java/com/pulumi/eks/NodeGroupSecurityGroupArgs.java @@ -7,6 +7,7 @@ import com.pulumi.aws.eks.Cluster; import com.pulumi.core.Output; import com.pulumi.core.annotations.Import; +import com.pulumi.exceptions.MissingRequiredPropertyException; import java.lang.String; import java.util.Map; import java.util.Objects; @@ -190,9 +191,15 @@ public Builder vpcId(String vpcId) { } public NodeGroupSecurityGroupArgs build() { - $.clusterSecurityGroup = Objects.requireNonNull($.clusterSecurityGroup, "expected parameter 'clusterSecurityGroup' to be non-null"); - $.eksCluster = Objects.requireNonNull($.eksCluster, "expected parameter 'eksCluster' to be non-null"); - $.vpcId = Objects.requireNonNull($.vpcId, "expected parameter 'vpcId' to be non-null"); + if ($.clusterSecurityGroup == null) { + throw new MissingRequiredPropertyException("NodeGroupSecurityGroupArgs", "clusterSecurityGroup"); + } + if ($.eksCluster == null) { + throw new MissingRequiredPropertyException("NodeGroupSecurityGroupArgs", "eksCluster"); + } + if ($.vpcId == null) { + throw new MissingRequiredPropertyException("NodeGroupSecurityGroupArgs", "vpcId"); + } return $; } } diff --git a/sdk/java/src/main/java/com/pulumi/eks/NodeGroupV2.java b/sdk/java/src/main/java/com/pulumi/eks/NodeGroupV2.java index f52a9a5db..2eab917d6 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/NodeGroupV2.java +++ b/sdk/java/src/main/java/com/pulumi/eks/NodeGroupV2.java @@ -67,7 +67,7 @@ public Output nodeSecurityGroup() { * * @param name The _unique_ name of the resulting resource. */ - public NodeGroupV2(String name) { + public NodeGroupV2(java.lang.String name) { this(name, NodeGroupV2Args.Empty); } /** @@ -75,7 +75,7 @@ public NodeGroupV2(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public NodeGroupV2(String name, NodeGroupV2Args args) { + public NodeGroupV2(java.lang.String name, NodeGroupV2Args args) { this(name, args, null); } /** @@ -84,11 +84,18 @@ public NodeGroupV2(String name, NodeGroupV2Args args) { * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ - public NodeGroupV2(String name, NodeGroupV2Args args, @Nullable com.pulumi.resources.ComponentResourceOptions options) { - super("eks:index:NodeGroupV2", name, args == null ? NodeGroupV2Args.Empty : args, makeResourceOptions(options, Codegen.empty()), true); + public NodeGroupV2(java.lang.String name, NodeGroupV2Args args, @Nullable com.pulumi.resources.ComponentResourceOptions options) { + super("eks:index:NodeGroupV2", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), true); } - private static com.pulumi.resources.ComponentResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.ComponentResourceOptions options, @Nullable Output id) { + private static NodeGroupV2Args makeArgs(NodeGroupV2Args args, @Nullable com.pulumi.resources.ComponentResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? NodeGroupV2Args.Empty : args; + } + + private static com.pulumi.resources.ComponentResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.ComponentResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.ComponentResourceOptions.builder() .version(Utilities.getVersion()) .build(); diff --git a/sdk/java/src/main/java/com/pulumi/eks/NodeGroupV2Args.java b/sdk/java/src/main/java/com/pulumi/eks/NodeGroupV2Args.java index 9b2af336a..fc54b1c68 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/NodeGroupV2Args.java +++ b/sdk/java/src/main/java/com/pulumi/eks/NodeGroupV2Args.java @@ -15,6 +15,7 @@ import com.pulumi.eks.inputs.CoreDataArgs; import com.pulumi.eks.inputs.NodeadmOptionsArgs; import com.pulumi.eks.inputs.TaintArgs; +import com.pulumi.exceptions.MissingRequiredPropertyException; import java.lang.Boolean; import java.lang.Integer; import java.lang.Object; @@ -1816,7 +1817,9 @@ public Builder version(String version) { } public NodeGroupV2Args build() { - $.cluster = Objects.requireNonNull($.cluster, "expected parameter 'cluster' to be non-null"); + if ($.cluster == null) { + throw new MissingRequiredPropertyException("NodeGroupV2Args", "cluster"); + } return $; } } diff --git a/sdk/java/src/main/java/com/pulumi/eks/Provider.java b/sdk/java/src/main/java/com/pulumi/eks/Provider.java index 1cbca9c4d..6d7e51973 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/Provider.java +++ b/sdk/java/src/main/java/com/pulumi/eks/Provider.java @@ -16,7 +16,7 @@ public class Provider extends com.pulumi.resources.ProviderResource { * * @param name The _unique_ name of the resulting resource. */ - public Provider(String name) { + public Provider(java.lang.String name) { this(name, ProviderArgs.Empty); } /** @@ -24,7 +24,7 @@ public Provider(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public Provider(String name, @Nullable ProviderArgs args) { + public Provider(java.lang.String name, @Nullable ProviderArgs args) { this(name, args, null); } /** @@ -33,11 +33,18 @@ public Provider(String name, @Nullable ProviderArgs args) { * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ - public Provider(String name, @Nullable ProviderArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("eks", name, args == null ? ProviderArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public Provider(java.lang.String name, @Nullable ProviderArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("eks", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static ProviderArgs makeArgs(@Nullable ProviderArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? ProviderArgs.Empty : args; + } + + private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); diff --git a/sdk/java/src/main/java/com/pulumi/eks/Utilities.java b/sdk/java/src/main/java/com/pulumi/eks/Utilities.java index de1c13b73..aef0f1ace 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/Utilities.java +++ b/sdk/java/src/main/java/com/pulumi/eks/Utilities.java @@ -17,7 +17,7 @@ public class Utilities { - public static Optional getEnv(String... names) { + public static Optional getEnv(java.lang.String... names) { for (var n : names) { var value = Environment.getEnvironmentVariable(n); if (value.isValue()) { @@ -27,7 +27,7 @@ public static Optional getEnv(String... names) { return Optional.empty(); } - public static Optional getEnvBoolean(String... names) { + public static Optional getEnvBoolean(java.lang.String... names) { for (var n : names) { var value = Environment.getBooleanEnvironmentVariable(n); if (value.isValue()) { @@ -37,7 +37,7 @@ public static Optional getEnvBoolean(String... names) { return Optional.empty(); } - public static Optional getEnvInteger(String... names) { + public static Optional getEnvInteger(java.lang.String... names) { for (var n : names) { var value = Environment.getIntegerEnvironmentVariable(n); if (value.isValue()) { @@ -47,7 +47,7 @@ public static Optional getEnvInteger(String... names) { return Optional.empty(); } - public static Optional getEnvDouble(String... names) { + public static Optional getEnvDouble(java.lang.String... names) { for (var n : names) { var value = Environment.getDoubleEnvironmentVariable(n); if (value.isValue()) { @@ -68,8 +68,8 @@ public static InvokeOptions withVersion(@Nullable InvokeOptions options) { ); } - private static final String version; - public static String getVersion() { + private static final java.lang.String version; + public static java.lang.String getVersion() { return version; } @@ -78,7 +78,7 @@ public static String getVersion() { var versionFile = Utilities.class.getClassLoader().getResourceAsStream(resourceName); if (versionFile == null) { throw new IllegalStateException( - String.format("expected resource '%s' on Classpath, not found", resourceName) + java.lang.String.format("expected resource '%s' on Classpath, not found", resourceName) ); } version = new BufferedReader(new InputStreamReader(versionFile)) diff --git a/sdk/java/src/main/java/com/pulumi/eks/VpcCniAddon.java b/sdk/java/src/main/java/com/pulumi/eks/VpcCniAddon.java index 80f6d1d30..e92403e50 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/VpcCniAddon.java +++ b/sdk/java/src/main/java/com/pulumi/eks/VpcCniAddon.java @@ -23,7 +23,7 @@ public class VpcCniAddon extends com.pulumi.resources.CustomResource { * * @param name The _unique_ name of the resulting resource. */ - public VpcCniAddon(String name) { + public VpcCniAddon(java.lang.String name) { this(name, VpcCniAddonArgs.Empty); } /** @@ -31,7 +31,7 @@ public VpcCniAddon(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public VpcCniAddon(String name, VpcCniAddonArgs args) { + public VpcCniAddon(java.lang.String name, VpcCniAddonArgs args) { this(name, args, null); } /** @@ -40,15 +40,22 @@ public VpcCniAddon(String name, VpcCniAddonArgs args) { * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ - public VpcCniAddon(String name, VpcCniAddonArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("eks:index:VpcCniAddon", name, args == null ? VpcCniAddonArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public VpcCniAddon(java.lang.String name, VpcCniAddonArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("eks:index:VpcCniAddon", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private VpcCniAddon(String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("eks:index:VpcCniAddon", name, null, makeResourceOptions(options, id)); + private VpcCniAddon(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("eks:index:VpcCniAddon", name, null, makeResourceOptions(options, id), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static VpcCniAddonArgs makeArgs(VpcCniAddonArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? VpcCniAddonArgs.Empty : args; + } + + private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .aliases(List.of( @@ -66,7 +73,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param id The _unique_ provider ID of the resource to lookup. * @param options Optional settings to control the behavior of the CustomResource. */ - public static VpcCniAddon get(String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static VpcCniAddon get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new VpcCniAddon(name, id, options); } } diff --git a/sdk/java/src/main/java/com/pulumi/eks/VpcCniAddonArgs.java b/sdk/java/src/main/java/com/pulumi/eks/VpcCniAddonArgs.java index d5983b8b7..0b347830f 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/VpcCniAddonArgs.java +++ b/sdk/java/src/main/java/com/pulumi/eks/VpcCniAddonArgs.java @@ -8,6 +8,7 @@ import com.pulumi.core.internal.Codegen; import com.pulumi.eks.enums.ResolveConflictsOnCreate; import com.pulumi.eks.enums.ResolveConflictsOnUpdate; +import com.pulumi.exceptions.MissingRequiredPropertyException; import java.lang.Boolean; import java.lang.Integer; import java.lang.Object; @@ -1148,7 +1149,9 @@ public Builder warmPrefixTarget(Integer warmPrefixTarget) { } public VpcCniAddonArgs build() { - $.clusterName = Objects.requireNonNull($.clusterName, "expected parameter 'clusterName' to be non-null"); + if ($.clusterName == null) { + throw new MissingRequiredPropertyException("VpcCniAddonArgs", "clusterName"); + } $.resolveConflictsOnCreate = Codegen.objectProp("resolveConflictsOnCreate", ResolveConflictsOnCreate.class).arg($.resolveConflictsOnCreate).def(ResolveConflictsOnCreate.Overwrite).getNullable(); $.resolveConflictsOnUpdate = Codegen.objectProp("resolveConflictsOnUpdate", ResolveConflictsOnUpdate.class).arg($.resolveConflictsOnUpdate).def(ResolveConflictsOnUpdate.Overwrite).getNullable(); return $; diff --git a/sdk/java/src/main/java/com/pulumi/eks/enums/AccessEntryType.java b/sdk/java/src/main/java/com/pulumi/eks/enums/AccessEntryType.java index 28a459cde..22ae56faa 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/enums/AccessEntryType.java +++ b/sdk/java/src/main/java/com/pulumi/eks/enums/AccessEntryType.java @@ -48,7 +48,7 @@ public String getValue() { } @Override - public String toString() { + public java.lang.String toString() { return new StringJoiner(", ", "AccessEntryType[", "]") .add("value='" + this.value + "'") .toString(); diff --git a/sdk/java/src/main/java/com/pulumi/eks/enums/AmiType.java b/sdk/java/src/main/java/com/pulumi/eks/enums/AmiType.java index f9dd424cb..f59e1a109 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/enums/AmiType.java +++ b/sdk/java/src/main/java/com/pulumi/eks/enums/AmiType.java @@ -57,7 +57,7 @@ public String getValue() { } @Override - public String toString() { + public java.lang.String toString() { return new StringJoiner(", ", "AmiType[", "]") .add("value='" + this.value + "'") .toString(); diff --git a/sdk/java/src/main/java/com/pulumi/eks/enums/AuthenticationMode.java b/sdk/java/src/main/java/com/pulumi/eks/enums/AuthenticationMode.java index c798b0d45..26d27d7ec 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/enums/AuthenticationMode.java +++ b/sdk/java/src/main/java/com/pulumi/eks/enums/AuthenticationMode.java @@ -55,7 +55,7 @@ public String getValue() { } @Override - public String toString() { + public java.lang.String toString() { return new StringJoiner(", ", "AuthenticationMode[", "]") .add("value='" + this.value + "'") .toString(); diff --git a/sdk/java/src/main/java/com/pulumi/eks/enums/OperatingSystem.java b/sdk/java/src/main/java/com/pulumi/eks/enums/OperatingSystem.java index 305465002..00b344d46 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/enums/OperatingSystem.java +++ b/sdk/java/src/main/java/com/pulumi/eks/enums/OperatingSystem.java @@ -60,7 +60,7 @@ public String getValue() { } @Override - public String toString() { + public java.lang.String toString() { return new StringJoiner(", ", "OperatingSystem[", "]") .add("value='" + this.value + "'") .toString(); diff --git a/sdk/java/src/main/java/com/pulumi/eks/enums/ResolveConflictsOnCreate.java b/sdk/java/src/main/java/com/pulumi/eks/enums/ResolveConflictsOnCreate.java index cba1816c2..a74cd440f 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/enums/ResolveConflictsOnCreate.java +++ b/sdk/java/src/main/java/com/pulumi/eks/enums/ResolveConflictsOnCreate.java @@ -37,7 +37,7 @@ public String getValue() { } @Override - public String toString() { + public java.lang.String toString() { return new StringJoiner(", ", "ResolveConflictsOnCreate[", "]") .add("value='" + this.value + "'") .toString(); diff --git a/sdk/java/src/main/java/com/pulumi/eks/enums/ResolveConflictsOnUpdate.java b/sdk/java/src/main/java/com/pulumi/eks/enums/ResolveConflictsOnUpdate.java index 5992d5822..26f6e2780 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/enums/ResolveConflictsOnUpdate.java +++ b/sdk/java/src/main/java/com/pulumi/eks/enums/ResolveConflictsOnUpdate.java @@ -42,7 +42,7 @@ public String getValue() { } @Override - public String toString() { + public java.lang.String toString() { return new StringJoiner(", ", "ResolveConflictsOnUpdate[", "]") .add("value='" + this.value + "'") .toString(); diff --git a/sdk/java/src/main/java/com/pulumi/eks/inputs/AccessEntryArgs.java b/sdk/java/src/main/java/com/pulumi/eks/inputs/AccessEntryArgs.java index 026c85023..7ab0be1fe 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/inputs/AccessEntryArgs.java +++ b/sdk/java/src/main/java/com/pulumi/eks/inputs/AccessEntryArgs.java @@ -7,6 +7,7 @@ import com.pulumi.core.annotations.Import; import com.pulumi.eks.enums.AccessEntryType; import com.pulumi.eks.inputs.AccessPolicyAssociationArgs; +import com.pulumi.exceptions.MissingRequiredPropertyException; import java.lang.String; import java.util.List; import java.util.Map; @@ -276,7 +277,9 @@ public Builder username(String username) { } public AccessEntryArgs build() { - $.principalArn = Objects.requireNonNull($.principalArn, "expected parameter 'principalArn' to be non-null"); + if ($.principalArn == null) { + throw new MissingRequiredPropertyException("AccessEntryArgs", "principalArn"); + } return $; } } diff --git a/sdk/java/src/main/java/com/pulumi/eks/inputs/AccessPolicyAssociationArgs.java b/sdk/java/src/main/java/com/pulumi/eks/inputs/AccessPolicyAssociationArgs.java index 5137ac420..46bcbb252 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/inputs/AccessPolicyAssociationArgs.java +++ b/sdk/java/src/main/java/com/pulumi/eks/inputs/AccessPolicyAssociationArgs.java @@ -6,6 +6,7 @@ import com.pulumi.aws.eks.inputs.AccessPolicyAssociationAccessScopeArgs; import com.pulumi.core.Output; import com.pulumi.core.annotations.Import; +import com.pulumi.exceptions.MissingRequiredPropertyException; import java.lang.String; import java.util.Objects; @@ -119,8 +120,12 @@ public Builder policyArn(String policyArn) { } public AccessPolicyAssociationArgs build() { - $.accessScope = Objects.requireNonNull($.accessScope, "expected parameter 'accessScope' to be non-null"); - $.policyArn = Objects.requireNonNull($.policyArn, "expected parameter 'policyArn' to be non-null"); + if ($.accessScope == null) { + throw new MissingRequiredPropertyException("AccessPolicyAssociationArgs", "accessScope"); + } + if ($.policyArn == null) { + throw new MissingRequiredPropertyException("AccessPolicyAssociationArgs", "policyArn"); + } return $; } } 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 c6dde1284..0f2c41e27 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 @@ -15,6 +15,7 @@ import com.pulumi.eks.VpcCniAddon; import com.pulumi.eks.inputs.AccessEntryArgs; import com.pulumi.eks.inputs.ClusterNodeGroupOptionsArgs; +import com.pulumi.exceptions.MissingRequiredPropertyException; import com.pulumi.kubernetes.core.v1.ConfigMap; import com.pulumi.kubernetes.storage.v1.StorageClass; import java.lang.Object; @@ -782,15 +783,33 @@ public Builder vpcId(String vpcId) { } public CoreDataArgs build() { - $.cluster = Objects.requireNonNull($.cluster, "expected parameter 'cluster' to be non-null"); - $.clusterIamRole = Objects.requireNonNull($.clusterIamRole, "expected parameter 'clusterIamRole' to be non-null"); - $.clusterSecurityGroup = Objects.requireNonNull($.clusterSecurityGroup, "expected parameter 'clusterSecurityGroup' to be non-null"); - $.endpoint = Objects.requireNonNull($.endpoint, "expected parameter 'endpoint' to be non-null"); - $.instanceRoles = Objects.requireNonNull($.instanceRoles, "expected parameter 'instanceRoles' to be non-null"); - $.nodeGroupOptions = Objects.requireNonNull($.nodeGroupOptions, "expected parameter 'nodeGroupOptions' to be non-null"); - $.provider = Objects.requireNonNull($.provider, "expected parameter 'provider' to be non-null"); - $.subnetIds = Objects.requireNonNull($.subnetIds, "expected parameter 'subnetIds' to be non-null"); - $.vpcId = Objects.requireNonNull($.vpcId, "expected parameter 'vpcId' to be non-null"); + if ($.cluster == null) { + throw new MissingRequiredPropertyException("CoreDataArgs", "cluster"); + } + if ($.clusterIamRole == null) { + throw new MissingRequiredPropertyException("CoreDataArgs", "clusterIamRole"); + } + if ($.clusterSecurityGroup == null) { + throw new MissingRequiredPropertyException("CoreDataArgs", "clusterSecurityGroup"); + } + if ($.endpoint == null) { + throw new MissingRequiredPropertyException("CoreDataArgs", "endpoint"); + } + if ($.instanceRoles == null) { + throw new MissingRequiredPropertyException("CoreDataArgs", "instanceRoles"); + } + if ($.nodeGroupOptions == null) { + throw new MissingRequiredPropertyException("CoreDataArgs", "nodeGroupOptions"); + } + if ($.provider == null) { + throw new MissingRequiredPropertyException("CoreDataArgs", "provider"); + } + if ($.subnetIds == null) { + throw new MissingRequiredPropertyException("CoreDataArgs", "subnetIds"); + } + if ($.vpcId == null) { + throw new MissingRequiredPropertyException("CoreDataArgs", "vpcId"); + } return $; } } diff --git a/sdk/java/src/main/java/com/pulumi/eks/inputs/CreationRoleProviderArgs.java b/sdk/java/src/main/java/com/pulumi/eks/inputs/CreationRoleProviderArgs.java index 6b3387d9a..63d9abcab 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/inputs/CreationRoleProviderArgs.java +++ b/sdk/java/src/main/java/com/pulumi/eks/inputs/CreationRoleProviderArgs.java @@ -6,6 +6,7 @@ import com.pulumi.aws.Provider; import com.pulumi.aws.iam.Role; import com.pulumi.core.annotations.Import; +import com.pulumi.exceptions.MissingRequiredPropertyException; import java.util.Objects; @@ -69,8 +70,12 @@ public Builder role(Role role) { } public CreationRoleProviderArgs build() { - $.provider = Objects.requireNonNull($.provider, "expected parameter 'provider' to be non-null"); - $.role = Objects.requireNonNull($.role, "expected parameter 'role' to be non-null"); + if ($.provider == null) { + throw new MissingRequiredPropertyException("CreationRoleProviderArgs", "provider"); + } + if ($.role == null) { + throw new MissingRequiredPropertyException("CreationRoleProviderArgs", "role"); + } return $; } } diff --git a/sdk/java/src/main/java/com/pulumi/eks/inputs/NodeadmOptionsArgs.java b/sdk/java/src/main/java/com/pulumi/eks/inputs/NodeadmOptionsArgs.java index b9ade58ac..7c07005e7 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/inputs/NodeadmOptionsArgs.java +++ b/sdk/java/src/main/java/com/pulumi/eks/inputs/NodeadmOptionsArgs.java @@ -5,6 +5,7 @@ import com.pulumi.core.Output; import com.pulumi.core.annotations.Import; +import com.pulumi.exceptions.MissingRequiredPropertyException; import java.lang.String; import java.util.Objects; @@ -117,8 +118,12 @@ public Builder contentType(String contentType) { } public NodeadmOptionsArgs build() { - $.content = Objects.requireNonNull($.content, "expected parameter 'content' to be non-null"); - $.contentType = Objects.requireNonNull($.contentType, "expected parameter 'contentType' to be non-null"); + if ($.content == null) { + throw new MissingRequiredPropertyException("NodeadmOptionsArgs", "content"); + } + if ($.contentType == null) { + throw new MissingRequiredPropertyException("NodeadmOptionsArgs", "contentType"); + } return $; } } diff --git a/sdk/java/src/main/java/com/pulumi/eks/inputs/RoleMappingArgs.java b/sdk/java/src/main/java/com/pulumi/eks/inputs/RoleMappingArgs.java index c9c9c3a3f..af86593e8 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/inputs/RoleMappingArgs.java +++ b/sdk/java/src/main/java/com/pulumi/eks/inputs/RoleMappingArgs.java @@ -5,6 +5,7 @@ import com.pulumi.core.Output; import com.pulumi.core.annotations.Import; +import com.pulumi.exceptions.MissingRequiredPropertyException; import java.lang.String; import java.util.List; import java.util.Objects; @@ -163,9 +164,15 @@ public Builder username(String username) { } public RoleMappingArgs build() { - $.groups = Objects.requireNonNull($.groups, "expected parameter 'groups' to be non-null"); - $.roleArn = Objects.requireNonNull($.roleArn, "expected parameter 'roleArn' to be non-null"); - $.username = Objects.requireNonNull($.username, "expected parameter 'username' to be non-null"); + if ($.groups == null) { + throw new MissingRequiredPropertyException("RoleMappingArgs", "groups"); + } + if ($.roleArn == null) { + throw new MissingRequiredPropertyException("RoleMappingArgs", "roleArn"); + } + if ($.username == null) { + throw new MissingRequiredPropertyException("RoleMappingArgs", "username"); + } return $; } } diff --git a/sdk/java/src/main/java/com/pulumi/eks/inputs/StorageClassArgs.java b/sdk/java/src/main/java/com/pulumi/eks/inputs/StorageClassArgs.java index 477f490bb..66ff89d5d 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/inputs/StorageClassArgs.java +++ b/sdk/java/src/main/java/com/pulumi/eks/inputs/StorageClassArgs.java @@ -5,6 +5,7 @@ import com.pulumi.core.Output; import com.pulumi.core.annotations.Import; +import com.pulumi.exceptions.MissingRequiredPropertyException; import com.pulumi.kubernetes.meta.v1.inputs.ObjectMetaArgs; import java.lang.Boolean; import java.lang.Integer; @@ -490,7 +491,9 @@ public Builder zones(String... zones) { } public StorageClassArgs build() { - $.type = Objects.requireNonNull($.type, "expected parameter 'type' to be non-null"); + if ($.type == null) { + throw new MissingRequiredPropertyException("StorageClassArgs", "type"); + } return $; } } diff --git a/sdk/java/src/main/java/com/pulumi/eks/inputs/TaintArgs.java b/sdk/java/src/main/java/com/pulumi/eks/inputs/TaintArgs.java index b3b14dc8b..d67636e02 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/inputs/TaintArgs.java +++ b/sdk/java/src/main/java/com/pulumi/eks/inputs/TaintArgs.java @@ -4,6 +4,7 @@ package com.pulumi.eks.inputs; import com.pulumi.core.annotations.Import; +import com.pulumi.exceptions.MissingRequiredPropertyException; import java.lang.String; import java.util.Objects; @@ -94,8 +95,12 @@ public Builder value(String value) { } public TaintArgs build() { - $.effect = Objects.requireNonNull($.effect, "expected parameter 'effect' to be non-null"); - $.value = Objects.requireNonNull($.value, "expected parameter 'value' to be non-null"); + if ($.effect == null) { + throw new MissingRequiredPropertyException("TaintArgs", "effect"); + } + if ($.value == null) { + throw new MissingRequiredPropertyException("TaintArgs", "value"); + } return $; } } diff --git a/sdk/java/src/main/java/com/pulumi/eks/inputs/UserMappingArgs.java b/sdk/java/src/main/java/com/pulumi/eks/inputs/UserMappingArgs.java index 0dda75cb2..7f5836af8 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/inputs/UserMappingArgs.java +++ b/sdk/java/src/main/java/com/pulumi/eks/inputs/UserMappingArgs.java @@ -5,6 +5,7 @@ import com.pulumi.core.Output; import com.pulumi.core.annotations.Import; +import com.pulumi.exceptions.MissingRequiredPropertyException; import java.lang.String; import java.util.List; import java.util.Objects; @@ -163,9 +164,15 @@ public Builder username(String username) { } public UserMappingArgs build() { - $.groups = Objects.requireNonNull($.groups, "expected parameter 'groups' to be non-null"); - $.userArn = Objects.requireNonNull($.userArn, "expected parameter 'userArn' to be non-null"); - $.username = Objects.requireNonNull($.username, "expected parameter 'username' to be non-null"); + if ($.groups == null) { + throw new MissingRequiredPropertyException("UserMappingArgs", "groups"); + } + if ($.userArn == null) { + throw new MissingRequiredPropertyException("UserMappingArgs", "userArn"); + } + if ($.username == null) { + throw new MissingRequiredPropertyException("UserMappingArgs", "username"); + } return $; } } diff --git a/sdk/java/src/main/java/com/pulumi/eks/outputs/AccessEntry.java b/sdk/java/src/main/java/com/pulumi/eks/outputs/AccessEntry.java index 784d80bb6..f273b3620 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/outputs/AccessEntry.java +++ b/sdk/java/src/main/java/com/pulumi/eks/outputs/AccessEntry.java @@ -6,6 +6,7 @@ import com.pulumi.core.annotations.CustomType; import com.pulumi.eks.enums.AccessEntryType; import com.pulumi.eks.outputs.AccessPolicyAssociation; +import com.pulumi.exceptions.MissingRequiredPropertyException; import java.lang.String; import java.util.List; import java.util.Map; @@ -120,11 +121,13 @@ public Builder(AccessEntry defaults) { @CustomType.Setter public Builder accessPolicies(@Nullable Map accessPolicies) { + this.accessPolicies = accessPolicies; return this; } @CustomType.Setter public Builder kubernetesGroups(@Nullable List kubernetesGroups) { + this.kubernetesGroups = kubernetesGroups; return this; } @@ -133,21 +136,27 @@ public Builder kubernetesGroups(String... kubernetesGroups) { } @CustomType.Setter public Builder principalArn(String principalArn) { - this.principalArn = Objects.requireNonNull(principalArn); + if (principalArn == null) { + throw new MissingRequiredPropertyException("AccessEntry", "principalArn"); + } + this.principalArn = principalArn; return this; } @CustomType.Setter public Builder tags(@Nullable Map tags) { + this.tags = tags; return this; } @CustomType.Setter public Builder type(@Nullable AccessEntryType type) { + this.type = type; return this; } @CustomType.Setter public Builder username(@Nullable String username) { + this.username = username; return this; } diff --git a/sdk/java/src/main/java/com/pulumi/eks/outputs/AccessPolicyAssociation.java b/sdk/java/src/main/java/com/pulumi/eks/outputs/AccessPolicyAssociation.java index 0a0e90b36..149c7630b 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/outputs/AccessPolicyAssociation.java +++ b/sdk/java/src/main/java/com/pulumi/eks/outputs/AccessPolicyAssociation.java @@ -5,6 +5,7 @@ import com.pulumi.aws.eks.outputs.AccessPolicyAssociationAccessScope; import com.pulumi.core.annotations.CustomType; +import com.pulumi.exceptions.MissingRequiredPropertyException; import java.lang.String; import java.util.Objects; @@ -57,12 +58,18 @@ public Builder(AccessPolicyAssociation defaults) { @CustomType.Setter public Builder accessScope(AccessPolicyAssociationAccessScope accessScope) { - this.accessScope = Objects.requireNonNull(accessScope); + if (accessScope == null) { + throw new MissingRequiredPropertyException("AccessPolicyAssociation", "accessScope"); + } + this.accessScope = accessScope; return this; } @CustomType.Setter public Builder policyArn(String policyArn) { - this.policyArn = Objects.requireNonNull(policyArn); + if (policyArn == null) { + throw new MissingRequiredPropertyException("AccessPolicyAssociation", "policyArn"); + } + this.policyArn = policyArn; return this; } public AccessPolicyAssociation build() { diff --git a/sdk/java/src/main/java/com/pulumi/eks/outputs/ClusterNodeGroupOptions.java b/sdk/java/src/main/java/com/pulumi/eks/outputs/ClusterNodeGroupOptions.java index 849565093..e9ce01e3a 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/outputs/ClusterNodeGroupOptions.java +++ b/sdk/java/src/main/java/com/pulumi/eks/outputs/ClusterNodeGroupOptions.java @@ -728,56 +728,67 @@ public Builder(ClusterNodeGroupOptions defaults) { @CustomType.Setter public Builder amiId(@Nullable String amiId) { + this.amiId = amiId; return this; } @CustomType.Setter public Builder amiType(@Nullable String amiType) { + this.amiType = amiType; return this; } @CustomType.Setter public Builder autoScalingGroupTags(@Nullable Map autoScalingGroupTags) { + this.autoScalingGroupTags = autoScalingGroupTags; return this; } @CustomType.Setter public Builder bootstrapExtraArgs(@Nullable String bootstrapExtraArgs) { + this.bootstrapExtraArgs = bootstrapExtraArgs; return this; } @CustomType.Setter public Builder bottlerocketSettings(@Nullable Map bottlerocketSettings) { + this.bottlerocketSettings = bottlerocketSettings; return this; } @CustomType.Setter public Builder cloudFormationTags(@Nullable Map cloudFormationTags) { + this.cloudFormationTags = cloudFormationTags; return this; } @CustomType.Setter public Builder clusterIngressRule(@Nullable SecurityGroupRule clusterIngressRule) { + this.clusterIngressRule = clusterIngressRule; return this; } @CustomType.Setter public Builder desiredCapacity(@Nullable Integer desiredCapacity) { + this.desiredCapacity = desiredCapacity; return this; } @CustomType.Setter public Builder enableDetailedMonitoring(@Nullable Boolean enableDetailedMonitoring) { + this.enableDetailedMonitoring = enableDetailedMonitoring; return this; } @CustomType.Setter public Builder encryptRootBlockDevice(@Nullable Boolean encryptRootBlockDevice) { + this.encryptRootBlockDevice = encryptRootBlockDevice; return this; } @CustomType.Setter public Builder extraNodeSecurityGroups(@Nullable List extraNodeSecurityGroups) { + this.extraNodeSecurityGroups = extraNodeSecurityGroups; return this; } @@ -786,41 +797,49 @@ public Builder extraNodeSecurityGroups(SecurityGroup... extraNodeSecurityGroups) } @CustomType.Setter public Builder gpu(@Nullable Boolean gpu) { + this.gpu = gpu; return this; } @CustomType.Setter public Builder ignoreScalingChanges(@Nullable Boolean ignoreScalingChanges) { + this.ignoreScalingChanges = ignoreScalingChanges; return this; } @CustomType.Setter public Builder instanceProfile(@Nullable InstanceProfile instanceProfile) { + this.instanceProfile = instanceProfile; return this; } @CustomType.Setter public Builder instanceType(@Nullable String instanceType) { + this.instanceType = instanceType; return this; } @CustomType.Setter public Builder keyName(@Nullable String keyName) { + this.keyName = keyName; return this; } @CustomType.Setter public Builder kubeletExtraArgs(@Nullable String kubeletExtraArgs) { + this.kubeletExtraArgs = kubeletExtraArgs; return this; } @CustomType.Setter public Builder labels(@Nullable Map labels) { + this.labels = labels; return this; } @CustomType.Setter public Builder launchTemplateTagSpecifications(@Nullable List launchTemplateTagSpecifications) { + this.launchTemplateTagSpecifications = launchTemplateTagSpecifications; return this; } @@ -829,66 +848,79 @@ public Builder launchTemplateTagSpecifications(LaunchTemplateTagSpecification... } @CustomType.Setter public Builder maxSize(@Nullable Integer maxSize) { + this.maxSize = maxSize; return this; } @CustomType.Setter public Builder minRefreshPercentage(@Nullable Integer minRefreshPercentage) { + this.minRefreshPercentage = minRefreshPercentage; return this; } @CustomType.Setter public Builder minSize(@Nullable Integer minSize) { + this.minSize = minSize; return this; } @CustomType.Setter public Builder nodeAssociatePublicIpAddress(@Nullable Boolean nodeAssociatePublicIpAddress) { + this.nodeAssociatePublicIpAddress = nodeAssociatePublicIpAddress; return this; } @CustomType.Setter public Builder nodePublicKey(@Nullable String nodePublicKey) { + this.nodePublicKey = nodePublicKey; return this; } @CustomType.Setter public Builder nodeRootVolumeDeleteOnTermination(@Nullable Boolean nodeRootVolumeDeleteOnTermination) { + this.nodeRootVolumeDeleteOnTermination = nodeRootVolumeDeleteOnTermination; return this; } @CustomType.Setter public Builder nodeRootVolumeEncrypted(@Nullable Boolean nodeRootVolumeEncrypted) { + this.nodeRootVolumeEncrypted = nodeRootVolumeEncrypted; return this; } @CustomType.Setter public Builder nodeRootVolumeIops(@Nullable Integer nodeRootVolumeIops) { + this.nodeRootVolumeIops = nodeRootVolumeIops; return this; } @CustomType.Setter public Builder nodeRootVolumeSize(@Nullable Integer nodeRootVolumeSize) { + this.nodeRootVolumeSize = nodeRootVolumeSize; return this; } @CustomType.Setter public Builder nodeRootVolumeThroughput(@Nullable Integer nodeRootVolumeThroughput) { + this.nodeRootVolumeThroughput = nodeRootVolumeThroughput; return this; } @CustomType.Setter public Builder nodeRootVolumeType(@Nullable String nodeRootVolumeType) { + this.nodeRootVolumeType = nodeRootVolumeType; return this; } @CustomType.Setter public Builder nodeSecurityGroup(@Nullable SecurityGroup nodeSecurityGroup) { + this.nodeSecurityGroup = nodeSecurityGroup; return this; } @CustomType.Setter public Builder nodeSubnetIds(@Nullable List nodeSubnetIds) { + this.nodeSubnetIds = nodeSubnetIds; return this; } @@ -897,16 +929,19 @@ public Builder nodeSubnetIds(String... nodeSubnetIds) { } @CustomType.Setter public Builder nodeUserData(@Nullable String nodeUserData) { + this.nodeUserData = nodeUserData; return this; } @CustomType.Setter public Builder nodeUserDataOverride(@Nullable String nodeUserDataOverride) { + this.nodeUserDataOverride = nodeUserDataOverride; return this; } @CustomType.Setter public Builder nodeadmExtraOptions(@Nullable List nodeadmExtraOptions) { + this.nodeadmExtraOptions = nodeadmExtraOptions; return this; } @@ -915,21 +950,25 @@ public Builder nodeadmExtraOptions(NodeadmOptions... nodeadmExtraOptions) { } @CustomType.Setter public Builder operatingSystem(@Nullable OperatingSystem operatingSystem) { + this.operatingSystem = operatingSystem; return this; } @CustomType.Setter public Builder spotPrice(@Nullable String spotPrice) { + this.spotPrice = spotPrice; return this; } @CustomType.Setter public Builder taints(@Nullable Map taints) { + this.taints = taints; return this; } @CustomType.Setter public Builder version(@Nullable String version) { + this.version = version; return this; } 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 9e5a1a958..3867cdb50 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 @@ -14,6 +14,7 @@ import com.pulumi.eks.VpcCniAddon; import com.pulumi.eks.outputs.AccessEntry; import com.pulumi.eks.outputs.ClusterNodeGroupOptions; +import com.pulumi.exceptions.MissingRequiredPropertyException; import com.pulumi.kubernetes.core.v1.ConfigMap; import com.pulumi.kubernetes.storage.v1.StorageClass; import java.lang.Object; @@ -297,6 +298,7 @@ public Builder(CoreData defaults) { @CustomType.Setter public Builder accessEntries(@Nullable List accessEntries) { + this.accessEntries = accessEntries; return this; } @@ -305,47 +307,66 @@ public Builder accessEntries(AccessEntry... accessEntries) { } @CustomType.Setter public Builder awsProvider(@Nullable Provider awsProvider) { + this.awsProvider = awsProvider; return this; } @CustomType.Setter public Builder cluster(Cluster cluster) { - this.cluster = Objects.requireNonNull(cluster); + if (cluster == null) { + throw new MissingRequiredPropertyException("CoreData", "cluster"); + } + this.cluster = cluster; return this; } @CustomType.Setter public Builder clusterIamRole(Role clusterIamRole) { - this.clusterIamRole = Objects.requireNonNull(clusterIamRole); + if (clusterIamRole == null) { + throw new MissingRequiredPropertyException("CoreData", "clusterIamRole"); + } + this.clusterIamRole = clusterIamRole; return this; } @CustomType.Setter public Builder clusterSecurityGroup(SecurityGroup clusterSecurityGroup) { - this.clusterSecurityGroup = Objects.requireNonNull(clusterSecurityGroup); + if (clusterSecurityGroup == null) { + throw new MissingRequiredPropertyException("CoreData", "clusterSecurityGroup"); + } + this.clusterSecurityGroup = clusterSecurityGroup; return this; } @CustomType.Setter public Builder eksNodeAccess(@Nullable ConfigMap eksNodeAccess) { + this.eksNodeAccess = eksNodeAccess; return this; } @CustomType.Setter public Builder encryptionConfig(@Nullable ClusterEncryptionConfig encryptionConfig) { + this.encryptionConfig = encryptionConfig; return this; } @CustomType.Setter public Builder endpoint(String endpoint) { - this.endpoint = Objects.requireNonNull(endpoint); + if (endpoint == null) { + throw new MissingRequiredPropertyException("CoreData", "endpoint"); + } + this.endpoint = endpoint; return this; } @CustomType.Setter public Builder fargateProfile(@Nullable FargateProfile fargateProfile) { + this.fargateProfile = fargateProfile; return this; } @CustomType.Setter public Builder instanceRoles(List instanceRoles) { - this.instanceRoles = Objects.requireNonNull(instanceRoles); + if (instanceRoles == null) { + throw new MissingRequiredPropertyException("CoreData", "instanceRoles"); + } + this.instanceRoles = instanceRoles; return this; } public Builder instanceRoles(Role... instanceRoles) { @@ -353,26 +374,33 @@ public Builder instanceRoles(Role... instanceRoles) { } @CustomType.Setter public Builder kubeconfig(@Nullable Object kubeconfig) { + this.kubeconfig = kubeconfig; return this; } @CustomType.Setter public Builder nodeGroupOptions(ClusterNodeGroupOptions nodeGroupOptions) { - this.nodeGroupOptions = Objects.requireNonNull(nodeGroupOptions); + if (nodeGroupOptions == null) { + throw new MissingRequiredPropertyException("CoreData", "nodeGroupOptions"); + } + this.nodeGroupOptions = nodeGroupOptions; return this; } @CustomType.Setter public Builder nodeSecurityGroupTags(@Nullable Map nodeSecurityGroupTags) { + this.nodeSecurityGroupTags = nodeSecurityGroupTags; return this; } @CustomType.Setter public Builder oidcProvider(@Nullable OpenIdConnectProvider oidcProvider) { + this.oidcProvider = oidcProvider; return this; } @CustomType.Setter public Builder privateSubnetIds(@Nullable List privateSubnetIds) { + this.privateSubnetIds = privateSubnetIds; return this; } @@ -381,11 +409,15 @@ public Builder privateSubnetIds(String... privateSubnetIds) { } @CustomType.Setter public Builder provider(com.pulumi.kubernetes.Provider provider) { - this.provider = Objects.requireNonNull(provider); + if (provider == null) { + throw new MissingRequiredPropertyException("CoreData", "provider"); + } + this.provider = provider; return this; } @CustomType.Setter public Builder publicSubnetIds(@Nullable List publicSubnetIds) { + this.publicSubnetIds = publicSubnetIds; return this; } @@ -394,12 +426,16 @@ public Builder publicSubnetIds(String... publicSubnetIds) { } @CustomType.Setter public Builder storageClasses(@Nullable Map storageClasses) { + this.storageClasses = storageClasses; return this; } @CustomType.Setter public Builder subnetIds(List subnetIds) { - this.subnetIds = Objects.requireNonNull(subnetIds); + if (subnetIds == null) { + throw new MissingRequiredPropertyException("CoreData", "subnetIds"); + } + this.subnetIds = subnetIds; return this; } public Builder subnetIds(String... subnetIds) { @@ -407,17 +443,22 @@ public Builder subnetIds(String... subnetIds) { } @CustomType.Setter public Builder tags(@Nullable Map tags) { + this.tags = tags; return this; } @CustomType.Setter public Builder vpcCni(@Nullable VpcCniAddon vpcCni) { + this.vpcCni = vpcCni; return this; } @CustomType.Setter public Builder vpcId(String vpcId) { - this.vpcId = Objects.requireNonNull(vpcId); + if (vpcId == null) { + throw new MissingRequiredPropertyException("CoreData", "vpcId"); + } + this.vpcId = vpcId; return this; } public CoreData build() { diff --git a/sdk/java/src/main/java/com/pulumi/eks/outputs/NodeGroupData.java b/sdk/java/src/main/java/com/pulumi/eks/outputs/NodeGroupData.java index 65a3839e6..2f218637f 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/outputs/NodeGroupData.java +++ b/sdk/java/src/main/java/com/pulumi/eks/outputs/NodeGroupData.java @@ -5,6 +5,7 @@ import com.pulumi.aws.ec2.SecurityGroup; import com.pulumi.core.annotations.CustomType; +import com.pulumi.exceptions.MissingRequiredPropertyException; import java.lang.String; import java.util.List; import java.util.Objects; @@ -72,12 +73,18 @@ public Builder(NodeGroupData defaults) { @CustomType.Setter public Builder autoScalingGroupName(String autoScalingGroupName) { - this.autoScalingGroupName = Objects.requireNonNull(autoScalingGroupName); + if (autoScalingGroupName == null) { + throw new MissingRequiredPropertyException("NodeGroupData", "autoScalingGroupName"); + } + this.autoScalingGroupName = autoScalingGroupName; return this; } @CustomType.Setter public Builder extraNodeSecurityGroups(List extraNodeSecurityGroups) { - this.extraNodeSecurityGroups = Objects.requireNonNull(extraNodeSecurityGroups); + if (extraNodeSecurityGroups == null) { + throw new MissingRequiredPropertyException("NodeGroupData", "extraNodeSecurityGroups"); + } + this.extraNodeSecurityGroups = extraNodeSecurityGroups; return this; } public Builder extraNodeSecurityGroups(SecurityGroup... extraNodeSecurityGroups) { @@ -85,7 +92,10 @@ public Builder extraNodeSecurityGroups(SecurityGroup... extraNodeSecurityGroups) } @CustomType.Setter public Builder nodeSecurityGroup(SecurityGroup nodeSecurityGroup) { - this.nodeSecurityGroup = Objects.requireNonNull(nodeSecurityGroup); + if (nodeSecurityGroup == null) { + throw new MissingRequiredPropertyException("NodeGroupData", "nodeSecurityGroup"); + } + this.nodeSecurityGroup = nodeSecurityGroup; return this; } public NodeGroupData build() { diff --git a/sdk/java/src/main/java/com/pulumi/eks/outputs/NodeadmOptions.java b/sdk/java/src/main/java/com/pulumi/eks/outputs/NodeadmOptions.java index 13a75d120..a1cd7f0af 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/outputs/NodeadmOptions.java +++ b/sdk/java/src/main/java/com/pulumi/eks/outputs/NodeadmOptions.java @@ -4,6 +4,7 @@ package com.pulumi.eks.outputs; import com.pulumi.core.annotations.CustomType; +import com.pulumi.exceptions.MissingRequiredPropertyException; import java.lang.String; import java.util.Objects; @@ -56,12 +57,18 @@ public Builder(NodeadmOptions defaults) { @CustomType.Setter public Builder content(String content) { - this.content = Objects.requireNonNull(content); + if (content == null) { + throw new MissingRequiredPropertyException("NodeadmOptions", "content"); + } + this.content = content; return this; } @CustomType.Setter public Builder contentType(String contentType) { - this.contentType = Objects.requireNonNull(contentType); + if (contentType == null) { + throw new MissingRequiredPropertyException("NodeadmOptions", "contentType"); + } + this.contentType = contentType; return this; } public NodeadmOptions build() { diff --git a/sdk/java/src/main/java/com/pulumi/eks/outputs/Taint.java b/sdk/java/src/main/java/com/pulumi/eks/outputs/Taint.java index 49b901fed..fe6eec0d9 100644 --- a/sdk/java/src/main/java/com/pulumi/eks/outputs/Taint.java +++ b/sdk/java/src/main/java/com/pulumi/eks/outputs/Taint.java @@ -4,6 +4,7 @@ package com.pulumi.eks.outputs; import com.pulumi.core.annotations.CustomType; +import com.pulumi.exceptions.MissingRequiredPropertyException; import java.lang.String; import java.util.Objects; @@ -56,12 +57,18 @@ public Builder(Taint defaults) { @CustomType.Setter public Builder effect(String effect) { - this.effect = Objects.requireNonNull(effect); + if (effect == null) { + throw new MissingRequiredPropertyException("Taint", "effect"); + } + this.effect = effect; return this; } @CustomType.Setter public Builder value(String value) { - this.value = Objects.requireNonNull(value); + if (value == null) { + throw new MissingRequiredPropertyException("Taint", "value"); + } + this.value = value; return this; } public Taint build() { diff --git a/sdk/nodejs/package.json b/sdk/nodejs/package.json index 5f17a4f23..a755ab405 100644 --- a/sdk/nodejs/package.json +++ b/sdk/nodejs/package.json @@ -1,6 +1,6 @@ { "name": "@pulumi/eks", - "version": "2.0.0-alpha.0+dev", + "version": "3.0.0-alpha.0+dev", "keywords": [ "pulumi", "aws", @@ -34,6 +34,6 @@ "pulumi": { "resource": true, "name": "eks", - "version": "2.0.0-alpha.0+dev" + "version": "3.0.0-alpha.0+dev" } } diff --git a/sdk/python/pulumi_eks/pulumi-plugin.json b/sdk/python/pulumi_eks/pulumi-plugin.json index 0244f9406..82c03af58 100644 --- a/sdk/python/pulumi_eks/pulumi-plugin.json +++ b/sdk/python/pulumi_eks/pulumi-plugin.json @@ -1,5 +1,5 @@ { "resource": true, "name": "eks", - "version": "2.0.0-alpha.0+dev" + "version": "3.0.0-alpha.0+dev" } diff --git a/sdk/python/pyproject.toml b/sdk/python/pyproject.toml index f57e14f73..d6d842fbf 100644 --- a/sdk/python/pyproject.toml +++ b/sdk/python/pyproject.toml @@ -5,7 +5,7 @@ keywords = ["pulumi", "aws", "eks"] readme = "README.md" requires-python = ">=3.8" - version = "2.0.0a0+dev" + version = "3.0.0a0+dev" [project.license] text = "Apache-2.0" [project.urls]