import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * A RolloutKind is a reusable configuration resource that defines the policies, strategies, and targeting for Rollout operations. It acts as a template for repeatable Rollouts, providing guardrails and ensuring that updates are executed in a consistent manner across a fleet of Units. * * > **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider. * See Provider Versions for more details on beta resources. * * ## Example Usage * * ### Saas Runtime Rollout Kind Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const exampleSaas = new gcp.saasruntime.SaaS("example_saas", { * saasId: "example-saas", * location: "global", * locations: [{ * name: "us-central1", * }], * }); * const exampleUnitkind = new gcp.saasruntime.UnitKind("example_unitkind", { * location: "global", * unitKindId: "example-unitkind", * saas: exampleSaas.id, * }); * const example = new gcp.saasruntime.RolloutKind("example", { * location: "global", * rolloutKindId: "example-rolloutkind", * unitKind: exampleUnitkind.id, * rolloutOrchestrationStrategy: "Google.Cloud.Simple.OneLocationAtATime", * errorBudget: { * allowedCount: 1, * }, * unitFilter: "unit.labels['key1'] == 'value1'", * }); * ``` * * ## Import * * RolloutKind can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/rolloutKinds/{{rollout_kind_id}}` * * `{{project}}/{{location}}/{{rollout_kind_id}}` * * `{{location}}/{{rollout_kind_id}}` * * When using the `pulumi import` command, RolloutKind can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:saasruntime/rolloutKind:RolloutKind default projects/{{project}}/locations/{{location}}/rolloutKinds/{{rollout_kind_id}} * $ pulumi import gcp:saasruntime/rolloutKind:RolloutKind default {{project}}/{{location}}/{{rollout_kind_id}} * $ pulumi import gcp:saasruntime/rolloutKind:RolloutKind default {{location}}/{{rollout_kind_id}} * ``` */ export declare class RolloutKind extends pulumi.CustomResource { /** * Get an existing RolloutKind resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: RolloutKindState, opts?: pulumi.CustomResourceOptions): RolloutKind; /** * Returns true if the given object is an instance of RolloutKind. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is RolloutKind; /** * Annotations is an unstructured key-value map stored with a resource that * may be set by external tools to store and retrieve arbitrary metadata. * They are not queryable and should be preserved when modifying objects. * More info: https://kubernetes.io/docs/user-guide/annotations * **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. * Please refer to the field `effectiveAnnotations` for all of the annotations present on the resource. */ readonly annotations: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The timestamp when the resource was created. */ readonly createTime: pulumi.Output; /** * All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through Terraform, other clients and services. */ readonly effectiveAnnotations: pulumi.Output<{ [key: string]: string; }>; /** * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services. */ readonly effectiveLabels: pulumi.Output<{ [key: string]: string; }>; /** * The configuration for error budget. If the number of failed units exceeds * max(allowed_count, allowedRatio * total_units), the rollout will be paused. * Structure is documented below. */ readonly errorBudget: pulumi.Output; /** * The labels on the resource, which can be used for categorization. * similar to Kubernetes resource labels. * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ readonly labels: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. */ readonly location: pulumi.Output; /** * Identifier. The resource name (full URI of the resource) following the standard naming * scheme: * "projects/{project}/locations/{location}/rolloutKinds/{rollout_kind_id}" */ readonly name: pulumi.Output; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ readonly project: pulumi.Output; /** * The combination of labels configured directly on the resource * and default labels configured on the provider. */ readonly pulumiLabels: pulumi.Output<{ [key: string]: string; }>; /** * The ID value for the new rollout kind. */ readonly rolloutKindId: pulumi.Output; /** * The strategy used for executing a Rollout. This is a required field. * There are two supported values strategies which are used to control a rollout. * - "Google.Cloud.Simple.AllAtOnce" * - "Google.Cloud.Simple.OneLocationAtATime" * A rollout with one of these simple strategies will rollout across * all locations defined in the associated UnitKind's Saas Locations. */ readonly rolloutOrchestrationStrategy: pulumi.Output; /** * The unique identifier of the resource. UID is unique in the time * and space for this resource within the scope of the service. It is * typically generated by the server on successful creation of a resource * and must not be changed. UID is used to uniquely identify resources * with resource name reuses. This should be a UUID4. */ readonly uid: pulumi.Output; /** * CEL(https://github.com/google/cel-spec) formatted filter string against * Unit. The filter will be applied to determine the eligible unit population. * This filter can only reduce, but not expand the scope of the rollout. */ readonly unitFilter: pulumi.Output; /** * UnitKind that this rollout kind corresponds to. Rollouts stemming from this * rollout kind will target the units of this unit kind. In other words, this * defines the population of target units to be upgraded by rollouts. */ readonly unitKind: pulumi.Output; /** * The timestamp when the resource was last updated. Any * change to the resource made by users must refresh this value. * Changes to a resource made by the service should refresh this value. */ readonly updateTime: pulumi.Output; /** * The config for updating the unit kind. By default, the unit kind will be * updated on the rollout start. * Possible values: * UPDATE_UNIT_KIND_STRATEGY_ON_START * UPDATE_UNIT_KIND_STRATEGY_NEVER * Possible values are: `UPDATE_UNIT_KIND_STRATEGY_ON_START`, `UPDATE_UNIT_KIND_STRATEGY_NEVER`. */ readonly updateUnitKindStrategy: pulumi.Output; /** * Create a RolloutKind resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: RolloutKindArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering RolloutKind resources. */ export interface RolloutKindState { /** * Annotations is an unstructured key-value map stored with a resource that * may be set by external tools to store and retrieve arbitrary metadata. * They are not queryable and should be preserved when modifying objects. * More info: https://kubernetes.io/docs/user-guide/annotations * **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. * Please refer to the field `effectiveAnnotations` for all of the annotations present on the resource. */ annotations?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The timestamp when the resource was created. */ createTime?: pulumi.Input; /** * All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through Terraform, other clients and services. */ effectiveAnnotations?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services. */ effectiveLabels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The configuration for error budget. If the number of failed units exceeds * max(allowed_count, allowedRatio * total_units), the rollout will be paused. * Structure is documented below. */ errorBudget?: pulumi.Input; /** * The labels on the resource, which can be used for categorization. * similar to Kubernetes resource labels. * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. */ location?: pulumi.Input; /** * Identifier. The resource name (full URI of the resource) following the standard naming * scheme: * "projects/{project}/locations/{location}/rolloutKinds/{rollout_kind_id}" */ name?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * The combination of labels configured directly on the resource * and default labels configured on the provider. */ pulumiLabels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The ID value for the new rollout kind. */ rolloutKindId?: pulumi.Input; /** * The strategy used for executing a Rollout. This is a required field. * There are two supported values strategies which are used to control a rollout. * - "Google.Cloud.Simple.AllAtOnce" * - "Google.Cloud.Simple.OneLocationAtATime" * A rollout with one of these simple strategies will rollout across * all locations defined in the associated UnitKind's Saas Locations. */ rolloutOrchestrationStrategy?: pulumi.Input; /** * The unique identifier of the resource. UID is unique in the time * and space for this resource within the scope of the service. It is * typically generated by the server on successful creation of a resource * and must not be changed. UID is used to uniquely identify resources * with resource name reuses. This should be a UUID4. */ uid?: pulumi.Input; /** * CEL(https://github.com/google/cel-spec) formatted filter string against * Unit. The filter will be applied to determine the eligible unit population. * This filter can only reduce, but not expand the scope of the rollout. */ unitFilter?: pulumi.Input; /** * UnitKind that this rollout kind corresponds to. Rollouts stemming from this * rollout kind will target the units of this unit kind. In other words, this * defines the population of target units to be upgraded by rollouts. */ unitKind?: pulumi.Input; /** * The timestamp when the resource was last updated. Any * change to the resource made by users must refresh this value. * Changes to a resource made by the service should refresh this value. */ updateTime?: pulumi.Input; /** * The config for updating the unit kind. By default, the unit kind will be * updated on the rollout start. * Possible values: * UPDATE_UNIT_KIND_STRATEGY_ON_START * UPDATE_UNIT_KIND_STRATEGY_NEVER * Possible values are: `UPDATE_UNIT_KIND_STRATEGY_ON_START`, `UPDATE_UNIT_KIND_STRATEGY_NEVER`. */ updateUnitKindStrategy?: pulumi.Input; } /** * The set of arguments for constructing a RolloutKind resource. */ export interface RolloutKindArgs { /** * Annotations is an unstructured key-value map stored with a resource that * may be set by external tools to store and retrieve arbitrary metadata. * They are not queryable and should be preserved when modifying objects. * More info: https://kubernetes.io/docs/user-guide/annotations * **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. * Please refer to the field `effectiveAnnotations` for all of the annotations present on the resource. */ annotations?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The configuration for error budget. If the number of failed units exceeds * max(allowed_count, allowedRatio * total_units), the rollout will be paused. * Structure is documented below. */ errorBudget?: pulumi.Input; /** * The labels on the resource, which can be used for categorization. * similar to Kubernetes resource labels. * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. */ location: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * The ID value for the new rollout kind. */ rolloutKindId: pulumi.Input; /** * The strategy used for executing a Rollout. This is a required field. * There are two supported values strategies which are used to control a rollout. * - "Google.Cloud.Simple.AllAtOnce" * - "Google.Cloud.Simple.OneLocationAtATime" * A rollout with one of these simple strategies will rollout across * all locations defined in the associated UnitKind's Saas Locations. */ rolloutOrchestrationStrategy?: pulumi.Input; /** * CEL(https://github.com/google/cel-spec) formatted filter string against * Unit. The filter will be applied to determine the eligible unit population. * This filter can only reduce, but not expand the scope of the rollout. */ unitFilter?: pulumi.Input; /** * UnitKind that this rollout kind corresponds to. Rollouts stemming from this * rollout kind will target the units of this unit kind. In other words, this * defines the population of target units to be upgraded by rollouts. */ unitKind: pulumi.Input; /** * The config for updating the unit kind. By default, the unit kind will be * updated on the rollout start. * Possible values: * UPDATE_UNIT_KIND_STRATEGY_ON_START * UPDATE_UNIT_KIND_STRATEGY_NEVER * Possible values are: `UPDATE_UNIT_KIND_STRATEGY_ON_START`, `UPDATE_UNIT_KIND_STRATEGY_NEVER`. */ updateUnitKindStrategy?: pulumi.Input; }