Skip to content

Commit

Permalink
Upgrade javagen to v0.16.1 (#1408)
Browse files Browse the repository at this point in the history
Upgrades javagen to v0.16.1. This might solve the problems in #1402
  • Loading branch information
flostadler authored Sep 30, 2024
1 parent 3fa365a commit 120f84d
Show file tree
Hide file tree
Showing 46 changed files with 402 additions and 134 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion sdk/dotnet/Pulumi.Eks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<PackageProjectUrl>https://pulumi.com</PackageProjectUrl>
<RepositoryUrl>https://github.com/pulumi/pulumi-eks</RepositoryUrl>
<PackageIcon>logo.png</PackageIcon>
<Version>2.0.0-alpha.0+dev</Version>
<Version>3.0.0-alpha.0+dev</Version>

<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
Expand Down
2 changes: 1 addition & 1 deletion sdk/dotnet/pulumi-plugin.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"resource": true,
"name": "eks",
"version": "2.0.0-alpha.0+dev"
"version": "3.0.0-alpha.0+dev"
}
4 changes: 2 additions & 2 deletions sdk/java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -152,4 +152,4 @@ if (signingKey) {
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mainPublication
}
}
}
17 changes: 12 additions & 5 deletions sdk/java/src/main/java/com/pulumi/eks/Addon.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ 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);
}
/**
*
* @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);
}
/**
Expand All @@ -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<String> 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<java.lang.String> id) {
var defaultOptions = com.pulumi.resources.ComponentResourceOptions.builder()
.version(Utilities.getVersion())
.build();
Expand Down
9 changes: 7 additions & 2 deletions sdk/java/src/main/java/com/pulumi/eks/AddonArgs.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -395,8 +396,12 @@ public Builder tags(Map<String,String>... 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 $;
}
}
Expand Down
29 changes: 19 additions & 10 deletions sdk/java/src/main/java/com/pulumi/eks/Cluster.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
*
* &lt;!--Start PulumiCodeChooser --&gt;
*
* ```java
* <pre>
* {@code
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
Expand All @@ -49,13 +50,14 @@
*
* public static void stack(Context ctx) {
* // Create an EKS cluster with the default configuration.
* var cluster = new Cluster(&#34;cluster&#34;);
* var cluster = new Cluster("cluster");
*
* // Export the cluster&#39;s kubeconfig.
* ctx.export(&#34;kubeconfig&#34;, cluster.kubeconfig());
* // Export the cluster's kubeconfig.
* ctx.export("kubeconfig", cluster.kubeconfig());
* }
* }
* ```
* }
* </pre>
* &lt;!--End PulumiCodeChooser --&gt;
*
*/
Expand Down Expand Up @@ -206,15 +208,15 @@ public Output<SecurityGroup> nodeSecurityGroup() {
*
* @param name The _unique_ name of the resulting resource.
*/
public Cluster(String name) {
public Cluster(java.lang.String name) {
this(name, ClusterArgs.Empty);
}
/**
*
* @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);
}
/**
Expand All @@ -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<String> 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<java.lang.String> id) {
var defaultOptions = com.pulumi.resources.ComponentResourceOptions.builder()
.version(Utilities.getVersion())
.build();
Expand Down
12 changes: 6 additions & 6 deletions sdk/java/src/main/java/com/pulumi/eks/ClusterArgs.java
Original file line number Diff line number Diff line change
Expand Up @@ -790,12 +790,12 @@ public Optional<Output<KubeconfigOptionsArgs>> providerCredentialOpts() {
* This option is required iff the proxy environment variables are not set.
*
* Format: &lt;protocol&gt;://&lt;host&gt;:&lt;port&gt;
* Auth Format: &lt;protocol&gt;://&lt;username&gt;:&lt;password&gt;@&lt;host&gt;:&lt;port&gt;
* Auth Format: &lt;protocol&gt;://&lt;username&gt;:&lt;password&gt;{@literal @}&lt;host&gt;:&lt;port&gt;
*
* Ex:
* - &#34;http://proxy.example.com:3128&#34;
* - &#34;https://proxy.example.com&#34;
* - &#34;http://username:password@proxy.example.com:3128&#34;
* - &#34;http://username:password{@literal @}proxy.example.com:3128&#34;
*
*/
@Import(name="proxy")
Expand All @@ -811,12 +811,12 @@ public Optional<Output<KubeconfigOptionsArgs>> providerCredentialOpts() {
* This option is required iff the proxy environment variables are not set.
*
* Format: &lt;protocol&gt;://&lt;host&gt;:&lt;port&gt;
* Auth Format: &lt;protocol&gt;://&lt;username&gt;:&lt;password&gt;@&lt;host&gt;:&lt;port&gt;
* Auth Format: &lt;protocol&gt;://&lt;username&gt;:&lt;password&gt;{@literal @}&lt;host&gt;:&lt;port&gt;
*
* Ex:
* - &#34;http://proxy.example.com:3128&#34;
* - &#34;https://proxy.example.com&#34;
* - &#34;http://username:password@proxy.example.com:3128&#34;
* - &#34;http://username:password{@literal @}proxy.example.com:3128&#34;
*
*/
public Optional<String> proxy() {
Expand Down Expand Up @@ -2129,12 +2129,12 @@ public Builder providerCredentialOpts(KubeconfigOptionsArgs providerCredentialOp
* This option is required iff the proxy environment variables are not set.
*
* Format: &lt;protocol&gt;://&lt;host&gt;:&lt;port&gt;
* Auth Format: &lt;protocol&gt;://&lt;username&gt;:&lt;password&gt;@&lt;host&gt;:&lt;port&gt;
* Auth Format: &lt;protocol&gt;://&lt;username&gt;:&lt;password&gt;{@literal @}&lt;host&gt;:&lt;port&gt;
*
* Ex:
* - &#34;http://proxy.example.com:3128&#34;
* - &#34;https://proxy.example.com&#34;
* - &#34;http://username:password@proxy.example.com:3128&#34;
* - &#34;http://username:password{@literal @}proxy.example.com:3128&#34;
*
* @return builder
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ public Output<Role> role() {
*
* @param name The _unique_ name of the resulting resource.
*/
public ClusterCreationRoleProvider(String name) {
public ClusterCreationRoleProvider(java.lang.String name) {
this(name, ClusterCreationRoleProviderArgs.Empty);
}
/**
*
* @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);
}
/**
Expand All @@ -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<String> 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<java.lang.String> id) {
var defaultOptions = com.pulumi.resources.ComponentResourceOptions.builder()
.version(Utilities.getVersion())
.build();
Expand Down
17 changes: 12 additions & 5 deletions sdk/java/src/main/java/com/pulumi/eks/ManagedNodeGroup.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ public Output<NodeGroup> nodeGroup() {
*
* @param name The _unique_ name of the resulting resource.
*/
public ManagedNodeGroup(String name) {
public ManagedNodeGroup(java.lang.String name) {
this(name, ManagedNodeGroupArgs.Empty);
}
/**
*
* @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);
}
/**
Expand All @@ -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<String> 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<java.lang.String> id) {
var defaultOptions = com.pulumi.resources.ComponentResourceOptions.builder()
.version(Utilities.getVersion())
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 $;
}
}
Expand Down
17 changes: 12 additions & 5 deletions sdk/java/src/main/java/com/pulumi/eks/NodeGroup.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ public Output<SecurityGroup> nodeSecurityGroup() {
*
* @param name The _unique_ name of the resulting resource.
*/
public NodeGroup(String name) {
public NodeGroup(java.lang.String name) {
this(name, NodeGroupArgs.Empty);
}
/**
*
* @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);
}
/**
Expand All @@ -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<String> 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<java.lang.String> id) {
var defaultOptions = com.pulumi.resources.ComponentResourceOptions.builder()
.version(Utilities.getVersion())
.build();
Expand Down
5 changes: 4 additions & 1 deletion sdk/java/src/main/java/com/pulumi/eks/NodeGroupArgs.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 $;
}
}
Expand Down
Loading

0 comments on commit 120f84d

Please sign in to comment.