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 = 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
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:
- User
Name string - Username
- Access
Token stringType - Access token type, supported values: ACCESSTOKENTYPEBEARER, ACCESSTOKENTYPEJWT
- Description string
- Description of the user
- Name string
- Name of the machine user
- Org
Id string - ID of the organization
- With
Secret bool - Generate machine secret, only applicable if creation or change from false
- User
Name string - Username
- Access
Token stringType - Access token type, supported values: ACCESSTOKENTYPEBEARER, ACCESSTOKENTYPEJWT
- Description string
- Description of the user
- Name string
- Name of the machine user
- Org
Id string - ID of the organization
- With
Secret bool - Generate machine secret, only applicable if creation or change from false
- user
Name String - Username
- access
Token StringType - Access token type, supported values: ACCESSTOKENTYPEBEARER, ACCESSTOKENTYPEJWT
- description String
- Description of the user
- name String
- Name of the machine user
- org
Id String - ID of the organization
- with
Secret Boolean - Generate machine secret, only applicable if creation or change from false
- user
Name string - Username
- access
Token stringType - Access token type, supported values: ACCESSTOKENTYPEBEARER, ACCESSTOKENTYPEJWT
- description string
- Description of the user
- name string
- Name of the machine user
- org
Id string - ID of the organization
- with
Secret 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
- user
Name String - Username
- access
Token StringType - Access token type, supported values: ACCESSTOKENTYPEBEARER, ACCESSTOKENTYPEJWT
- description String
- Description of the user
- name String
- Name of the machine user
- org
Id String - ID of the organization
- with
Secret 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:
- Client
Id string - Value of the client ID if withSecret is true
- Client
Secret string - Value of the client secret if withSecret is true
- Id string
- The provider-assigned unique ID for this managed resource.
- Login
Names List<string> - Loginnames
- Preferred
Login stringName - Preferred login name
- State string
- State of the user
- Client
Id string - Value of the client ID if withSecret is true
- Client
Secret string - Value of the client secret if withSecret is true
- Id string
- The provider-assigned unique ID for this managed resource.
- Login
Names []string - Loginnames
- Preferred
Login stringName - Preferred login name
- State string
- State of the user
- client
Id String - Value of the client ID if withSecret is true
- client
Secret String - Value of the client secret if withSecret is true
- id String
- The provider-assigned unique ID for this managed resource.
- login
Names List<String> - Loginnames
- preferred
Login StringName - Preferred login name
- state String
- State of the user
- client
Id string - Value of the client ID if withSecret is true
- client
Secret string - Value of the client secret if withSecret is true
- id string
- The provider-assigned unique ID for this managed resource.
- login
Names string[] - Loginnames
- preferred
Login 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
- client
Id String - Value of the client ID if withSecret is true
- client
Secret String - Value of the client secret if withSecret is true
- id String
- The provider-assigned unique ID for this managed resource.
- login
Names List<String> - Loginnames
- preferred
Login 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) -> 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.
- Access
Token stringType - Access token type, supported values: ACCESSTOKENTYPEBEARER, ACCESSTOKENTYPEJWT
- Client
Id string - Value of the client ID if withSecret is true
- Client
Secret string - Value of the client secret if withSecret is true
- Description string
- Description of the user
- Login
Names List<string> - Loginnames
- Name string
- Name of the machine user
- Org
Id string - ID of the organization
- Preferred
Login stringName - Preferred login name
- State string
- State of the user
- User
Name string - Username
- With
Secret bool - Generate machine secret, only applicable if creation or change from false
- Access
Token stringType - Access token type, supported values: ACCESSTOKENTYPEBEARER, ACCESSTOKENTYPEJWT
- Client
Id string - Value of the client ID if withSecret is true
- Client
Secret string - Value of the client secret if withSecret is true
- Description string
- Description of the user
- Login
Names []string - Loginnames
- Name string
- Name of the machine user
- Org
Id string - ID of the organization
- Preferred
Login stringName - Preferred login name
- State string
- State of the user
- User
Name string - Username
- With
Secret bool - Generate machine secret, only applicable if creation or change from false
- access
Token StringType - Access token type, supported values: ACCESSTOKENTYPEBEARER, ACCESSTOKENTYPEJWT
- client
Id String - Value of the client ID if withSecret is true
- client
Secret String - Value of the client secret if withSecret is true
- description String
- Description of the user
- login
Names List<String> - Loginnames
- name String
- Name of the machine user
- org
Id String - ID of the organization
- preferred
Login StringName - Preferred login name
- state String
- State of the user
- user
Name String - Username
- with
Secret Boolean - Generate machine secret, only applicable if creation or change from false
- access
Token stringType - Access token type, supported values: ACCESSTOKENTYPEBEARER, ACCESSTOKENTYPEJWT
- client
Id string - Value of the client ID if withSecret is true
- client
Secret string - Value of the client secret if withSecret is true
- description string
- Description of the user
- login
Names string[] - Loginnames
- name string
- Name of the machine user
- org
Id string - ID of the organization
- preferred
Login stringName - Preferred login name
- state string
- State of the user
- user
Name string - Username
- with
Secret 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
- access
Token StringType - Access token type, supported values: ACCESSTOKENTYPEBEARER, ACCESSTOKENTYPEJWT
- client
Id String - Value of the client ID if withSecret is true
- client
Secret String - Value of the client secret if withSecret is true
- description String
- Description of the user
- login
Names List<String> - Loginnames
- name String
- Name of the machine user
- org
Id String - ID of the organization
- preferred
Login StringName - Preferred login name
- state String
- State of the user
- user
Name String - Username
- with
Secret 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.