Tenant class
The Tenant resource represents the service producer's view of a service instance created for a consumer. It enables the association between the service producer's managed resources and the end consumer.
> 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 Tenant 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 example = new gcp.saasruntime.Tenant("example", {
location: "global",
tenantId: "example-tenant",
saas: exampleSaas.id,
consumerResource: "//compute.googleapis.com/projects/example-project/zones/us-central1-a/instances/example-instance",
});
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 = gcp.saasruntime.Tenant("example",
location="global",
tenant_id="example-tenant",
saas=example_saas.id,
consumer_resource="//compute.googleapis.com/projects/example-project/zones/us-central1-a/instances/example-instance")
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 example = new Gcp.SaaSRuntime.Tenant("example", new()
{
Location = "global",
TenantId = "example-tenant",
Saas = exampleSaas.Id,
ConsumerResource = "//compute.googleapis.com/projects/example-project/zones/us-central1-a/instances/example-instance",
});
});
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
}
_, err = saasruntime.NewTenant(ctx, "example", &saasruntime.TenantArgs{
Location: pulumi.String("global"),
TenantId: pulumi.String("example-tenant"),
Saas: exampleSaas.ID().ToIDOutput().ToStringOutput(),
ConsumerResource: pulumi.String("//compute.googleapis.com/projects/example-project/zones/us-central1-a/instances/example-instance"),
})
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_tenant" "example" {
location = "global"
tenant_id = "example-tenant"
saas = gcp_saasruntime_saas.example_saas.id
consumer_resource = "//compute.googleapis.com/projects/example-project/zones/us-central1-a/instances/example-instance"
}
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.Tenant;
import com.pulumi.gcp.saasruntime.TenantArgs;
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 example = new Tenant("example", TenantArgs.builder()
.location("global")
.tenantId("example-tenant")
.saas(exampleSaas.id())
.consumerResource("//compute.googleapis.com/projects/example-project/zones/us-central1-a/instances/example-instance")
.build());
}
}
resources:
exampleSaas:
type: gcp:saasruntime:SaaS
name: example_saas
properties:
saasId: example-saas
location: global
locations:
- name: us-central1
example:
type: gcp:saasruntime:Tenant
properties:
location: global
tenantId: example-tenant
saas: ${exampleSaas.id}
consumerResource: //compute.googleapis.com/projects/example-project/zones/us-central1-a/instances/example-instance
Import
Tenant can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/tenants/{{tenant_id}}{{project}}/{{location}}/{{tenant_id}}{{location}}/{{tenant_id}}
When using the pulumi import command, Tenant can be imported using one of the formats above. For example:
$ pulumi import gcp:saasruntime/tenant:Tenant default projects/{{project}}/locations/{{location}}/tenants/{{tenant_id}}
$ pulumi import gcp:saasruntime/tenant:Tenant default {{project}}/{{location}}/{{tenant_id}}
$ pulumi import gcp:saasruntime/tenant:Tenant default {{location}}/{{tenant_id}}
Constructors
- Tenant(String name, {TenantArgs? args, CustomResourceOptions? options})
-
Creates a new Tenant.
nameThe Pulumi resource name.argsArguments used to configure this Tenant. The set of arguments for Tenant.optionsResource options controlling this resource's behavior. - Tenant.reference(String urn)
- Creates a typed reference to an existing Tenant 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
-
consumerResource
↔ Output<
String?> -
A reference to the consumer resource this SaaS Tenant is representing.
The relationship with a consumer resource can be used by App Lifecycle Manager for
retrieving consumer-defined settings and policies such as maintenance
policies (using Unified Maintenance Policy API).
latefinal
-
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
- 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}/tenants/{tenant}"
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
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
saas
↔ Output<
String> -
A reference to the Saas that defines the product (managed service) that
the producer wants to manage with App Lifecycle Manager. Part of the
App Lifecycle Manager common data model.
latefinal
-
tenantId
↔ Output<
String> -
The ID value for the new tenant.
latefinal
-
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
-
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