Release class

A version to be propagated and deployed to Units. It points to a specific version of a Blueprint that can be applied to Units, for example, via a Rollout.

> 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 Release 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 examplePrevious = new gcp.saasruntime.Release("example_previous", {
    location: "global",
    releaseId: "previous-release",
    unitKind: exampleUnitkind.id,
    blueprint: {
        "package": "us-central1-docker.pkg.dev/ci-test-project-188019/test-repo/tf-test-easysaas-alpha-image@sha256:7992fdbaeaf998ecd31a7f937bb26e38a781ecf49b24857a6176c1e9bfc299ee",
    },
});
const example = new gcp.saasruntime.Release("example", {
    location: "global",
    releaseId: "example-release",
    unitKind: exampleUnitkind.id,
    blueprint: {
        "package": "us-central1-docker.pkg.dev/ci-test-project-188019/test-repo/tf-test-easysaas-beta-image@sha256:7bba0fa85b2956df7768f7b32e715b6fe11f4f4193e2a70a35bf3f286a6cdf9e",
    },
    inputVariableDefaults: [{
        variable: "name",
        value: "test",
        type: "STRING",
    }],
});
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_previous = gcp.saasruntime.Release("example_previous",
    location="global",
    release_id="previous-release",
    unit_kind=example_unitkind.id,
    blueprint={
        "package": "us-central1-docker.pkg.dev/ci-test-project-188019/test-repo/tf-test-easysaas-alpha-image@sha256:7992fdbaeaf998ecd31a7f937bb26e38a781ecf49b24857a6176c1e9bfc299ee",
    })
example = gcp.saasruntime.Release("example",
    location="global",
    release_id="example-release",
    unit_kind=example_unitkind.id,
    blueprint={
        "package": "us-central1-docker.pkg.dev/ci-test-project-188019/test-repo/tf-test-easysaas-beta-image@sha256:7bba0fa85b2956df7768f7b32e715b6fe11f4f4193e2a70a35bf3f286a6cdf9e",
    },
    input_variable_defaults=[{
        "variable": "name",
        "value": "test",
        "type": "STRING",
    }])
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 examplePrevious = new Gcp.SaaSRuntime.Release("example_previous", new()
    {
        Location = "global",
        ReleaseId = "previous-release",
        UnitKind = exampleUnitkind.Id,
        Blueprint = new Gcp.SaaSRuntime.Inputs.ReleaseBlueprintArgs
        {
            Package = "us-central1-docker.pkg.dev/ci-test-project-188019/test-repo/tf-test-easysaas-alpha-image@sha256:7992fdbaeaf998ecd31a7f937bb26e38a781ecf49b24857a6176c1e9bfc299ee",
        },
    });

    var example = new Gcp.SaaSRuntime.Release("example", new()
    {
        Location = "global",
        ReleaseId = "example-release",
        UnitKind = exampleUnitkind.Id,
        Blueprint = new Gcp.SaaSRuntime.Inputs.ReleaseBlueprintArgs
        {
            Package = "us-central1-docker.pkg.dev/ci-test-project-188019/test-repo/tf-test-easysaas-beta-image@sha256:7bba0fa85b2956df7768f7b32e715b6fe11f4f4193e2a70a35bf3f286a6cdf9e",
        },
        InputVariableDefaults = new[]
        {
            new Gcp.SaaSRuntime.Inputs.ReleaseInputVariableDefaultArgs
            {
                Variable = "name",
                Value = "test",
                Type = "STRING",
            },
        },
    });

});
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.NewRelease(ctx, "example_previous", &saasruntime.ReleaseArgs{
			Location:  pulumi.String("global"),
			ReleaseId: pulumi.String("previous-release"),
			UnitKind:  exampleUnitkind.ID().ToIDOutput().ToStringOutput(),
			Blueprint: &saasruntime.ReleaseBlueprintArgs{
				Package: pulumi.String("us-central1-docker.pkg.dev/ci-test-project-188019/test-repo/tf-test-easysaas-alpha-image@sha256:7992fdbaeaf998ecd31a7f937bb26e38a781ecf49b24857a6176c1e9bfc299ee"),
			},
		})
		if err != nil {
			return err
		}
		_, err = saasruntime.NewRelease(ctx, "example", &saasruntime.ReleaseArgs{
			Location:  pulumi.String("global"),
			ReleaseId: pulumi.String("example-release"),
			UnitKind:  exampleUnitkind.ID().ToIDOutput().ToStringOutput(),
			Blueprint: &saasruntime.ReleaseBlueprintArgs{
				Package: pulumi.String("us-central1-docker.pkg.dev/ci-test-project-188019/test-repo/tf-test-easysaas-beta-image@sha256:7bba0fa85b2956df7768f7b32e715b6fe11f4f4193e2a70a35bf3f286a6cdf9e"),
			},
			InputVariableDefaults: saasruntime.ReleaseInputVariableDefaultArray{
				&saasruntime.ReleaseInputVariableDefaultArgs{
					Variable: pulumi.String("name"),
					Value:    pulumi.String("test"),
					Type:     pulumi.String("STRING"),
				},
			},
		})
		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_release" "example_previous" {
  location   = "global"
  release_id = "previous-release"
  unit_kind  = gcp_saasruntime_unitkind.example_unitkind.id
  blueprint = {
    package = "us-central1-docker.pkg.dev/ci-test-project-188019/test-repo/tf-test-easysaas-alpha-image@sha256:7992fdbaeaf998ecd31a7f937bb26e38a781ecf49b24857a6176c1e9bfc299ee"
  }
}
resource "gcp_saasruntime_release" "example" {
  location   = "global"
  release_id = "example-release"
  unit_kind  = gcp_saasruntime_unitkind.example_unitkind.id
  blueprint = {
    package = "us-central1-docker.pkg.dev/ci-test-project-188019/test-repo/tf-test-easysaas-beta-image@sha256:7bba0fa85b2956df7768f7b32e715b6fe11f4f4193e2a70a35bf3f286a6cdf9e"
  }
  input_variable_defaults {
    variable = "name"
    value    = "test"
    type     = "STRING"
  }
}
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.Release;
import com.pulumi.gcp.saasruntime.ReleaseArgs;
import com.pulumi.gcp.saasruntime.inputs.ReleaseBlueprintArgs;
import com.pulumi.gcp.saasruntime.inputs.ReleaseInputVariableDefaultArgs;
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 examplePrevious = new Release("examplePrevious", ReleaseArgs.builder()
            .location("global")
            .releaseId("previous-release")
            .unitKind(exampleUnitkind.id())
            .blueprint(ReleaseBlueprintArgs.builder()
                .package_("us-central1-docker.pkg.dev/ci-test-project-188019/test-repo/tf-test-easysaas-alpha-image@sha256:7992fdbaeaf998ecd31a7f937bb26e38a781ecf49b24857a6176c1e9bfc299ee")
                .build())
            .build());

        var example = new Release("example", ReleaseArgs.builder()
            .location("global")
            .releaseId("example-release")
            .unitKind(exampleUnitkind.id())
            .blueprint(ReleaseBlueprintArgs.builder()
                .package_("us-central1-docker.pkg.dev/ci-test-project-188019/test-repo/tf-test-easysaas-beta-image@sha256:7bba0fa85b2956df7768f7b32e715b6fe11f4f4193e2a70a35bf3f286a6cdf9e")
                .build())
            .inputVariableDefaults(ReleaseInputVariableDefaultArgs.builder()
                .variable("name")
                .value("test")
                .type("STRING")
                .build())
            .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}
  examplePrevious:
    type: gcp:saasruntime:Release
    name: example_previous
    properties:
      location: global
      releaseId: previous-release
      unitKind: ${exampleUnitkind.id}
      blueprint:
        package: us-central1-docker.pkg.dev/ci-test-project-188019/test-repo/tf-test-easysaas-alpha-image@sha256:7992fdbaeaf998ecd31a7f937bb26e38a781ecf49b24857a6176c1e9bfc299ee
  example:
    type: gcp:saasruntime:Release
    properties:
      location: global
      releaseId: example-release
      unitKind: ${exampleUnitkind.id}
      blueprint:
        package: us-central1-docker.pkg.dev/ci-test-project-188019/test-repo/tf-test-easysaas-beta-image@sha256:7bba0fa85b2956df7768f7b32e715b6fe11f4f4193e2a70a35bf3f286a6cdf9e
      inputVariableDefaults:
        - variable: name
          value: test
          type: STRING

