1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. identityplatform
  5. Tenant
Google Cloud v8.27.1 published on Friday, Apr 25, 2025 by Pulumi

gcp.identityplatform.Tenant

Explore with Pulumi AI

Tenant configuration in a multi-tenant project.

You must enable the Google Identity Platform in the marketplace prior to using this resource.

You must enable multi-tenancy via the Cloud Console prior to creating tenants.

Example Usage

Identity Platform Tenant Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const tenant = new gcp.identityplatform.Tenant("tenant", {
    displayName: "tenant",
    allowPasswordSignup: true,
});
Copy
import pulumi
import pulumi_gcp as gcp

tenant = gcp.identityplatform.Tenant("tenant",
    display_name="tenant",
    allow_password_signup=True)
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/identityplatform"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := identityplatform.NewTenant(ctx, "tenant", &identityplatform.TenantArgs{
			DisplayName:         pulumi.String("tenant"),
			AllowPasswordSignup: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var tenant = new Gcp.IdentityPlatform.Tenant("tenant", new()
    {
        DisplayName = "tenant",
        AllowPasswordSignup = true,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.identityplatform.Tenant;
import com.pulumi.gcp.identityplatform.TenantArgs;
import java.util.List;
import java.util.ArrayList;
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 tenant = new Tenant("tenant", TenantArgs.builder()
            .displayName("tenant")
            .allowPasswordSignup(true)
            .build());

    }
}
Copy
resources:
  tenant:
    type: gcp:identityplatform:Tenant
    properties:
      displayName: tenant
      allowPasswordSignup: true
Copy

Create Tenant Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Tenant(name: string, args: TenantArgs, opts?: CustomResourceOptions);
@overload
def Tenant(resource_name: str,
           args: TenantArgs,
           opts: Optional[ResourceOptions] = None)

@overload
def Tenant(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           display_name: Optional[str] = None,
           allow_password_signup: Optional[bool] = None,
           client: Optional[TenantClientArgs] = None,
           disable_auth: Optional[bool] = None,
           enable_email_link_signin: Optional[bool] = None,
           project: Optional[str] = None)
func NewTenant(ctx *Context, name string, args TenantArgs, opts ...ResourceOption) (*Tenant, error)
public Tenant(string name, TenantArgs args, CustomResourceOptions? opts = null)
public Tenant(String name, TenantArgs args)
public Tenant(String name, TenantArgs args, CustomResourceOptions options)
type: gcp:identityplatform:Tenant
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. TenantArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. TenantArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. TenantArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. TenantArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. TenantArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var tenantResource = new Gcp.IdentityPlatform.Tenant("tenantResource", new()
{
    DisplayName = "string",
    AllowPasswordSignup = false,
    Client = new Gcp.IdentityPlatform.Inputs.TenantClientArgs
    {
        Permissions = new Gcp.IdentityPlatform.Inputs.TenantClientPermissionsArgs
        {
            DisabledUserDeletion = false,
            DisabledUserSignup = false,
        },
    },
    DisableAuth = false,
    EnableEmailLinkSignin = false,
    Project = "string",
});
Copy
example, err := identityplatform.NewTenant(ctx, "tenantResource", &identityplatform.TenantArgs{
	DisplayName:         pulumi.String("string"),
	AllowPasswordSignup: pulumi.Bool(false),
	Client: &identityplatform.TenantClientArgs{
		Permissions: &identityplatform.TenantClientPermissionsArgs{
			DisabledUserDeletion: pulumi.Bool(false),
			DisabledUserSignup:   pulumi.Bool(false),
		},
	},
	DisableAuth:           pulumi.Bool(false),
	EnableEmailLinkSignin: pulumi.Bool(false),
	Project:               pulumi.String("string"),
})
Copy
var tenantResource = new Tenant("tenantResource", TenantArgs.builder()
    .displayName("string")
    .allowPasswordSignup(false)
    .client(TenantClientArgs.builder()
        .permissions(TenantClientPermissionsArgs.builder()
            .disabledUserDeletion(false)
            .disabledUserSignup(false)
            .build())
        .build())
    .disableAuth(false)
    .enableEmailLinkSignin(false)
    .project("string")
    .build());
Copy
tenant_resource = gcp.identityplatform.Tenant("tenantResource",
    display_name="string",
    allow_password_signup=False,
    client={
        "permissions": {
            "disabled_user_deletion": False,
            "disabled_user_signup": False,
        },
    },
    disable_auth=False,
    enable_email_link_signin=False,
    project="string")
Copy
const tenantResource = new gcp.identityplatform.Tenant("tenantResource", {
    displayName: "string",
    allowPasswordSignup: false,
    client: {
        permissions: {
            disabledUserDeletion: false,
            disabledUserSignup: false,
        },
    },
    disableAuth: false,
    enableEmailLinkSignin: false,
    project: "string",
});
Copy
type: gcp:identityplatform:Tenant
properties:
    allowPasswordSignup: false
    client:
        permissions:
            disabledUserDeletion: false
            disabledUserSignup: false
    disableAuth: false
    displayName: string
    enableEmailLinkSignin: false
    project: string
