zitadel.MachineUser
Explore with Pulumi AI
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 = defaultZitadelOrg.Id,
        UserName = "machine@example.com",
        Name = "name",
        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(defaultZitadelOrg.Id),
			UserName:    pulumi.String("machine@example.com"),
			Name:        pulumi.String("name"),
			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(defaultZitadelOrg.id())
            .userName("machine@example.com")
            .name("name")
            .description("a machine user")
            .withSecret(false)
            .build());
    }
}
import * as pulumi from "@pulumi/pulumi";
import * as zitadel from "@pulumiverse/zitadel";
const _default = new zitadel.MachineUser("default", {
    orgId: defaultZitadelOrg.id,
    userName: "machine@example.com",
    name: "name",
    description: "a machine user",
    withSecret: false,
});
import pulumi
import pulumiverse_zitadel as zitadel
default = zitadel.MachineUser("default",
    org_id=default_zitadel_org["id"],
    user_name="machine@example.com",
    name="name",
    description="a machine user",
    with_secret=False)
resources:
  default:
    type: zitadel:MachineUser
    properties:
      orgId: ${defaultZitadelOrg.id}
      userName: machine@example.com
      name: name
      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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The MachineUser resource accepts the following input properties:
- UserName string
- Username
- AccessToken stringType 
- 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
- AccessToken stringType 
- 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
- accessToken StringType 
- 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
- accessToken stringType 
- 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_ strtype 
- 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
- accessToken StringType 
- 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
- PreferredLogin stringName 
- 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
- PreferredLogin stringName 
- 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
- preferredLogin StringName 
- 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
- preferredLogin stringName 
- 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_ strname 
- 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
- preferredLogin StringName 
- 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) -> MachineUserfunc 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)resources:  _:    type: zitadel:MachineUser    get:      id: ${id}- 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.
- AccessToken stringType 
- 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
- PreferredLogin stringName 
- 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
- AccessToken stringType 
- 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
- PreferredLogin stringName 
- 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
- accessToken StringType 
- 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
- preferredLogin StringName 
- 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
- accessToken stringType 
- 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
- preferredLogin stringName 
- 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_ strtype 
- 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_ strname 
- 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
- accessToken StringType 
- 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
- preferredLogin StringName 
- 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
bash 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 zitadelTerraform Provider.