diff --git a/.pulumi.version b/.pulumi.version index 92ab603e..3fdcb7df 100644 --- a/.pulumi.version +++ b/.pulumi.version @@ -1 +1 @@ -3.142.0 +3.143.0 diff --git a/provider/cmd/pulumi-resource-command/schema.json b/provider/cmd/pulumi-resource-command/schema.json index b0c4aacc..a1b8e033 100644 --- a/provider/cmd/pulumi-resource-command/schema.json +++ b/provider/cmd/pulumi-resource-command/schema.json @@ -30,11 +30,6 @@ }, "java": { "buildFiles": "gradle", - "dependencies": { - "com.google.code.findbugs:jsr305": "3.0.2", - "com.google.code.gson:gson": "2.8.9", - "com.pulumi:pulumi": "0.10.0" - }, "gradleNexusPublishPluginVersion": "2.0.0" }, "nodejs": { diff --git a/provider/go.mod b/provider/go.mod index 2e13b731..fcaeb244 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -11,7 +11,7 @@ require ( github.com/pkg/sftp v1.13.6 github.com/pulumi/providertest v0.1.3 github.com/pulumi/pulumi-go-provider v0.24.0 - github.com/pulumi/pulumi/sdk/v3 v3.142.0 + github.com/pulumi/pulumi/sdk/v3 v3.143.0 github.com/stretchr/testify v1.9.0 golang.org/x/crypto v0.31.0 ) @@ -140,7 +140,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 // indirect github.com/pulumi/esc v0.10.0 // indirect - github.com/pulumi/pulumi/pkg/v3 v3.142.0 // indirect + github.com/pulumi/pulumi/pkg/v3 v3.143.0 // indirect github.com/rivo/uniseg v0.4.7 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/ryanuber/go-glob v1.0.0 // indirect diff --git a/provider/go.sum b/provider/go.sum index ded5f1cd..7e06a8a5 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -363,10 +363,10 @@ github.com/pulumi/providertest v0.1.3 h1:GpNKRy/haNjRHiUA9bi4diU4Op2zf3axYXbga5A github.com/pulumi/providertest v0.1.3/go.mod h1:GcsqEGgSngwaNOD+kICJPIUQlnA911fGBU8HDlJvVL0= github.com/pulumi/pulumi-go-provider v0.24.0 h1:aMvl7RvNBsrZMaE/RXmw8h8o6AzO6YOB69HRpJAlgtk= github.com/pulumi/pulumi-go-provider v0.24.0/go.mod h1:ckAHu+Kp0vTdnaVB0s0zJC/b6axoakyPMQXgyQ+ZMFM= -github.com/pulumi/pulumi/pkg/v3 v3.142.0 h1:UE8TFyXrlxvPrATpd3Kl3En34KrFIFWOxxNAodywPNU= -github.com/pulumi/pulumi/pkg/v3 v3.142.0/go.mod h1:3k6WwRIT7veiDnk3Yo2NtqEYX+4dgLCrMIFvEOnjQqI= -github.com/pulumi/pulumi/sdk/v3 v3.142.0 h1:SmcVddGuvwAh3g3XUVQQ5gVRQUKH1yZ6iETpDNHIHlw= -github.com/pulumi/pulumi/sdk/v3 v3.142.0/go.mod h1:PvKsX88co8XuwuPdzolMvew5lZV+4JmZfkeSjj7A6dI= +github.com/pulumi/pulumi/pkg/v3 v3.143.0 h1:diAlaNVZSRc59ePqbMuvuf/AwecpZyjhh1pGvmLEUwg= +github.com/pulumi/pulumi/pkg/v3 v3.143.0/go.mod h1:XzjN1uQI2HWXYolT2L4RIXzvLEnWTSOzFgFFIUfFEa8= +github.com/pulumi/pulumi/sdk/v3 v3.143.0 h1:z1m8Fc6l723eU2J/bP7UHE5t6WbBu4iIDAl1WaalQk4= +github.com/pulumi/pulumi/sdk/v3 v3.143.0/go.mod h1:OFpZabILGxrFqzcABFpMCksrHGVp4ymRM2BkKjlazDY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= diff --git a/provider/pkg/provider/provider.go b/provider/pkg/provider/provider.go index 023a114b..8f7c779e 100644 --- a/provider/pkg/provider/provider.go +++ b/provider/pkg/provider/provider.go @@ -70,11 +70,6 @@ func NewProvider() p.Provider { "java": map[string]any{ "buildFiles": "gradle", "gradleNexusPublishPluginVersion": "2.0.0", - "dependencies": map[string]any{ - "com.pulumi:pulumi": "0.10.0", - "com.google.code.gson:gson": "2.8.9", - "com.google.code.findbugs:jsr305": "3.0.2", - }, }, }, }, diff --git a/sdk/dotnet/Local/Run.cs b/sdk/dotnet/Local/Run.cs index 02db6bbf..5a128888 100644 --- a/sdk/dotnet/Local/Run.cs +++ b/sdk/dotnet/Local/Run.cs @@ -24,6 +24,13 @@ public static Task InvokeAsync(RunArgs args, InvokeOptions? options = /// public static Output Invoke(RunInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("command:local:run", args ?? new RunInvokeArgs(), options.WithDefaults()); + + /// + /// A local command to be executed. + /// This command will always be run on any preview or deployment. Use `local.Command` to avoid duplicating executions. + /// + public static Output Invoke(RunInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("command:local:run", args ?? new RunInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/Utilities.cs b/sdk/dotnet/Utilities.cs index f058b199..fe723232 100644 --- a/sdk/dotnet/Utilities.cs +++ b/sdk/dotnet/Utilities.cs @@ -56,6 +56,13 @@ static class Utilities return dst; } + public static global::Pulumi.InvokeOutputOptions WithDefaults(this global::Pulumi.InvokeOutputOptions? src) + { + var dst = src ?? new global::Pulumi.InvokeOutputOptions{}; + dst.Version = src?.Version ?? Version; + return dst; + } + private readonly static string version; public static string Version => version; diff --git a/sdk/go/command/local/run.go b/sdk/go/command/local/run.go index aa18b7eb..3e20939c 100644 --- a/sdk/go/command/local/run.go +++ b/sdk/go/command/local/run.go @@ -183,23 +183,12 @@ func (val *RunResult) Defaults() *RunResult { } return &tmp } - func RunOutput(ctx *pulumi.Context, args RunOutputArgs, opts ...pulumi.InvokeOption) RunResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (RunResultOutput, error) { args := v.(RunArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv RunResult - secret, err := ctx.InvokePackageRaw("command:local:run", args.Defaults(), &rv, "", opts...) - if err != nil { - return RunResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(RunResultOutput) - if secret { - return pulumi.ToSecret(output).(RunResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("command:local:run", args.Defaults(), RunResultOutput{}, options).(RunResultOutput), nil }).(RunResultOutput) } diff --git a/sdk/java/build.gradle b/sdk/java/build.gradle index 70cdca48..93f86abd 100644 --- a/sdk/java/build.gradle +++ b/sdk/java/build.gradle @@ -44,7 +44,7 @@ repositories { dependencies { implementation("com.google.code.findbugs:jsr305:3.0.2") implementation("com.google.code.gson:gson:2.8.9") - implementation("com.pulumi:pulumi:0.10.0") + implementation("com.pulumi:pulumi:0.18.0") } task sourcesJar(type: Jar) { diff --git a/sdk/java/src/main/java/com/pulumi/command/Utilities.java b/sdk/java/src/main/java/com/pulumi/command/Utilities.java index 7d12a056..15915732 100644 --- a/sdk/java/src/main/java/com/pulumi/command/Utilities.java +++ b/sdk/java/src/main/java/com/pulumi/command/Utilities.java @@ -14,6 +14,7 @@ import javax.annotation.Nullable; import com.pulumi.core.internal.Environment; import com.pulumi.deployment.InvokeOptions; +import com.pulumi.deployment.InvokeOutputOptions; public class Utilities { @@ -57,16 +58,28 @@ public static Optional getEnvDouble(java.lang.String... names) return Optional.empty(); } - public static InvokeOptions withVersion(@Nullable InvokeOptions options) { - if (options != null && options.getVersion().isPresent()) { - return options; - } - return new InvokeOptions( - options == null ? null : options.getParent().orElse(null), - options == null ? null : options.getProvider().orElse(null), - getVersion() - ); + public static InvokeOptions withVersion(@Nullable InvokeOptions options) { + if (options != null && options.getVersion().isPresent()) { + return options; + } + return new InvokeOptions( + options == null ? null : options.getParent().orElse(null), + options == null ? null : options.getProvider().orElse(null), + getVersion() + ); + } + + public static InvokeOutputOptions withVersion(@Nullable InvokeOutputOptions options) { + if (options != null && options.getVersion().isPresent()) { + return options; } + return new InvokeOutputOptions( + options == null ? null : options.getParent().orElse(null), + options == null ? null : options.getProvider().orElse(null), + getVersion(), + options == null ? null : options.getDependsOn() + ); + } private static final java.lang.String version; public static java.lang.String getVersion() { diff --git a/sdk/java/src/main/java/com/pulumi/command/local/LocalFunctions.java b/sdk/java/src/main/java/com/pulumi/command/local/LocalFunctions.java index afa69e91..0cd25f4d 100644 --- a/sdk/java/src/main/java/com/pulumi/command/local/LocalFunctions.java +++ b/sdk/java/src/main/java/com/pulumi/command/local/LocalFunctions.java @@ -11,6 +11,7 @@ import com.pulumi.core.TypeShape; import com.pulumi.deployment.Deployment; import com.pulumi.deployment.InvokeOptions; +import com.pulumi.deployment.InvokeOutputOptions; import java.util.concurrent.CompletableFuture; public final class LocalFunctions { @@ -38,6 +39,14 @@ public static CompletableFuture runPlain(RunPlainArgs args) { public static Output run(RunArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("command:local:run", TypeShape.of(RunResult.class), args, Utilities.withVersion(options)); } + /** + * A local command to be executed. + * This command will always be run on any preview or deployment. Use `local.Command` to avoid duplicating executions. + * + */ + public static Output run(RunArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("command:local:run", TypeShape.of(RunResult.class), args, Utilities.withVersion(options)); + } /** * A local command to be executed. * This command will always be run on any preview or deployment. Use `local.Command` to avoid duplicating executions. diff --git a/sdk/nodejs/package.json b/sdk/nodejs/package.json index f6ac5938..8d8b4d37 100644 --- a/sdk/nodejs/package.json +++ b/sdk/nodejs/package.json @@ -14,7 +14,7 @@ "build": "tsc" }, "dependencies": { - "@pulumi/pulumi": "^3.136.0" + "@pulumi/pulumi": "^3.142.0" }, "devDependencies": { "@types/node": "^14", diff --git a/sdk/python/pyproject.toml b/sdk/python/pyproject.toml index b4c6b82c..c2295b18 100644 --- a/sdk/python/pyproject.toml +++ b/sdk/python/pyproject.toml @@ -1,10 +1,10 @@ [project] name = "pulumi_command" description = "The Pulumi Command Provider enables you to execute commands and scripts either locally or remotely as part of the Pulumi resource model." - dependencies = ["parver>=0.2.1", "pulumi>=3.136.0,<4.0.0", "semver>=2.8.1", "typing-extensions>=4.11; python_version < \"3.11\""] + dependencies = ["parver>=0.2.1", "pulumi>=3.142.0,<4.0.0", "semver>=2.8.1", "typing-extensions>=4.11; python_version < \"3.11\""] keywords = ["pulumi", "command", "category/utility", "kind/native"] readme = "README.md" - requires-python = ">=3.8" + requires-python = ">=3.9" version = "1.0.0a0+dev" [project.license] text = "Apache-2.0"