1. Packages
  2. Zscaler Private Access (ZPA)
  3. API Docs
  4. Microtenant
Zscaler Private Access v0.0.11 published on Saturday, May 4, 2024 by Zscaler

zpa.Microtenant

Explore with Pulumi AI

zpa logo
Zscaler Private Access v0.0.11 published on Saturday, May 4, 2024 by Zscaler

    The zpa_microtenant_controller resource creates a microtenant controller in the Zscaler Private Access cloud. This resource allows organizations to delegate responsibilities of admins directly to the acquired or merged company admins so that they can manage their configurations independently

    ⚠️ WARNING:: This feature is in limited availability and requires additional license. To learn more, contact Zscaler Support or your local account team.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as zpa from "@bdzscaler/pulumi-zpa";
    
    // ZPA Microtenant Controller resource
    const _this = new zpa.Microtenant("this", {
        description: "Microtenant_A",
        enabled: true,
        criteriaAttribute: "AuthDomain",
        criteriaAttributeValues: ["acme.com"],
    });
    export const zpaMicrotenantController1 = _this.users.apply(users => users.map(u => ({
        microtenant_id: u.microtenantId,
        username: u.username,
        password: u.password,
    })));
    
    import pulumi
    import zscaler_pulumi_zpa as zpa
    
    # ZPA Microtenant Controller resource
    this = zpa.Microtenant("this",
        description="Microtenant_A",
        enabled=True,
        criteria_attribute="AuthDomain",
        criteria_attribute_values=["acme.com"])
    pulumi.export("zpaMicrotenantController1", this.users.apply(lambda users: [{
        "microtenant_id": u.microtenant_id,
        "username": u.username,
        "password": u.password,
    } for u in users]))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/zscaler/pulumi-zpa/sdk/go/zpa"
    )
    func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
    // ZPA Microtenant Controller resource
    this, err := zpa.NewMicrotenant(ctx, "this", &zpa.MicrotenantArgs{
    Description: pulumi.String("Microtenant_A"),
    Enabled: pulumi.Bool(true),
    CriteriaAttribute: pulumi.String("AuthDomain"),
    CriteriaAttributeValues: pulumi.StringArray{
    pulumi.String("acme.com"),
    },
    })
    if err != nil {
    return err
    }
    ctx.Export("zpaMicrotenantController1", this.Users.ApplyT(func(users []zpa.MicrotenantUser) ([]map[string]interface{}, error) {
    return "TODO: For expression", nil
    }).(pulumi.[]map[string]interface{}Output))
    return nil
    })
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Zpa = Zscaler.Zpa;
    
    return await Deployment.RunAsync(() => 
    {
        // ZPA Microtenant Controller resource
        var @this = new Zpa.Microtenant("this", new()
        {
            Description = "Microtenant_A",
            Enabled = true,
            CriteriaAttribute = "AuthDomain",
            CriteriaAttributeValues = new[]
            {
                "acme.com",
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["zpaMicrotenantController1"] = @this.Users.Apply(users => users.Select(u => 
            {
                return 
                {
                    { "microtenant_id", u.MicrotenantId },
                    { "username", u.Username },
                    { "password", u.Password },
                };
            }).ToList()),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.zpa.Microtenant;
    import com.pulumi.zpa.MicrotenantArgs;
    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) {
            // ZPA Microtenant Controller resource
            var this_ = new Microtenant("this", MicrotenantArgs.builder()        
                .description("Microtenant_A")
                .enabled(true)
                .criteriaAttribute("AuthDomain")
                .criteriaAttributeValues("acme.com")
                .build());
    
            ctx.export("zpaMicrotenantController1", this_.users().applyValue(users -> "TODO: ForExpression"));
        }
    }
    
    Coming soon!
    

    Create Microtenant Resource

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

    Constructor syntax

    new Microtenant(name: string, args?: MicrotenantArgs, opts?: CustomResourceOptions);
    @overload
    def Microtenant(resource_name: str,
                    args: Optional[MicrotenantArgs] = None,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def Microtenant(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    criteria_attribute: Optional[str] = None,
                    criteria_attribute_values: Optional[Sequence[str]] = None,
                    description: Optional[str] = None,
                    enabled: Optional[bool] = None,
                    name: Optional[str] = None,
                    users: Optional[Sequence[MicrotenantUserArgs]] = None)
    func NewMicrotenant(ctx *Context, name string, args *MicrotenantArgs, opts ...ResourceOption) (*Microtenant, error)
    public Microtenant(string name, MicrotenantArgs? args = null, CustomResourceOptions? opts = null)
    public Microtenant(String name, MicrotenantArgs args)
    public Microtenant(String name, MicrotenantArgs args, CustomResourceOptions options)
    
    type: zpa:Microtenant
    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 MicrotenantArgs
    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 MicrotenantArgs
    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 MicrotenantArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MicrotenantArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MicrotenantArgs
    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 microtenantResource = new Zpa.Microtenant("microtenantResource", new()
    {
        CriteriaAttribute = "string",
        CriteriaAttributeValues = new[]
        {
            "string",
        },
        Description = "string",
        Enabled = false,
        Name = "string",
        Users = new[]
        {
            new Zpa.Inputs.MicrotenantUserArgs
            {
                DisplayName = "string",
                MicrotenantId = "string",
                Password = "string",
                Username = "string",
            },
        },
    });
    
    example, err := zpa.NewMicrotenant(ctx, "microtenantResource", &zpa.MicrotenantArgs{
    	CriteriaAttribute: pulumi.String("string"),
    	CriteriaAttributeValues: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Description: pulumi.String("string"),
    	Enabled:     pulumi.Bool(false),
    	Name:        pulumi.String("string"),
    	Users: zpa.MicrotenantUserArray{
    		&zpa.MicrotenantUserArgs{
    			DisplayName:   pulumi.String("string"),
    			MicrotenantId: pulumi.String("string"),
    			Password:      pulumi.String("string"),
    			Username:      pulumi.String("string"),
    		},
    	},
    })
    
    var microtenantResource = new Microtenant("microtenantResource", MicrotenantArgs.builder()
        .criteriaAttribute("string")
        .criteriaAttributeValues("string")
        .description("string")
        .enabled(false)
        .name("string")
        .users(MicrotenantUserArgs.builder()
            .displayName("string")
            .microtenantId("string")
            .password("string")
            .username("string")
            .build())
        .build());
    
    microtenant_resource = zpa.Microtenant("microtenantResource",
        criteria_attribute="string",
        criteria_attribute_values=["string"],
        description="string",
        enabled=False,
        name="string",
        users=[zpa.MicrotenantUserArgs(
            display_name="string",
            microtenant_id="string",
            password="string",
            username="string",
        )])
    
    const microtenantResource = new zpa.Microtenant("microtenantResource", {
        criteriaAttribute: "string",
        criteriaAttributeValues: ["string"],
        description: "string",
        enabled: false,
        name: "string",
        users: [{
            displayName: "string",
            microtenantId: "string",
            password: "string",
            username: "string",
        }],
    });
    
    type: zpa:Microtenant
    properties:
        criteriaAttribute: string
        criteriaAttributeValues:
            - string
        description: string
        enabled: false
        name: string
        users:
            - displayName: string
              microtenantId: string
              password: string
              username: string
    

    Microtenant Resource Properties

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

    Inputs

    The Microtenant resource accepts the following input properties:

    CriteriaAttribute string
    • (Required) Type of authentication criteria for the microtenant
    CriteriaAttributeValues List<string>
    • (Required) The domain associated with the respective microtenant controller resource
    Description string
    Enabled bool
    Name string
    • (Required) Name of the microtenant controller.
    Users List<Zscaler.Zpa.Inputs.MicrotenantUser>
    CriteriaAttribute string
    • (Required) Type of authentication criteria for the microtenant
    CriteriaAttributeValues []string
    • (Required) The domain associated with the respective microtenant controller resource
    Description string
    Enabled bool
    Name string
    • (Required) Name of the microtenant controller.
    Users []MicrotenantUserArgs
    criteriaAttribute String
    • (Required) Type of authentication criteria for the microtenant
    criteriaAttributeValues List<String>
    • (Required) The domain associated with the respective microtenant controller resource
    description String
    enabled Boolean
    name String
    • (Required) Name of the microtenant controller.
    users List<MicrotenantUser>
    criteriaAttribute string
    • (Required) Type of authentication criteria for the microtenant
    criteriaAttributeValues string[]
    • (Required) The domain associated with the respective microtenant controller resource
    description string
    enabled boolean
    name string
    • (Required) Name of the microtenant controller.
    users MicrotenantUser[]
    criteria_attribute str
    • (Required) Type of authentication criteria for the microtenant
    criteria_attribute_values Sequence[str]
    • (Required) The domain associated with the respective microtenant controller resource
    description str
    enabled bool
    name str
    • (Required) Name of the microtenant controller.
    users Sequence[MicrotenantUserArgs]
    criteriaAttribute String
    • (Required) Type of authentication criteria for the microtenant
    criteriaAttributeValues List<String>
    • (Required) The domain associated with the respective microtenant controller resource
    description String
    enabled Boolean
    name String
    • (Required) Name of the microtenant controller.
    users List<Property Map>

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Microtenant 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 Microtenant Resource

    Get an existing Microtenant 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?: MicrotenantState, opts?: CustomResourceOptions): Microtenant
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            criteria_attribute: Optional[str] = None,
            criteria_attribute_values: Optional[Sequence[str]] = None,
            description: Optional[str] = None,
            enabled: Optional[bool] = None,
            name: Optional[str] = None,
            users: Optional[Sequence[MicrotenantUserArgs]] = None) -> Microtenant
    func GetMicrotenant(ctx *Context, name string, id IDInput, state *MicrotenantState, opts ...ResourceOption) (*Microtenant, error)
    public static Microtenant Get(string name, Input<string> id, MicrotenantState? state, CustomResourceOptions? opts = null)
    public static Microtenant get(String name, Output<String> id, MicrotenantState 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:
    CriteriaAttribute string
    • (Required) Type of authentication criteria for the microtenant
    CriteriaAttributeValues List<string>
    • (Required) The domain associated with the respective microtenant controller resource
    Description string
    Enabled bool
    Name string
    • (Required) Name of the microtenant controller.
    Users List<Zscaler.Zpa.Inputs.MicrotenantUser>
    CriteriaAttribute string
    • (Required) Type of authentication criteria for the microtenant
    CriteriaAttributeValues []string
    • (Required) The domain associated with the respective microtenant controller resource
    Description string
    Enabled bool
    Name string
    • (Required) Name of the microtenant controller.
    Users []MicrotenantUserArgs
    criteriaAttribute String
    • (Required) Type of authentication criteria for the microtenant
    criteriaAttributeValues List<String>
    • (Required) The domain associated with the respective microtenant controller resource
    description String
    enabled Boolean
    name String
    • (Required) Name of the microtenant controller.
    users List<MicrotenantUser>
    criteriaAttribute string
    • (Required) Type of authentication criteria for the microtenant
    criteriaAttributeValues string[]
    • (Required) The domain associated with the respective microtenant controller resource
    description string
    enabled boolean
    name string
    • (Required) Name of the microtenant controller.
    users MicrotenantUser[]
    criteria_attribute str
    • (Required) Type of authentication criteria for the microtenant
    criteria_attribute_values Sequence[str]
    • (Required) The domain associated with the respective microtenant controller resource
    description str
    enabled bool
    name str
    • (Required) Name of the microtenant controller.
    users Sequence[MicrotenantUserArgs]
    criteriaAttribute String
    • (Required) Type of authentication criteria for the microtenant
    criteriaAttributeValues List<String>
    • (Required) The domain associated with the respective microtenant controller resource
    description String
    enabled Boolean
    name String
    • (Required) Name of the microtenant controller.
    users List<Property Map>

    Supporting Types

    MicrotenantUser, MicrotenantUserArgs

    DisplayName string
    MicrotenantId string
    Password string
    Username string
    DisplayName string
    MicrotenantId string
    Password string
    Username string
    displayName String
    microtenantId String
    password String
    username String
    displayName string
    microtenantId string
    password string
    username string
    displayName String
    microtenantId String
    password String
    username String

    Import

    Zscaler offers a dedicated tool called Zscaler-Terraformer to allow the automated import of ZPA configurations into Terraform-compliant HashiCorp Configuration Language.

    Visit

    microtenant_controller can be imported by using <MICROTENANT ID> or <MICROTENANT NAME> as the import ID.

    For example:

    $ pulumi import zpa:index/microtenant:Microtenant example <microtenant_id>
    

    or

    $ pulumi import zpa:index/microtenant:Microtenant example <microtenant_name>
    

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

    Package Details

    Repository
    zpa zscaler/pulumi-zpa
    License
    MIT
    Notes
    This Pulumi package is based on the zpa Terraform Provider.
    zpa logo
    Zscaler Private Access v0.0.11 published on Saturday, May 4, 2024 by Zscaler