Copy

Tenant Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Tenant resource accepts the following input properties:

DisplayName This property is required. string
Human friendly display name of the tenant.


AllowPasswordSignup bool
Whether to allow email/password user authentication.
Client TenantClient
Options related to how clients making requests on behalf of a tenant should be configured. Structure is documented below.
DisableAuth bool
Whether authentication is disabled for the tenant. If true, the users under the disabled tenant are not allowed to sign-in. Admins of the disabled tenant are not able to manage its users.
EnableEmailLinkSignin bool
Whether to enable email link user authentication.
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
DisplayName This property is required. string
Human friendly display name of the tenant.


AllowPasswordSignup bool
Whether to allow email/password user authentication.
Client TenantClientArgs
Options related to how clients making requests on behalf of a tenant should be configured. Structure is documented below.
DisableAuth bool
Whether authentication is disabled for the tenant. If true, the users under the disabled tenant are not allowed to sign-in. Admins of the disabled tenant are not able to manage its users.
EnableEmailLinkSignin bool
Whether to enable email link user authentication.
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
displayName This property is required. String
Human friendly display name of the tenant.


allowPasswordSignup Boolean
Whether to allow email/password user authentication.
client TenantClient
Options related to how clients making requests on behalf of a tenant should be configured. Structure is documented below.
disableAuth Boolean
Whether authentication is disabled for the tenant. If true, the users under the disabled tenant are not allowed to sign-in. Admins of the disabled tenant are not able to manage its users.
enableEmailLinkSignin Boolean
Whether to enable email link user authentication.
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
displayName This property is required. string
Human friendly display name of the tenant.


allowPasswordSignup boolean
Whether to allow email/password user authentication.
client TenantClient
Options related to how clients making requests on behalf of a tenant should be configured. Structure is documented below.
disableAuth boolean
Whether authentication is disabled for the tenant. If true, the users under the disabled tenant are not allowed to sign-in. Admins of the disabled tenant are not able to manage its users.
enableEmailLinkSignin boolean
Whether to enable email link user authentication.
project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
display_name This property is required. str
Human friendly display name of the tenant.


allow_password_signup bool
Whether to allow email/password user authentication.
client TenantClientArgs
Options related to how clients making requests on behalf of a tenant should be configured. Structure is documented below.
disable_auth bool
Whether authentication is disabled for the tenant. If true, the users under the disabled tenant are not allowed to sign-in. Admins of the disabled tenant are not able to manage its users.
enable_email_link_signin bool
Whether to enable email link user authentication.
project Changes to this property will trigger replacement. str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
displayName This property is required. String
Human friendly display name of the tenant.


allowPasswordSignup Boolean
Whether to allow email/password user authentication.
client Property Map
Options related to how clients making requests on behalf of a tenant should be configured. Structure is documented below.
disableAuth Boolean
Whether authentication is disabled for the tenant. If true, the users under the disabled tenant are not allowed to sign-in. Admins of the disabled tenant are not able to manage its users.
enableEmailLinkSignin Boolean
Whether to enable email link user authentication.
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Outputs

All input properties are implicitly available as output properties. Additionally, the Tenant resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the tenant that is generated by the server
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the tenant that is generated by the server
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the tenant that is generated by the server
id string
The provider-assigned unique ID for this managed resource.
name string
The name of the tenant that is generated by the server
id str
The provider-assigned unique ID for this managed resource.
name str
The name of the tenant that is generated by the server
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the tenant that is generated by the server

Look up Existing Tenant Resource

Get an existing Tenant resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: TenantState, opts?: CustomResourceOptions): Tenant
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        allow_password_signup: Optional[bool] = None,
        client: Optional[TenantClientArgs] = None,
        disable_auth: Optional[bool] = None,
        display_name: Optional[str] = None,
        enable_email_link_signin: Optional[bool] = None,
        name: Optional[str] = None,
        project: Optional[str] = None) -> Tenant
func GetTenant(ctx *Context, name string, id IDInput, state *TenantState, opts ...ResourceOption) (*Tenant, error)
public static Tenant Get(string name, Input<string> id, TenantState? state, CustomResourceOptions? opts = null)
public static Tenant get(String name, Output<String> id, TenantState state, CustomResourceOptions options)
resources:  _:    type: gcp:identityplatform:Tenant    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AllowPasswordSignup bool
Whether to allow email/password user authentication.
Client TenantClient
Options related to how clients making requests on behalf of a tenant should be configured. Structure is documented below.
DisableAuth bool
Whether authentication is disabled for the tenant. If true, the users under the disabled tenant are not allowed to sign-in. Admins of the disabled tenant are not able to manage its users.
DisplayName string
Human friendly display name of the tenant.


