diff --git a/provider/cmd/pulumi-resource-pulumiservice/schema.json b/provider/cmd/pulumi-resource-pulumiservice/schema.json index efb9c0bb..8e76858e 100644 --- a/provider/cmd/pulumi-resource-pulumiservice/schema.json +++ b/provider/cmd/pulumi-resource-pulumiservice/schema.json @@ -4,7 +4,11 @@ "description": "A native Pulumi package for creating and managing Pulumi Cloud constructs", "homepage": "https://pulumi.com", "repository": "https://github.com/pulumi/pulumi-pulumiservice", - "keywords": ["pulumi", "kind/native", "category/infrastructure"], + "keywords": [ + "pulumi", + "kind/native", + "category/infrastructure" + ], "license": "Apache-2.0", "publisher": "Pulumi", "config": { @@ -23,7 +27,9 @@ "type": "string", "default": "", "defaultInfo": { - "environment": ["PULUMI_ACCESS_TOKEN"] + "environment": [ + "PULUMI_ACCESS_TOKEN" + ] } } } @@ -78,72 +84,72 @@ { "value": "stack_deleted", "description": "Trigger a webhook when a stack is deleted. Only valid for org webhooks.", - "name": "StackDeleted" + "name": "StackDeleted" }, { "value": "update_succeeded", "description": "Trigger a webhook when a stack update succeeds.", - "name": "UpdateSucceeded" + "name": "UpdateSucceeded" }, { "value": "update_failed", "description": "Trigger a webhook when a stack update fails.", - "name": "UpdateFailed" + "name": "UpdateFailed" }, { "value": "preview_succeeded", "description": "Trigger a webhook when a stack preview succeeds.", - "name": "PreviewSucceeded" + "name": "PreviewSucceeded" }, { "value": "preview_failed", "description": "Trigger a webhook when a stack preview fails.", - "name": "PreviewFailed" + "name": "PreviewFailed" }, { "value": "destroy_succeeded", "description": "Trigger a webhook when a stack destroy succeeds.", - "name": "DestroySucceeded" + "name": "DestroySucceeded" }, { "value": "destroy_failed", "description": "Trigger a webhook when a stack destroy fails.", - "name": "DestroyFailed" + "name": "DestroyFailed" }, { "value": "refresh_succeeded", "description": "Trigger a webhook when a stack refresh succeeds.", - "name": "RefreshSucceeded" + "name": "RefreshSucceeded" }, { "value": "refresh_failed", "description": "Trigger a webhook when a stack refresh fails.", - "name": "RefreshFailed" + "name": "RefreshFailed" }, { "value": "deployment_queued", "description": "Trigger a webhook when a deployment is queued.", - "name": "DeploymentQueued" + "name": "DeploymentQueued" }, { "value": "deployment_started", "description": "Trigger a webhook when a deployment starts running.", - "name": "DeploymentStarted" + "name": "DeploymentStarted" }, { "value": "deployment_succeeded", "description": "Trigger a webhook when a deployment succeeds.", - "name": "DeploymentSucceeded" + "name": "DeploymentSucceeded" }, { "value": "deployment_failed", "description": "Trigger a webhook when a deployment fails.", - "name": "DeploymentFailed" + "name": "DeploymentFailed" } ] }, "pulumiservice:index:DeploymentSettingsExecutorContext": { - "description":"The executor context defines information about the executor where the deployment is executed. If unspecified, the default 'pulumi/pulumi' image is used.", + "description": "The executor context defines information about the executor where the deployment is executed. If unspecified, the default 'pulumi/pulumi' image is used.", "properties": { "executorImage": { "type": "string", @@ -156,7 +162,7 @@ ] }, "pulumiservice:index:DeploymentSettingsSourceContext": { - "description":"Settings related to the source of the deployment.", + "description": "Settings related to the source of the deployment.", "properties": { "git": { "$ref": "#/types/pulumiservice:index:DeploymentSettingsGitSource", @@ -166,7 +172,7 @@ "type": "object" }, "pulumiservice:index:DeploymentSettingsGitSource": { - "description":"Git source settings for a deployment.", + "description": "Git source settings for a deployment.", "properties": { "repoUrl": { "type": "string", @@ -191,8 +197,8 @@ }, "type": "object" }, - "pulumiservice:index:DeploymentSettingsGitSourceGitAuth": { - "description":"Git source settings for a deployment.", + "pulumiservice:index:DeploymentSettingsGitSourceGitAuth": { + "description": "Git source settings for a deployment.", "properties": { "sshAuth": { "$ref": "#/types/pulumiservice:index:DeploymentSettingsGitAuthSSHAuth", @@ -311,6 +317,10 @@ "type": "boolean", "description": "Skip the default dependency installation step - use this to customize the dependency installation (e.g. if using yarn or poetry)" }, + "skipIntermediateDeployments": { + "type": "boolean", + "description": "Skip duplicated queued operations (it will only execute the last deployment of the same type)" + }, "shell": { "type": "string", "description": "The shell to use to run commands during the deployment. Defaults to 'bash'." @@ -444,7 +454,9 @@ "type": "string" } }, - "requiredInputs": ["description"] + "requiredInputs": [ + "description" + ] }, "pulumiservice:index:Team": { "description": "The Pulumi Cloud offers role-based access control (RBAC) using teams. Teams allow organization admins to assign a set of stack permissions to a group of users.", @@ -477,8 +489,8 @@ "type": "string" }, "githubTeamId": { - "description": "The GitHub ID of the team to mirror. Must be in the same GitHub organization that the Pulumi org is backed by. Required for \"github\" teams.", - "type": "number" + "description": "The GitHub ID of the team to mirror. Must be in the same GitHub organization that the Pulumi org is backed by. Required for \"github\" teams.", + "type": "number" } }, "inputProperties": { @@ -510,11 +522,14 @@ "type": "string" }, "githubTeamId": { - "description": "The GitHub ID of the team to mirror. Must be in the same GitHub organization that the Pulumi org is backed by. Required for \"github\" teams.", - "type": "number" + "description": "The GitHub ID of the team to mirror. Must be in the same GitHub organization that the Pulumi org is backed by. Required for \"github\" teams.", + "type": "number" } }, - "requiredInputs": ["organizationName", "teamType"] + "requiredInputs": [ + "organizationName", + "teamType" + ] }, "pulumiservice:index:TeamAccessToken": { "description": "The Pulumi Cloud allows users to create access tokens scoped to team. Team access tokens is a resource to create them and assign them to a team", @@ -559,7 +574,11 @@ "type": "string" } }, - "requiredInputs": ["name", "teamName", "organizationName"] + "requiredInputs": [ + "name", + "teamName", + "organizationName" + ] }, "pulumiservice:index:OrgAccessToken": { "description": "The Pulumi Cloud allows users to create access tokens scoped to orgs. Org access tokens is a resource to create them and assign them to an org", @@ -596,7 +615,10 @@ "type": "string" } }, - "requiredInputs": ["name", "organizationName"] + "requiredInputs": [ + "name", + "organizationName" + ] }, "pulumiservice:index:Webhook": { "description": "Pulumi Webhooks allow you to notify external services of events happening within your Pulumi organization or stack. For example, you can trigger a notification whenever a stack is updated. Whenever an event occurs, Pulumi will send an HTTP POST request to all registered webhooks. The webhook can then be used to emit some notification, start running integration tests, or even update additional stacks.\n\n### Import\n\nPulumi webhooks can be imported using the `id`, which for webhooks is `{org}/{project}/{stack}/{webhook-name}` e.g.,\n\n```sh\n $ pulumi import pulumiservice:index:Webhook my_webhook my-org/my-project/my-stack/4b0d0671\n```\n\n", @@ -627,23 +649,23 @@ "type": "string" }, "projectName": { - "description": "Name of the project. Only specified if this is a stack webhook.", - "type": "string" + "description": "Name of the project. Only specified if this is a stack webhook.", + "type": "string" }, "stackName": { - "description": "Name of the stack. Only specified if this is a stack webhook.", - "type": "string" + "description": "Name of the stack. Only specified if this is a stack webhook.", + "type": "string" }, "format": { - "description": "Format of the webhook payload. Can be either `raw` or `slack`. Defaults to `raw`.", - "$ref": "#/types/pulumiservice:index:WebhookFormat" + "description": "Format of the webhook payload. Can be either `raw` or `slack`. Defaults to `raw`.", + "$ref": "#/types/pulumiservice:index:WebhookFormat" }, "filters": { - "description": "Optional set of filters to apply to the webhook. See [webhook docs](https://www.pulumi.com/docs/intro/pulumi-service/webhooks/#filters) for more information.", - "type": "array", - "items": { - "$ref": "#/types/pulumiservice:index:WebhookFilters" - } + "description": "Optional set of filters to apply to the webhook. See [webhook docs](https://www.pulumi.com/docs/intro/pulumi-service/webhooks/#filters) for more information.", + "type": "array", + "items": { + "$ref": "#/types/pulumiservice:index:WebhookFilters" + } } }, "inputProperties": { @@ -856,4 +878,4 @@ } } } -} +} \ No newline at end of file diff --git a/provider/pkg/internal/pulumiapi/deployment_settings.go b/provider/pkg/internal/pulumiapi/deployment_settings.go index cd97d17c..d31b9ed0 100644 --- a/provider/pkg/internal/pulumiapi/deployment_settings.go +++ b/provider/pkg/internal/pulumiapi/deployment_settings.go @@ -58,8 +58,9 @@ type AzureOIDCConfiguration struct { } type OperationContextOptions struct { - SkipInstallDependencies bool `json:"skipInstallDependencies,omitempty"` - Shell string `json:"shell,omitempty"` + SkipInstallDependencies bool `json:"skipInstallDependencies,omitempty"` + SkipIntermediateDeployments bool `json:"skipIntermediateDeployments,omitempty"` + Shell string `json:"shell,omitempty"` } type GitHubConfiguration struct { diff --git a/provider/pkg/provider/deployment_settings.go b/provider/pkg/provider/deployment_settings.go index d1a4be62..c2f05d20 100644 --- a/provider/pkg/provider/deployment_settings.go +++ b/provider/pkg/provider/deployment_settings.go @@ -95,6 +95,9 @@ func (ds *PulumiServiceDeploymentSettingsInput) ToPropertyMap() resource.Propert if ds.OperationContext.Options.SkipInstallDependencies { optionsMap["skipInstallDependencies"] = resource.NewPropertyValue(true) } + if ds.OperationContext.Options.SkipIntermediateDeployments { + optionsMap["skipIntermediateDeployments"] = resource.NewPropertyValue(true) + } ocMap["options"] = resource.PropertyValue{V: optionsMap} } if ds.OperationContext.OIDC != nil { @@ -366,6 +369,10 @@ func toOperationContext(inputMap resource.PropertyMap) *pulumiapi.OperationConte o.SkipInstallDependencies = oInput["skipInstallDependencies"].BoolValue() } + if oInput["skipIntermediateDeployments"].HasValue() && oInput["skipIntermediateDeployments"].IsBool() { + o.SkipIntermediateDeployments = oInput["skipIntermediateDeployments"].BoolValue() + } + if oInput["Shell"].HasValue() && oInput["Shell"].IsString() { o.Shell = oInput["Shell"].StringValue() } diff --git a/sdk/dotnet/Inputs/OperationContextOptionsArgs.cs b/sdk/dotnet/Inputs/OperationContextOptionsArgs.cs index 6b593f55..a77a7802 100644 --- a/sdk/dotnet/Inputs/OperationContextOptionsArgs.cs +++ b/sdk/dotnet/Inputs/OperationContextOptionsArgs.cs @@ -24,6 +24,12 @@ public sealed class OperationContextOptionsArgs : global::Pulumi.ResourceArgs [Input("skipInstallDependencies")] public Input? SkipInstallDependencies { get; set; } + /// + /// Skip duplicated queued operations (it will only execute the last deployment of the same type) + /// + [Input("skipIntermediateDeployments")] + public Input? SkipIntermediateDeployments { get; set; } + public OperationContextOptionsArgs() { } diff --git a/sdk/go/pulumiservice/pulumiTypes.go b/sdk/go/pulumiservice/pulumiTypes.go index 0e6884f7..e2790430 100644 --- a/sdk/go/pulumiservice/pulumiTypes.go +++ b/sdk/go/pulumiservice/pulumiTypes.go @@ -2130,6 +2130,8 @@ type OperationContextOptions struct { Shell *string `pulumi:"shell"` // Skip the default dependency installation step - use this to customize the dependency installation (e.g. if using yarn or poetry) SkipInstallDependencies *bool `pulumi:"skipInstallDependencies"` + // Skip duplicated queued operations (it will only execute the last deployment of the same type) + SkipIntermediateDeployments *bool `pulumi:"skipIntermediateDeployments"` } // OperationContextOptionsInput is an input type that accepts OperationContextOptionsArgs and OperationContextOptionsOutput values. @@ -2148,6 +2150,8 @@ type OperationContextOptionsArgs struct { Shell pulumi.StringPtrInput `pulumi:"shell"` // Skip the default dependency installation step - use this to customize the dependency installation (e.g. if using yarn or poetry) SkipInstallDependencies pulumi.BoolPtrInput `pulumi:"skipInstallDependencies"` + // Skip duplicated queued operations (it will only execute the last deployment of the same type) + SkipIntermediateDeployments pulumi.BoolPtrInput `pulumi:"skipIntermediateDeployments"` } func (OperationContextOptionsArgs) ElementType() reflect.Type { @@ -2237,6 +2241,11 @@ func (o OperationContextOptionsOutput) SkipInstallDependencies() pulumi.BoolPtrO return o.ApplyT(func(v OperationContextOptions) *bool { return v.SkipInstallDependencies }).(pulumi.BoolPtrOutput) } +// Skip duplicated queued operations (it will only execute the last deployment of the same type) +func (o OperationContextOptionsOutput) SkipIntermediateDeployments() pulumi.BoolPtrOutput { + return o.ApplyT(func(v OperationContextOptions) *bool { return v.SkipIntermediateDeployments }).(pulumi.BoolPtrOutput) +} + type OperationContextOptionsPtrOutput struct{ *pulumi.OutputState } func (OperationContextOptionsPtrOutput) ElementType() reflect.Type { @@ -2281,6 +2290,16 @@ func (o OperationContextOptionsPtrOutput) SkipInstallDependencies() pulumi.BoolP }).(pulumi.BoolPtrOutput) } +// Skip duplicated queued operations (it will only execute the last deployment of the same type) +func (o OperationContextOptionsPtrOutput) SkipIntermediateDeployments() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *OperationContextOptions) *bool { + if v == nil { + return nil + } + return v.SkipIntermediateDeployments + }).(pulumi.BoolPtrOutput) +} + func init() { pulumi.RegisterInputType(reflect.TypeOf((*AWSOIDCConfigurationInput)(nil)).Elem(), AWSOIDCConfigurationArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*AWSOIDCConfigurationPtrInput)(nil)).Elem(), AWSOIDCConfigurationArgs{}) diff --git a/sdk/java/src/main/java/com/pulumi/pulumiservice/inputs/OperationContextOptionsArgs.java b/sdk/java/src/main/java/com/pulumi/pulumiservice/inputs/OperationContextOptionsArgs.java index 601af60d..9c19bb68 100644 --- a/sdk/java/src/main/java/com/pulumi/pulumiservice/inputs/OperationContextOptionsArgs.java +++ b/sdk/java/src/main/java/com/pulumi/pulumiservice/inputs/OperationContextOptionsArgs.java @@ -46,11 +46,27 @@ public Optional> skipInstallDependencies() { return Optional.ofNullable(this.skipInstallDependencies); } + /** + * Skip duplicated queued operations (it will only execute the last deployment of the same type) + * + */ + @Import(name="skipIntermediateDeployments") + private @Nullable Output skipIntermediateDeployments; + + /** + * @return Skip duplicated queued operations (it will only execute the last deployment of the same type) + * + */ + public Optional> skipIntermediateDeployments() { + return Optional.ofNullable(this.skipIntermediateDeployments); + } + private OperationContextOptionsArgs() {} private OperationContextOptionsArgs(OperationContextOptionsArgs $) { this.shell = $.shell; this.skipInstallDependencies = $.skipInstallDependencies; + this.skipIntermediateDeployments = $.skipIntermediateDeployments; } public static Builder builder() { @@ -113,6 +129,27 @@ public Builder skipInstallDependencies(Boolean skipInstallDependencies) { return skipInstallDependencies(Output.of(skipInstallDependencies)); } + /** + * @param skipIntermediateDeployments Skip duplicated queued operations (it will only execute the last deployment of the same type) + * + * @return builder + * + */ + public Builder skipIntermediateDeployments(@Nullable Output skipIntermediateDeployments) { + $.skipIntermediateDeployments = skipIntermediateDeployments; + return this; + } + + /** + * @param skipIntermediateDeployments Skip duplicated queued operations (it will only execute the last deployment of the same type) + * + * @return builder + * + */ + public Builder skipIntermediateDeployments(Boolean skipIntermediateDeployments) { + return skipIntermediateDeployments(Output.of(skipIntermediateDeployments)); + } + public OperationContextOptionsArgs build() { return $; } diff --git a/sdk/nodejs/types/input.ts b/sdk/nodejs/types/input.ts index 3a641973..756a6e03 100644 --- a/sdk/nodejs/types/input.ts +++ b/sdk/nodejs/types/input.ts @@ -240,4 +240,8 @@ export interface OperationContextOptionsArgs { * Skip the default dependency installation step - use this to customize the dependency installation (e.g. if using yarn or poetry) */ skipInstallDependencies?: pulumi.Input; + /** + * Skip duplicated queued operations (it will only execute the last deployment of the same type) + */ + skipIntermediateDeployments?: pulumi.Input; } diff --git a/sdk/python/pulumi_pulumiservice/_inputs.py b/sdk/python/pulumi_pulumiservice/_inputs.py index 18ae678a..0dd12b7c 100644 --- a/sdk/python/pulumi_pulumiservice/_inputs.py +++ b/sdk/python/pulumi_pulumiservice/_inputs.py @@ -723,15 +723,19 @@ def gcp(self, value: Optional[pulumi.Input['GCPOIDCConfigurationArgs']]): class OperationContextOptionsArgs: def __init__(__self__, *, shell: Optional[pulumi.Input[str]] = None, - skip_install_dependencies: Optional[pulumi.Input[bool]] = None): + skip_install_dependencies: Optional[pulumi.Input[bool]] = None, + skip_intermediate_deployments: Optional[pulumi.Input[bool]] = None): """ :param pulumi.Input[str] shell: The shell to use to run commands during the deployment. Defaults to 'bash'. :param pulumi.Input[bool] skip_install_dependencies: Skip the default dependency installation step - use this to customize the dependency installation (e.g. if using yarn or poetry) + :param pulumi.Input[bool] skip_intermediate_deployments: Skip duplicated queued operations (it will only execute the last deployment of the same type) """ if shell is not None: pulumi.set(__self__, "shell", shell) if skip_install_dependencies is not None: pulumi.set(__self__, "skip_install_dependencies", skip_install_dependencies) + if skip_intermediate_deployments is not None: + pulumi.set(__self__, "skip_intermediate_deployments", skip_intermediate_deployments) @property @pulumi.getter @@ -757,4 +761,16 @@ def skip_install_dependencies(self) -> Optional[pulumi.Input[bool]]: def skip_install_dependencies(self, value: Optional[pulumi.Input[bool]]): pulumi.set(self, "skip_install_dependencies", value) + @property + @pulumi.getter(name="skipIntermediateDeployments") + def skip_intermediate_deployments(self) -> Optional[pulumi.Input[bool]]: + """ + Skip duplicated queued operations (it will only execute the last deployment of the same type) + """ + return pulumi.get(self, "skip_intermediate_deployments") + + @skip_intermediate_deployments.setter + def skip_intermediate_deployments(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "skip_intermediate_deployments", value) +