FusionAuth

v0.9.7 published on Thursday, Jul 28, 2022 by Theo Gravity

getTenant

# Tenant Resource

A FusionAuth Tenant is a named object that represents a discrete namespace for Users, Applications and Groups. A user is unique by email address or username within a tenant.

Tenants may be useful to support a multi-tenant application where you wish to use a single instance of FusionAuth but require the ability to have duplicate users across the tenants in your own application. In this scenario a user may exist multiple times with the same email address and different passwords across tenants.

Tenants may also be useful in a test or staging environment to allow multiple users to call APIs and create and modify users without possibility of collision.

Tenants API

Example Usage

using Pulumi;
using Fusionauth = Pulumi.Fusionauth;

class MyStack : Stack
{
    public MyStack()
    {
        var @default = Output.Create(Fusionauth.GetTenant.InvokeAsync(new Fusionauth.GetTenantArgs
        {
            Name = "Default",
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-fusionauth/sdk/go/fusionauth"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/theogravity/pulumi-fusionauth/sdk/go/fusionauth"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := fusionauth.GetTenant(ctx, &GetTenantArgs{
			Name: "Default",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var default = Output.of(FusionauthFunctions.getTenant(GetTenantArgs.builder()
            .name("Default")
            .build()));

    }
}
import pulumi
import pulumi_fusionauth as fusionauth

default = fusionauth.get_tenant(name="Default")
import * as pulumi from "@pulumi/pulumi";
import * as fusionauth from "@pulumi/fusionauth";

const defaultTenant = pulumi.output(fusionauth.getTenant({
    name: "Default",
}));
variables:
  default:
    Fn::Invoke:
      Function: fusionauth:getTenant
      Arguments:
        name: Default

Using getTenant

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getTenant(args: GetTenantArgs, opts?: InvokeOptions): Promise<GetTenantResult>
function getTenantOutput(args: GetTenantOutputArgs, opts?: InvokeOptions): Output<GetTenantResult>
def get_tenant(name: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetTenantResult
def get_tenant_output(name: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetTenantResult]
func GetTenant(ctx *Context, args *GetTenantArgs, opts ...InvokeOption) (*GetTenantResult, error)
func GetTenantOutput(ctx *Context, args *GetTenantOutputArgs, opts ...InvokeOption) GetTenantResultOutput

> Note: This function is named GetTenant in the Go SDK.

public static class GetTenant 
{
    public static Task<GetTenantResult> InvokeAsync(GetTenantArgs args, InvokeOptions? opts = null)
    public static Output<GetTenantResult> Invoke(GetTenantInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetTenantResult> getTenant(GetTenantArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: fusionauth:index/getTenant:getTenant
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Name string

The name of the Tenant.

Name string

The name of the Tenant.

name String

The name of the Tenant.

name string

The name of the Tenant.

name str

The name of the Tenant.

name String

The name of the Tenant.

getTenant Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Name string
Id string

The provider-assigned unique ID for this managed resource.

Name string
id String

The provider-assigned unique ID for this managed resource.

name String
id string

The provider-assigned unique ID for this managed resource.

name string
id str

The provider-assigned unique ID for this managed resource.

name str
id String

The provider-assigned unique ID for this managed resource.

name String

Package Details

Repository
https://github.com/theogravity/pulumi-fusionauth
License
MIT
Notes

This Pulumi package is based on the fusionauth Terraform Provider.