1. Packages
  2. Zitadel
  3. API Docs
  4. Org
zitadel v0.2.0 published on Monday, Mar 24, 2025 by pulumiverse

zitadel.Org

Explore with Pulumi AI

Resource representing an organization in ZITADEL, which is the highest level after the instance and contains several other resource including policies if the configuration differs to the default policies on the instance.

Example Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Zitadel = Pulumiverse.Zitadel;

return await Deployment.RunAsync(() => 
{
    var @default = new Zitadel.Org("default", new()
    {
        Name = "terraform-test",
    });

});
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-zitadel/sdk/go/zitadel"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := zitadel.NewOrg(ctx, "default", &zitadel.OrgArgs{
			Name: pulumi.String("terraform-test"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.zitadel.Org;
import com.pulumi.zitadel.OrgArgs;
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 default_ = new Org("default", OrgArgs.builder()        
            .name("terraform-test")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as zitadel from "@pulumiverse/zitadel";

const _default = new zitadel.Org("default", {name: "terraform-test"});
Copy
import pulumi
import pulumiverse_zitadel as zitadel

default = zitadel.Org("default", name="terraform-test")
Copy
resources:
  default:
    type: zitadel:Org
    properties:
      name: terraform-test
Copy

Create Org Resource

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

Constructor syntax

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

@overload
def Org(resource_name: str,
        opts: Optional[ResourceOptions] = None,
        is_default: Optional[bool] = None,
        name: Optional[str] = None)
func NewOrg(ctx *Context, name string, args *OrgArgs, opts ...ResourceOption) (*Org, error)
public Org(string name, OrgArgs? args = null, CustomResourceOptions? opts = null)
public Org(String name, OrgArgs args)
public Org(String name, OrgArgs args, CustomResourceOptions options)
type: zitadel:Org
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 OrgArgs
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 OrgArgs
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 OrgArgs
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 OrgArgs
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. OrgArgs
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 orgResource = new Zitadel.Org("orgResource", new()
{
    IsDefault = false,
    Name = "string",
});
Copy
example, err := zitadel.NewOrg(ctx, "orgResource", &zitadel.OrgArgs{
	IsDefault: pulumi.Bool(false),
	Name:      pulumi.String("string"),
})
Copy
var orgResource = new Org("orgResource", OrgArgs.builder()
    .isDefault(false)
    .name("string")
    .build());
Copy
org_resource = zitadel.Org("orgResource",
    is_default=False,
    name="string")
Copy
const orgResource = new zitadel.Org("orgResource", {
    isDefault: false,
    name: "string",
});
Copy
type: zitadel:Org
properties:
    isDefault: false
    name: string
Copy

Org 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 Org resource accepts the following input properties:

IsDefault bool
True sets the org as default org for the instance. Only one org can be default org. Nothing happens if you set it to false until you set another org as default org.
Name string
Name of the org
IsDefault bool
True sets the org as default org for the instance. Only one org can be default org. Nothing happens if you set it to false until you set another org as default org.
Name string
Name of the org
isDefault Boolean
True sets the org as default org for the instance. Only one org can be default org. Nothing happens if you set it to false until you set another org as default org.
name String
Name of the org
isDefault boolean
True sets the org as default org for the instance. Only one org can be default org. Nothing happens if you set it to false until you set another org as default org.
name string
Name of the org
is_default bool
True sets the org as default org for the instance. Only one org can be default org. Nothing happens if you set it to false until you set another org as default org.
name str
Name of the org
isDefault Boolean
True sets the org as default org for the instance. Only one org can be default org. Nothing happens if you set it to false until you set another org as default org.
name String
Name of the org

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
PrimaryDomain string
Primary domain of the org
State string
State of the org
Id string
The provider-assigned unique ID for this managed resource.
PrimaryDomain string
Primary domain of the org
State string
State of the org
id String
The provider-assigned unique ID for this managed resource.
primaryDomain String
Primary domain of the org
state String
State of the org
id string
The provider-assigned unique ID for this managed resource.
primaryDomain string
Primary domain of the org
state string
State of the org
id str
The provider-assigned unique ID for this managed resource.
primary_domain str
Primary domain of the org
state str
State of the org
id String
The provider-assigned unique ID for this managed resource.
primaryDomain String
Primary domain of the org
state String
State of the org

Look up Existing Org Resource

Get an existing Org 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?: OrgState, opts?: CustomResourceOptions): Org
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        is_default: Optional[bool] = None,
        name: Optional[str] = None,
        primary_domain: Optional[str] = None,
        state: Optional[str] = None) -> Org
func GetOrg(ctx *Context, name string, id IDInput, state *OrgState, opts ...ResourceOption) (*Org, error)
public static Org Get(string name, Input<string> id, OrgState? state, CustomResourceOptions? opts = null)
public static Org get(String name, Output<String> id, OrgState state, CustomResourceOptions options)
resources:  _:    type: zitadel:Org    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:
IsDefault bool
True sets the org as default org for the instance. Only one org can be default org. Nothing happens if you set it to false until you set another org as default org.
Name string
Name of the org
PrimaryDomain string
Primary domain of the org
State string
State of the org
IsDefault bool
True sets the org as default org for the instance. Only one org can be default org. Nothing happens if you set it to false until you set another org as default org.
Name string
Name of the org
PrimaryDomain string
Primary domain of the org
State string
State of the org
isDefault Boolean
True sets the org as default org for the instance. Only one org can be default org. Nothing happens if you set it to false until you set another org as default org.
name String
Name of the org
primaryDomain String
Primary domain of the org
state String
State of the org
isDefault boolean
True sets the org as default org for the instance. Only one org can be default org. Nothing happens if you set it to false until you set another org as default org.
name string
Name of the org
primaryDomain string
Primary domain of the org
state string
State of the org
is_default bool
True sets the org as default org for the instance. Only one org can be default org. Nothing happens if you set it to false until you set another org as default org.
name str
Name of the org
primary_domain str
Primary domain of the org
state str
State of the org
isDefault Boolean
True sets the org as default org for the instance. Only one org can be default org. Nothing happens if you set it to false until you set another org as default org.
name String
Name of the org
primaryDomain String
Primary domain of the org
state String
State of the org

Import

bash The resource can be imported using the ID format <id>, e.g.

 $ pulumi import zitadel:index/org:Org imported '123456789012345678'
Copy

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

Package Details

Repository
zitadel pulumiverse/pulumi-zitadel
License
Apache-2.0
Notes
This Pulumi package is based on the zitadel Terraform Provider.