... 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