1. Packages
  2. Zitadel
  3. API Docs
  4. DomainPolicy
zitadel v0.1.8 published on Thursday, May 30, 2024 by pulumiverse

zitadel.DomainPolicy

Explore with Pulumi AI

zitadel logo
zitadel v0.1.8 published on Thursday, May 30, 2024 by pulumiverse

    Resource representing the custom domain policy of an organization.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Zitadel = Pulumiverse.Zitadel;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new Zitadel.DomainPolicy("default", new()
        {
            OrgId = data.Zitadel_org.Default.Id,
            UserLoginMustBeDomain = false,
            ValidateOrgDomains = true,
            SmtpSenderAddressMatchesInstanceDomain = true,
        });
    
    });
    
    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.NewDomainPolicy(ctx, "default", &zitadel.DomainPolicyArgs{
    			OrgId:                                  pulumi.Any(data.Zitadel_org.Default.Id),
    			UserLoginMustBeDomain:                  pulumi.Bool(false),
    			ValidateOrgDomains:                     pulumi.Bool(true),
    			SmtpSenderAddressMatchesInstanceDomain: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.zitadel.DomainPolicy;
    import com.pulumi.zitadel.DomainPolicyArgs;
    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 DomainPolicy("default", DomainPolicyArgs.builder()        
                .orgId(data.zitadel_org().default().id())
                .userLoginMustBeDomain(false)
                .validateOrgDomains(true)
                .smtpSenderAddressMatchesInstanceDomain(true)
                .build());
    
        }
    }
    
    import pulumi
    import pulumiverse_zitadel as zitadel
    
    default = zitadel.DomainPolicy("default",
        org_id=data["zitadel_org"]["default"]["id"],
        user_login_must_be_domain=False,
        validate_org_domains=True,
        smtp_sender_address_matches_instance_domain=True)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as zitadel from "@pulumiverse/zitadel";
    
    const _default = new zitadel.DomainPolicy("default", {
        orgId: data.zitadel_org["default"].id,
        userLoginMustBeDomain: false,
        validateOrgDomains: true,
        smtpSenderAddressMatchesInstanceDomain: true,
    });
    
    resources:
      default:
        type: zitadel:DomainPolicy
        properties:
          orgId: ${data.zitadel_org.default.id}
          userLoginMustBeDomain: false
          validateOrgDomains: true
          smtpSenderAddressMatchesInstanceDomain: true
    

    Create DomainPolicy Resource

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

    Constructor syntax

    new DomainPolicy(name: string, args: DomainPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def DomainPolicy(resource_name: str,
                     args: DomainPolicyArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def DomainPolicy(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     smtp_sender_address_matches_instance_domain: Optional[bool] = None,
                     user_login_must_be_domain: Optional[bool] = None,
                     validate_org_domains: Optional[bool] = None,
                     org_id: Optional[str] = None)
    func NewDomainPolicy(ctx *Context, name string, args DomainPolicyArgs, opts ...ResourceOption) (*DomainPolicy, error)
    public DomainPolicy(string name, DomainPolicyArgs args, CustomResourceOptions? opts = null)
    public DomainPolicy(String name, DomainPolicyArgs args)
    public DomainPolicy(String name, DomainPolicyArgs args, CustomResourceOptions options)
    
    type: zitadel:DomainPolicy
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args DomainPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args DomainPolicyArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args DomainPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DomainPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DomainPolicyArgs
    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 domainPolicyResource = new Zitadel.DomainPolicy("domainPolicyResource", new()
    {
        SmtpSenderAddressMatchesInstanceDomain = false,
        UserLoginMustBeDomain = false,
        ValidateOrgDomains = false,
        OrgId = "string",
    });
    
    example, err := zitadel.NewDomainPolicy(ctx, "domainPolicyResource", &zitadel.DomainPolicyArgs{
    	SmtpSenderAddressMatchesInstanceDomain: pulumi.Bool(false),
    	UserLoginMustBeDomain:                  pulumi.Bool(false),
    	ValidateOrgDomains:                     pulumi.Bool(false),
    	OrgId:                                  pulumi.String("string"),
    })
    
    var domainPolicyResource = new DomainPolicy("domainPolicyResource", DomainPolicyArgs.builder()
        .smtpSenderAddressMatchesInstanceDomain(false)
        .userLoginMustBeDomain(false)
        .validateOrgDomains(false)
        .orgId("string")
        .build());
    
    domain_policy_resource = zitadel.DomainPolicy("domainPolicyResource",
        smtp_sender_address_matches_instance_domain=False,
        user_login_must_be_domain=False,
        validate_org_domains=False,
        org_id="string")
    
    const domainPolicyResource = new zitadel.DomainPolicy("domainPolicyResource", {
        smtpSenderAddressMatchesInstanceDomain: false,
        userLoginMustBeDomain: false,
        validateOrgDomains: false,
        orgId: "string",
    });
    
    type: zitadel:DomainPolicy
    properties:
        orgId: string
        smtpSenderAddressMatchesInstanceDomain: false
        userLoginMustBeDomain: false
        validateOrgDomains: false
    

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

    SmtpSenderAddressMatchesInstanceDomain bool
    UserLoginMustBeDomain bool
    User login must be domain
    ValidateOrgDomains bool
    Validate organization domains
    OrgId string
    ID of the organization
    SmtpSenderAddressMatchesInstanceDomain bool
    UserLoginMustBeDomain bool
    User login must be domain
    ValidateOrgDomains bool
    Validate organization domains
    OrgId string
    ID of the organization
    smtpSenderAddressMatchesInstanceDomain Boolean
    userLoginMustBeDomain Boolean
    User login must be domain
    validateOrgDomains Boolean
    Validate organization domains
    orgId String
    ID of the organization
    smtpSenderAddressMatchesInstanceDomain boolean
    userLoginMustBeDomain boolean
    User login must be domain
    validateOrgDomains boolean
    Validate organization domains
    orgId string
    ID of the organization
    smtp_sender_address_matches_instance_domain bool
    user_login_must_be_domain bool
    User login must be domain
    validate_org_domains bool
    Validate organization domains
    org_id str
    ID of the organization
    smtpSenderAddressMatchesInstanceDomain Boolean
    userLoginMustBeDomain Boolean
    User login must be domain
    validateOrgDomains Boolean
    Validate organization domains
    orgId String
    ID of the organization

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing DomainPolicy Resource

    Get an existing DomainPolicy 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?: DomainPolicyState, opts?: CustomResourceOptions): DomainPolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            org_id: Optional[str] = None,
            smtp_sender_address_matches_instance_domain: Optional[bool] = None,
            user_login_must_be_domain: Optional[bool] = None,
            validate_org_domains: Optional[bool] = None) -> DomainPolicy
    func GetDomainPolicy(ctx *Context, name string, id IDInput, state *DomainPolicyState, opts ...ResourceOption) (*DomainPolicy, error)
    public static DomainPolicy Get(string name, Input<string> id, DomainPolicyState? state, CustomResourceOptions? opts = null)
    public static DomainPolicy get(String name, Output<String> id, DomainPolicyState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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:
    OrgId string
    ID of the organization
    SmtpSenderAddressMatchesInstanceDomain bool
    UserLoginMustBeDomain bool
    User login must be domain
    ValidateOrgDomains bool
    Validate organization domains
    OrgId string
    ID of the organization
    SmtpSenderAddressMatchesInstanceDomain bool
    UserLoginMustBeDomain bool
    User login must be domain
    ValidateOrgDomains bool
    Validate organization domains
    orgId String
    ID of the organization
    smtpSenderAddressMatchesInstanceDomain Boolean
    userLoginMustBeDomain Boolean
    User login must be domain
    validateOrgDomains Boolean
    Validate organization domains
    orgId string
    ID of the organization
    smtpSenderAddressMatchesInstanceDomain boolean
    userLoginMustBeDomain boolean
    User login must be domain
    validateOrgDomains boolean
    Validate organization domains
    org_id str
    ID of the organization
    smtp_sender_address_matches_instance_domain bool
    user_login_must_be_domain bool
    User login must be domain
    validate_org_domains bool
    Validate organization domains
    orgId String
    ID of the organization
    smtpSenderAddressMatchesInstanceDomain Boolean
    userLoginMustBeDomain Boolean
    User login must be domain
    validateOrgDomains Boolean
    Validate organization domains

    Import

    terraform The resource can be imported using the ID format <[org_id]>, e.g.

     $ pulumi import zitadel:index/domainPolicy:DomainPolicy imported '123456789012345678'
    

    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.
    zitadel logo
    zitadel v0.1.8 published on Thursday, May 30, 2024 by pulumiverse