RolloutKind class
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
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 pulumi
import pulumi_gcp as gcp
example_saas = gcp.saasruntime.SaaS("example_saas",
saas_id="example-saas",
location="global",
locations=[{
"name": "us-central1",
}])
example_unitkind = gcp.saasruntime.UnitKind("example_unitkind",
location="global",
unit_kind_id="example-unitkind",
saas=example_saas.id)
example = gcp.saasruntime.RolloutKind("example",
location="global",
rollout_kind_id="example-rolloutkind",
unit_kind=example_unitkind.id,
rollout_orchestration_strategy="Google.Cloud.Simple.OneLocationAtATime",
error_budget={
"allowed_count": 1,
},
unit_filter="unit.labels['key1'] == 'value1'")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var exampleSaas = new Gcp.SaaSRuntime.SaaS("example_saas", new()
{
SaasId = "example-saas",
Location = "global",
Locations = new[]
{
new Gcp.SaaSRuntime.Inputs.SaaSLocationArgs
{
Name = "us-central1",
},
},
});
var exampleUnitkind = new Gcp.SaaSRuntime.UnitKind("example_unitkind", new()
{
Location = "global",
UnitKindId = "example-unitkind",
Saas = exampleSaas.Id,
});
var example = new Gcp.SaaSRuntime.RolloutKind("example", new()
{
Location = "global",
RolloutKindId = "example-rolloutkind",
UnitKind = exampleUnitkind.Id,
RolloutOrchestrationStrategy = "Google.Cloud.Simple.OneLocationAtATime",
ErrorBudget = new Gcp.SaaSRuntime.Inputs.RolloutKindErrorBudgetArgs
{
AllowedCount = 1,
},
UnitFilter = "unit.labels['key1'] == 'value1'",
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/saasruntime"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleSaas, err := saasruntime.NewSaaS(ctx, "example_saas", &saasruntime.SaaSArgs{
SaasId: pulumi.String("example-saas"),
Location: pulumi.String("global"),
Locations: saasruntime.SaaSLocationArray{
&saasruntime.SaaSLocationArgs{
Name: pulumi.String("us-central1"),
},
},
})
if err != nil {
return err
}
exampleUnitkind, err := saasruntime.NewUnitKind(ctx, "example_unitkind", &saasruntime.UnitKindArgs{
Location: pulumi.String("global"),
UnitKindId: pulumi.String("example-unitkind"),
Saas: exampleSaas.ID().ToIDOutput().ToStringOutput(),
})
if err != nil {
return err
}
_, err = saasruntime.NewRolloutKind(ctx, "example", &saasruntime.RolloutKindArgs{
Location: pulumi.String("global"),
RolloutKindId: pulumi.String("example-rolloutkind"),
UnitKind: exampleUnitkind.ID().ToIDOutput().ToStringOutput(),
RolloutOrchestrationStrategy: pulumi.String("Google.Cloud.Simple.OneLocationAtATime"),
ErrorBudget: &saasruntime.RolloutKindErrorBudgetArgs{
AllowedCount: pulumi.Int(1),
},
UnitFilter: pulumi.String("unit.labels['key1'] == 'value1'"),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
resource "gcp_saasruntime_saas" "example_saas" {
saas_id = "example-saas"
location = "global"
locations {
name = "us-central1"
}
}
resource "gcp_saasruntime_unitkind" "example_unitkind" {
location = "global"
unit_kind_id = "example-unitkind"
saas = gcp_saasruntime_saas.example_saas.id
}
resource "gcp_saasruntime_rolloutkind" "example" {
location = "global"
rollout_kind_id = "example-rolloutkind"
unit_kind = gcp_saasruntime_unitkind.example_unitkind.id
rollout_orchestration_strategy = "Google.Cloud.Simple.OneLocationAtATime"
error_budget = {
allowed_count = 1
}
unit_filter = "unit.labels['key1'] == 'value1'"
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.saasruntime.SaaS;
import com.pulumi.gcp.saasruntime.SaaSArgs;
import com.pulumi.gcp.saasruntime.inputs.SaaSLocationArgs;
import com.pulumi.gcp.saasruntime.UnitKind;
import com.pulumi.gcp.saasruntime.UnitKindArgs;
import com.pulumi.gcp.saasruntime.RolloutKind;
import com.pulumi.gcp.saasruntime.RolloutKindArgs;
import com.pulumi.gcp.saasruntime.inputs.RolloutKindErrorBudgetArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleSaas = new SaaS("exampleSaas", SaaSArgs.builder()
.saasId("example-saas")
.location("global")
.locations(SaaSLocationArgs.builder()
.name("us-central1")
.build())
.build());
var exampleUnitkind = new UnitKind("exampleUnitkind", UnitKindArgs.builder()
.location("global")
.unitKindId("example-unitkind")
.saas(exampleSaas.id())
.build());
var example = new RolloutKind("example", RolloutKindArgs.builder()
.location("global")
.rolloutKindId("example-rolloutkind")
.unitKind(exampleUnitkind.id())
.rolloutOrchestrationStrategy("Google.Cloud.Simple.OneLocationAtATime")
.errorBudget(RolloutKindErrorBudgetArgs.builder()
.allowedCount(1)
.build())
.unitFilter("unit.labels['key1'] == 'value1'")
.build());
}
}
resources:
exampleSaas:
type: gcp:saasruntime:SaaS
name: example_saas
properties:
saasId: example-saas
location: global
locations:
- name: us-central1
exampleUnitkind:
type: gcp:saasruntime:UnitKind
name: example_unitkind
properties:
location: global
unitKindId: example-unitkind
saas: ${exampleSaas.id}
example:
type: gcp:saasruntime:RolloutKind
properties:
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:
$ 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}}
Constructors
- RolloutKind(String name, {RolloutKindArgs? args, CustomResourceOptions? options})
-
Creates a new RolloutKind.
nameThe Pulumi resource name.argsArguments used to configure this RolloutKind. The set of arguments for RolloutKind.optionsResource options controlling this resource's behavior. - RolloutKind.reference(String urn)
- Creates a typed reference to an existing RolloutKind resource.
Properties
-
annotations
↔ Output<
Map< String, String> ?> -
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
effectiveAnnotationsfor all of the annotations present on the resource.latefinal -
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
createTime
↔ Output<
String> -
The timestamp when the resource was created.
latefinal
-
deletionPolicy
↔ Output<
String> -
Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
When a 'terraform destroy' or 'pulumi up' would delete the resource,
the command will fail if this field is set to "PREVENT" in Terraform state.
When set to "ABANDON", the command will remove the resource from Terraform
management without updating or deleting the resource in the API.
When set to "DELETE", deleting the resource is allowed.
latefinal
-
effectiveAnnotations
↔ Output<
Map< String, String> > -
All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through Terraform, other clients and services.
latefinal
-
effectiveLabels
↔ Output<
Map< String, String> > -
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
latefinal
-
errorBudget
↔ Output<
RolloutKindErrorBudget?> -
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.
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
-
id
↔ Output<
String> -
getter/setter pairinherited
- isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
labels
↔ Output<
Map< String, String> ?> -
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
effectiveLabelsfor all of the labels present on the resource.latefinal -
location
↔ Output<
String> -
Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122.latefinal -
name
↔ Output<
String> -
Identifier. The resource name (full URI of the resource) following the standard naming
scheme:
"projects/{project}/locations/{location}/rolloutKinds/{rollout_kind_id}"
latefinal
-
project
↔ Output<
String> -
The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.
latefinal
-
pulumiLabels
↔ Output<
Map< String, String> > -
The combination of labels configured directly on the resource
and default labels configured on the provider.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
-
rolloutKindId
↔ Output<
String> -
The ID value for the new rollout kind.
latefinal
-
rolloutOrchestrationStrategy
↔ Output<
String?> -
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.
latefinal
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
uid
↔ Output<
String> -
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.
latefinal
-
unitFilter
↔ Output<
String?> -
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.
latefinal
-
unitKind
↔ Output<
String> -
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.
latefinal
-
updateTime
↔ Output<
String> -
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.
latefinal
-
updateUnitKindStrategy
↔ Output<
String?> -
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.latefinal -
urn
↔ Output<
String> -
latefinalinherited
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
get(
String name, Input< String> id, {RolloutKindState? state, CustomResourceOptions? options}) → RolloutKind -
Gets an existing RolloutKind resource's state with the given
nameandid.