diff --git a/CHANGELOG.md b/CHANGELOG.md index ef2e07dea45..f6b83010003 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ CHANGELOG ========= +## Unreleased + +### Improvements + +- Provider configuration is no longer serialized to JSON. This improves secret management for providers and does not + impact public APIs. [#1308](https://github.com/pulumi/pulumi-java/pull/1308) + ## 0.9.9 (2023-12-27) ### Improvements diff --git a/pkg/codegen/java/gen.go b/pkg/codegen/java/gen.go index cc1af7210f9..b69d861a142 100644 --- a/pkg/codegen/java/gen.go +++ b/pkg/codegen/java/gen.go @@ -435,18 +435,6 @@ func (pt *plainType) genInputProperty(ctx *classFileContext, prop *schema.Proper if prop.IsRequired() { attributeArgs = ", required=true" } - if pt.res != nil && pt.res.IsProvider { - pType := codegen.UnwrapType(prop.Type) - json := true - if pType == schema.StringType { - json = false - } else if t, ok := pType.(*schema.TokenType); ok && t.UnderlyingType == schema.StringType { - json = false - } - if json { - attributeArgs += ", json=true" - } - } const indent = " " genPropJavadoc(ctx, prop, propJavadocOptions{ diff --git a/pkg/codegen/testing/test/testdata/akamai/java/src/main/java/com/pulumi/akamai/ProviderArgs.java b/pkg/codegen/testing/test/testdata/akamai/java/src/main/java/com/pulumi/akamai/ProviderArgs.java index f892fe3ed6a..8811c28e590 100644 --- a/pkg/codegen/testing/test/testdata/akamai/java/src/main/java/com/pulumi/akamai/ProviderArgs.java +++ b/pkg/codegen/testing/test/testdata/akamai/java/src/main/java/com/pulumi/akamai/ProviderArgs.java @@ -18,14 +18,14 @@ public final class ProviderArgs extends com.pulumi.resources.ResourceArgs { public static final ProviderArgs Empty = new ProviderArgs(); - @Import(name="cacheEnabled", json=true) + @Import(name="cacheEnabled") private @Nullable Output cacheEnabled; public Optional> cacheEnabled() { return Optional.ofNullable(this.cacheEnabled); } - @Import(name="config", json=true) + @Import(name="config") private @Nullable Output config; public Optional> config() { @@ -58,7 +58,7 @@ public Optional> edgerc() { * The maximum number of API requests to be made per second (0 for no limit) * */ - @Import(name="requestLimit", json=true) + @Import(name="requestLimit") private @Nullable Output requestLimit; /** diff --git a/pkg/codegen/testing/test/testdata/mini-kubernetes/java/src/main/java/com/pulumi/kubernetes/ProviderArgs.java b/pkg/codegen/testing/test/testdata/mini-kubernetes/java/src/main/java/com/pulumi/kubernetes/ProviderArgs.java index 24161f97eb3..300ad7e33cb 100644 --- a/pkg/codegen/testing/test/testdata/mini-kubernetes/java/src/main/java/com/pulumi/kubernetes/ProviderArgs.java +++ b/pkg/codegen/testing/test/testdata/mini-kubernetes/java/src/main/java/com/pulumi/kubernetes/ProviderArgs.java @@ -51,7 +51,7 @@ public Optional> context() { * Options for tuning the Kubernetes client used by a Provider. * */ - @Import(name="kubeClientSettings", json=true) + @Import(name="kubeClientSettings") private @Nullable Output kubeClientSettings; /** diff --git a/pkg/codegen/testing/test/testdata/regress-go-12971/java/src/main/java/com/pulumi/world/ProviderArgs.java b/pkg/codegen/testing/test/testdata/regress-go-12971/java/src/main/java/com/pulumi/world/ProviderArgs.java index ed72dfb053b..f6644ae63c1 100644 --- a/pkg/codegen/testing/test/testdata/regress-go-12971/java/src/main/java/com/pulumi/world/ProviderArgs.java +++ b/pkg/codegen/testing/test/testdata/regress-go-12971/java/src/main/java/com/pulumi/world/ProviderArgs.java @@ -25,14 +25,14 @@ public Optional> name() { return Optional.ofNullable(this.name); } - @Import(name="populated", json=true) + @Import(name="populated") private @Nullable Output populated; public Optional> populated() { return Optional.ofNullable(this.populated); } - @Import(name="radiusKm", json=true) + @Import(name="radiusKm") private @Nullable Output radiusKm; public Optional> radiusKm() {