Import

Release can be imported using any of these accepted formats:

  • projects/{{project}}/locations/{{location}}/releases/{{release_id}}
  • {{project}}/{{location}}/{{release_id}}
  • {{location}}/{{release_id}}

When using the pulumi import command, Release can be imported using one of the formats above. For example:

$ pulumi import gcp:saasruntime/release:Release default projects/{{project}}/locations/{{location}}/releases/{{release_id}}
$ pulumi import gcp:saasruntime/release:Release default {{project}}/{{location}}/{{release_id}}
$ pulumi import gcp:saasruntime/release:Release default {{location}}/{{release_id}}

Constructors

Release(String name, {ReleaseArgs? args, CustomResourceOptions? options})
Creates a new Release. name The Pulumi resource name. args Arguments used to configure this Release. The set of arguments for Release. options Resource options controlling this resource's behavior.
Release.reference(String urn)
Creates a typed reference to an existing Release 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 effectiveAnnotations for all of the annotations present on the resource.
latefinal
blueprint ↔ Output<ReleaseBlueprint?>
Blueprints are OCI Images that contain all of the artifacts needed to provision a unit. Metadata such as, type of the engine used to actuate the blueprint (e.g. terraform, helm etc) and version will come from the image manifest. If the hostname is omitted, it will be assumed to be the regional path to Artifact Registry (eg. us-east1-docker.pkg.dev). Structure is documented below.
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
etag ↔ Output<String>
An opaque value that uniquely identifies a version or generation of a resource. It can be used to confirm that the client and server agree on the ordering of a resource being written.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
inputVariableDefaults ↔ Output<List<ReleaseInputVariableDefault>?>
Mapping of input variables to default values. Maximum 100 Structure is documented below.
latefinal
inputVariables ↔ Output<List<ReleaseInputVariable>>
List of input variables declared on the blueprint and can be present with their values on the unit spec Structure is documented below.
latefinal
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 effectiveLabels for 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}/releases/{release}"
latefinal
outputVariables ↔ Output<List<ReleaseOutputVariable>>
List of output variables declared on the blueprint and can be present with their values on the unit status Structure is documented below.
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
releaseId ↔ Output<String>
The ID value for the new release.
latefinal
releaseRequirements ↔ Output<ReleaseReleaseRequirements?>
Set of requirements to be fulfilled on the Unit when using this Release. Structure is documented below.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
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
unitKind ↔ Output<String>
Reference to the UnitKind this Release corresponds to (required and immutable once created).
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
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, {ReleaseState? state, CustomResourceOptions? options}) → Release
Gets an existing Release resource's state with the given name and id.