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

zitadel.MachineUser

Explore with Pulumi AI

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

    Resource representing a serviceaccount situated under an organization, which then can be authorized through memberships or direct grants on other resources.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Zitadel = Pulumiverse.Zitadel;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new Zitadel.MachineUser("default", new()
        {
            OrgId = data.Zitadel_org.Default.Id,
            UserName = "machine@example.com",
            Description = "a machine user",
            WithSecret = false,
        });
    
    });
    
    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.NewMachineUser(ctx, "default", &zitadel.MachineUserArgs{
    			OrgId:       pulumi.Any(data.Zitadel_org.Default.Id),
    			UserName:    pulumi.String("machine@example.com"),
    			Description: pulumi.String("a machine user"),
    			WithSecret:  pulumi.Bool(false),
    		})
    		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.MachineUser;
    import com.pulumi.zitadel.MachineUserArgs;
    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 MachineUser("default", MachineUserArgs.builder()        
                .orgId(data.zitadel_org().default().id())
                .userName("machine@example.com")
                .description("a machine user")
                .withSecret(false)
                .build());
    
        }
    }
    
    import pulumi
    import pulumiverse_zitadel as zitadel
    
    default = zitadel.MachineUser("default",
        org_id=data["zitadel_org"]["default"]["id"],
        user_name="machine@example.com",
        description="a machine user",
        with_secret=False)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as zitadel from "@pulumiverse/zitadel";
    
    const _default = new zitadel.MachineUser("default", {
        orgId: data.zitadel_org["default"].id,
        userName: "machine@example.com",
        description: "a machine user",
        withSecret: false,
    });
    
    resources:
      default:
        type: zitadel:MachineUser
        properties:
          orgId: ${data.zitadel_org.default.id}
          userName: machine@example.com
          description: a machine user
          withSecret: false
    

    Create MachineUser Resource

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

    Constructor syntax

    new MachineUser(name: string, args: MachineUserArgs, opts?: CustomResourceOptions);
    @overload
    def MachineUser(resource_name: str,
                    args: MachineUserArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def MachineUser(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    user_name: Optional[str] = None,
                    access_token_type: Optional[str] = None,
                    description: Optional[str] = None,
                    name: Optional[str] = None,
                    org_id: Optional[str] = None,
                    with_secret: Optional[bool] = None)
    func NewMachineUser(ctx *Context, name string, args MachineUserArgs, opts ...ResourceOption) (*MachineUser, error)
    public MachineUser(string name, MachineUserArgs args, CustomResourceOptions? opts = null)
    public MachineUser(String name, MachineUserArgs args)
    public MachineUser(String name, MachineUserArgs args, CustomResourceOptions options)
    
    type: zitadel:MachineUser
    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 MachineUserArgs
    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 MachineUserArgs
    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 MachineUserArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MachineUserArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MachineUserArgs
    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 machineUserResource = new Zitadel.MachineUser("machineUserResource", new()
    {
        UserName = "string",
        AccessTokenType = "string",
        Description = "string",
        Name = "string",
        OrgId = "string",
        WithSecret = false,
    });
    
    example, err := zitadel.NewMachineUser(ctx, "machineUserResource", &zitadel.MachineUserArgs{
    	UserName:        pulumi.String("string"),
    	AccessTokenType: pulumi.String("string"),
    	Description:     pulumi.String("string"),
    	Name:            pulumi.String("string"),
    	OrgId:           pulumi.String("string"),
    	WithSecret:      pulumi.Bool(false),
    })
    
    var machineUserResource = new MachineUser("machineUserResource", MachineUserArgs.builder()
        .userName("string")
        .accessTokenType("string")
        .description("string")
        .name("string")
        .orgId("string")
        .withSecret(false)
        .build());
    
    machine_user_resource = zitadel.MachineUser("machineUserResource",
        user_name="string",
        access_token_type="string",
        description="string",
        name="string",
        org_id="string",
        with_secret=False)
    
    const machineUserResource = new zitadel.MachineUser("machineUserResource", {
        userName: "string",
        accessTokenType: "string",
        description: "string",
        name: "string",
        orgId: "string",
        withSecret: false,
    });
    
    type: zitadel:MachineUser
    properties:
        accessTokenType: string
        description: string
        name: string
        orgId: string
        userName: string
        withSecret: false
    

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

    UserName string
    Username
    AccessTokenType string
    Access token type, supported values: ACCESSTOKENTYPEBEARER, ACCESSTOKENTYPEJWT
    Description string
    Description of the user
    Name string
    Name of the machine user
    OrgId string
    ID of the organization
    WithSecret bool
    Generate machine secret, only applicable if creation or change from false
    UserName string
    Username
    AccessTokenType string
    Access token type, supported values: ACCESSTOKENTYPEBEARER, ACCESSTOKENTYPEJWT
    Description string
    Description of the user
    Name string
    Name of the machine user
    OrgId string
    ID of the organization
    WithSecret bool
    Generate machine secret, only applicable if creation or change from false
    userName String
    Username
    accessTokenType String
    Access token type, supported values: ACCESSTOKENTYPEBEARER, ACCESSTOKENTYPEJWT
    description String
    Description of the user
    name String
    Name of the machine user
    orgId String
    ID of the organization
    withSecret Boolean
    Generate machine secret, only applicable if creation or change from false
    userName string
    Username
    accessTokenType string
    Access token type, supported values: ACCESSTOKENTYPEBEARER, ACCESSTOKENTYPEJWT
    description string
    Description of the user
    name string
    Name of the machine user
    orgId string
    ID of the organization
    withSecret boolean
    Generate machine secret, only applicable if creation or change from false
    user_name str
    Username
    access_token_type str
    Access token type, supported values: ACCESSTOKENTYPEBEARER, ACCESSTOKENTYPEJWT
    description str
    Description of the user
    name str
    Name of the machine user
    org_id str
    ID of the organization
    with_secret bool
    Generate machine secret, only applicable if creation or change from false
    userName String
    Username
    accessTokenType String
    Access token type, supported values: ACCESSTOKENTYPEBEARER, ACCESSTOKENTYPEJWT
    description String
    Description of the user
    name String
    Name of the machine user
    orgId String
    ID of the organization
    withSecret Boolean
    Generate machine secret, only applicable if creation or change from false

    Outputs

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

    ClientId string
    Value of the client ID if withSecret is true
    ClientSecret string
    Value of the client secret if withSecret is true
    Id string
    The provider-assigned unique ID for this managed resource.
    LoginNames List<string>
    Loginnames
    PreferredLoginName string
    Preferred login name
    State string
    State of the user
    ClientId string
    Value of the client ID if withSecret is true
    ClientSecret string
    Value of the client secret if withSecret is true
    Id string
    The provider-assigned unique ID for this managed resource.
    LoginNames []string
    Loginnames
    PreferredLoginName string
    Preferred login name
    State string
    State of the user
    clientId String
    Value of the client ID if withSecret is true
    clientSecret String
    Value of the client secret if withSecret is true
    id String
    The provider-assigned unique ID for this managed resource.
    loginNames List<String>
    Loginnames
    preferredLoginName String
    Preferred login name
    state String
    State of the user
    clientId string
    Value of the client ID if withSecret is true
    clientSecret string
    Value of the client secret if withSecret is true
    id string
    The provider-assigned unique ID for this managed resource.
    loginNames string[]
    Loginnames
    preferredLoginName string
    Preferred login name
    state string
    State of the user
    client_id str
    Value of the client ID if withSecret is true
    client_secret str
    Value of the client secret if withSecret is true
    id str
    The provider-assigned unique ID for this managed resource.
    login_names Sequence[str]
    Loginnames
    preferred_login_name str
    Preferred login name
    state str
    State of the user
    clientId String
    Value of the client ID if withSecret is true
    clientSecret String
    Value of the client secret if withSecret is true
    id String
    The provider-assigned unique ID for this managed resource.
    loginNames List<String>
    Loginnames
    preferredLoginName String
    Preferred login name
    state String
    State of the user

    Look up Existing MachineUser Resource

    Get an existing MachineUser 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?: MachineUserState, opts?: CustomResourceOptions): MachineUser
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            access_token_type: Optional[str] = None,
            client_id: Optional[str] = None,
            client_secret: Optional[str] = None,
            description: Optional[str] = None,
            login_names: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            org_id: Optional[str] = None,
            preferred_login_name: Optional[str] = None,
            state: Optional[str] = None,
            user_name: Optional[str] = None,
            with_secret: Optional[bool] = None) -> MachineUser
    func GetMachineUser(ctx *Context, name string, id IDInput, state *MachineUserState, opts ...ResourceOption) (*MachineUser, error)
    public static MachineUser Get(string name, Input<string> id, MachineUserState? state, CustomResourceOptions? opts = null)
    public static MachineUser get(String name, Output<String> id, MachineUserState 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:
    AccessTokenType string
    Access token type, supported values: ACCESSTOKENTYPEBEARER, ACCESSTOKENTYPEJWT
    ClientId string
    Value of the client ID if withSecret is true
    ClientSecret string
    Value of the client secret if withSecret is true
    Description string
    Description of the user
    LoginNames List<string>
    Loginnames
    Name string
    Name of the machine user
    OrgId string
    ID of the organization
    PreferredLoginName string
    Preferred login name
    State string
    State of the user
    UserName string
    Username
    WithSecret bool
    Generate machine secret, only applicable if creation or change from false
    AccessTokenType string
    Access token type, supported values: ACCESSTOKENTYPEBEARER, ACCESSTOKENTYPEJWT
    ClientId string
    Value of the client ID if withSecret is true
    ClientSecret string
    Value of the client secret if withSecret is true
    Description string
    Description of the user
    LoginNames []string
    Loginnames
    Name string
    Name of the machine user
    OrgId string
    ID of the organization
    PreferredLoginName string
    Preferred login name
    State string
    State of the user
    UserName string
    Username
    WithSecret bool
    Generate machine secret, only applicable if creation or change from false
    accessTokenType String
    Access token type, supported values: ACCESSTOKENTYPEBEARER, ACCESSTOKENTYPEJWT
    clientId String
    Value of the client ID if withSecret is true
    clientSecret String
    Value of the client secret if withSecret is true
    description String
    Description of the user
    loginNames List<String>
    Loginnames
    name String
    Name of the machine user
    orgId String
    ID of the organization
    preferredLoginName String
    Preferred login name
    state String
    State of the user
    userName String
    Username
    withSecret Boolean
    Generate machine secret, only applicable if creation or change from false
    accessTokenType string
    Access token type, supported values: ACCESSTOKENTYPEBEARER, ACCESSTOKENTYPEJWT
    clientId string
    Value of the client ID if withSecret is true
    clientSecret string
    Value of the client secret if withSecret is true
    description string
    Description of the user
    loginNames string[]
    Loginnames
    name string
    Name of the machine user
    orgId string
    ID of the organization
    preferredLoginName string
    Preferred login name
    state string
    State of the user
    userName string
    Username
    withSecret boolean
    Generate machine secret, only applicable if creation or change from false
    access_token_type str
    Access token type, supported values: ACCESSTOKENTYPEBEARER, ACCESSTOKENTYPEJWT
    client_id str
    Value of the client ID if withSecret is true
    client_secret str
    Value of the client secret if withSecret is true
    description str
    Description of the user
    login_names Sequence[str]
    Loginnames
    name str
    Name of the machine user
    org_id str
    ID of the organization
    preferred_login_name str
    Preferred login name
    state str
    State of the user
    user_name str
    Username
    with_secret bool
    Generate machine secret, only applicable if creation or change from false
    accessTokenType String
    Access token type, supported values: ACCESSTOKENTYPEBEARER, ACCESSTOKENTYPEJWT
    clientId String
    Value of the client ID if withSecret is true
    clientSecret String
    Value of the client secret if withSecret is true
    description String
    Description of the user
    loginNames List<String>
    Loginnames
    name String
    Name of the machine user
    orgId String
    ID of the organization
    preferredLoginName String
    Preferred login name
    state String
    State of the user
    userName String
    Username
    withSecret Boolean
    Generate machine secret, only applicable if creation or change from false

    Import

    terraform The resource can be imported using the ID format <id:has_secret[:org_id][:client_id][:client_secret]>, e.g.

     $ pulumi import zitadel:index/machineUser:MachineUser imported '123456789012345678:123456789012345678:true:my-machine-user:j76mh34CHVrGGoXPQOg80lch67FIxwc2qIXjBkZoB6oMbf31eGMkB6bvRyaPjR2t'
    

    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