EnableEmailLinkSignin bool
Whether to enable email link user authentication.
Name string
The name of the tenant that is generated by the server
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
AllowPasswordSignup bool
Whether to allow email/password user authentication.
Client TenantClientArgs
Options related to how clients making requests on behalf of a tenant should be configured. Structure is documented below.
DisableAuth bool
Whether authentication is disabled for the tenant. If true, the users under the disabled tenant are not allowed to sign-in. Admins of the disabled tenant are not able to manage its users.
DisplayName string
Human friendly display name of the tenant.


EnableEmailLinkSignin bool
Whether to enable email link user authentication.
Name string
The name of the tenant that is generated by the server
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
allowPasswordSignup Boolean
Whether to allow email/password user authentication.
client TenantClient
Options related to how clients making requests on behalf of a tenant should be configured. Structure is documented below.
disableAuth Boolean
Whether authentication is disabled for the tenant. If true, the users under the disabled tenant are not allowed to sign-in. Admins of the disabled tenant are not able to manage its users.
displayName String
Human friendly display name of the tenant.


enableEmailLinkSignin Boolean
Whether to enable email link user authentication.
name String
The name of the tenant that is generated by the server
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
allowPasswordSignup boolean
Whether to allow email/password user authentication.
client TenantClient
Options related to how clients making requests on behalf of a tenant should be configured. Structure is documented below.
disableAuth boolean
Whether authentication is disabled for the tenant. If true, the users under the disabled tenant are not allowed to sign-in. Admins of the disabled tenant are not able to manage its users.
displayName string
Human friendly display name of the tenant.


enableEmailLinkSignin boolean
Whether to enable email link user authentication.
name string
The name of the tenant that is generated by the server
project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
allow_password_signup bool
Whether to allow email/password user authentication.
client TenantClientArgs
Options related to how clients making requests on behalf of a tenant should be configured. Structure is documented below.
disable_auth bool
Whether authentication is disabled for the tenant. If true, the users under the disabled tenant are not allowed to sign-in. Admins of the disabled tenant are not able to manage its users.
display_name str
Human friendly display name of the tenant.


enable_email_link_signin bool
Whether to enable email link user authentication.
name str
The name of the tenant that is generated by the server
project Changes to this property will trigger replacement. str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
allowPasswordSignup Boolean
Whether to allow email/password user authentication.
client Property Map
Options related to how clients making requests on behalf of a tenant should be configured. Structure is documented below.
disableAuth Boolean
Whether authentication is disabled for the tenant. If true, the users under the disabled tenant are not allowed to sign-in. Admins of the disabled tenant are not able to manage its users.
displayName String
Human friendly display name of the tenant.


enableEmailLinkSignin Boolean
Whether to enable email link user authentication.
name String
The name of the tenant that is generated by the server
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Supporting Types

TenantClient
, TenantClientArgs

Permissions TenantClientPermissions
Configuration related to restricting a user's ability to affect their account. Structure is documented below.
Permissions TenantClientPermissions
Configuration related to restricting a user's ability to affect their account. Structure is documented below.
permissions TenantClientPermissions
Configuration related to restricting a user's ability to affect their account. Structure is documented below.
permissions TenantClientPermissions
Configuration related to restricting a user's ability to affect their account. Structure is documented below.
permissions TenantClientPermissions
Configuration related to restricting a user's ability to affect their account. Structure is documented below.
permissions Property Map
Configuration related to restricting a user's ability to affect their account. Structure is documented below.

TenantClientPermissions
, TenantClientPermissionsArgs

DisabledUserDeletion bool
When true, end users cannot delete their account on the associated project through any of our API methods.
DisabledUserSignup bool
When true, end users cannot sign up for a new account on the associated project through any of our API methods.
DisabledUserDeletion bool
When true, end users cannot delete their account on the associated project through any of our API methods.
DisabledUserSignup bool
When true, end users cannot sign up for a new account on the associated project through any of our API methods.
disabledUserDeletion Boolean
When true, end users cannot delete their account on the associated project through any of our API methods.
disabledUserSignup Boolean
When true, end users cannot sign up for a new account on the associated project through any of our API methods.
disabledUserDeletion boolean
When true, end users cannot delete their account on the associated project through any of our API methods.
disabledUserSignup boolean
When true, end users cannot sign up for a new account on the associated project through any of our API methods.
disabled_user_deletion bool
When true, end users cannot delete their account on the associated project through any of our API methods.
disabled_user_signup bool
When true, end users cannot sign up for a new account on the associated project through any of our API methods.
disabledUserDeletion Boolean
When true, end users cannot delete their account on the associated project through any of our API methods.
disabledUserSignup Boolean
When true, end users cannot sign up for a new account on the associated project through any of our API methods.

Import

Tenant can be imported using any of these accepted formats:

  • projects/{{project}}/tenants/{{name}}

  • {{project}}/{{name}}

  • {{name}}

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

$ pulumi import gcp:identityplatform/tenant:Tenant default projects/{{project}}/tenants/{{name}}
Copy
$ pulumi import gcp:identityplatform/tenant:Tenant default {{project}}/{{name}}
Copy
$ pulumi import gcp:identityplatform/tenant:Tenant default {{name}}
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Google Cloud (GCP) Classic pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.