1. Packages
  2. Lxd Provider
  3. API Docs
  4. AuthIdentity
Viewing docs for lxd 2.7.0
published on Friday, Feb 27, 2026 by terraform-lxd
lxd logo
Viewing docs for lxd 2.7.0
published on Friday, Feb 27, 2026 by terraform-lxd

    Create AuthIdentity Resource

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

    Constructor syntax

    new AuthIdentity(name: string, args: AuthIdentityArgs, opts?: CustomResourceOptions);
    @overload
    def AuthIdentity(resource_name: str,
                     args: AuthIdentityArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def AuthIdentity(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     auth_method: Optional[str] = None,
                     groups: Optional[Sequence[str]] = None,
                     name: Optional[str] = None,
                     remote: Optional[str] = None,
                     tls_certificate: Optional[str] = None)
    func NewAuthIdentity(ctx *Context, name string, args AuthIdentityArgs, opts ...ResourceOption) (*AuthIdentity, error)
    public AuthIdentity(string name, AuthIdentityArgs args, CustomResourceOptions? opts = null)
    public AuthIdentity(String name, AuthIdentityArgs args)
    public AuthIdentity(String name, AuthIdentityArgs args, CustomResourceOptions options)
    
    type: lxd:AuthIdentity
    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 AuthIdentityArgs
    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 AuthIdentityArgs
    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 AuthIdentityArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AuthIdentityArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AuthIdentityArgs
    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 authIdentityResource = new Lxd.AuthIdentity("authIdentityResource", new()
    {
        AuthMethod = "string",
        Groups = new[]
        {
            "string",
        },
        Name = "string",
        Remote = "string",
        TlsCertificate = "string",
    });
    
    example, err := lxd.NewAuthIdentity(ctx, "authIdentityResource", &lxd.AuthIdentityArgs{
    	AuthMethod: pulumi.String("string"),
    	Groups: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Name:           pulumi.String("string"),
    	Remote:         pulumi.String("string"),
    	TlsCertificate: pulumi.String("string"),
    })
    
    var authIdentityResource = new AuthIdentity("authIdentityResource", AuthIdentityArgs.builder()
        .authMethod("string")
        .groups("string")
        .name("string")
        .remote("string")
        .tlsCertificate("string")
        .build());
    
    auth_identity_resource = lxd.AuthIdentity("authIdentityResource",
        auth_method="string",
        groups=["string"],
        name="string",
        remote="string",
        tls_certificate="string")
    
    const authIdentityResource = new lxd.AuthIdentity("authIdentityResource", {
        authMethod: "string",
        groups: ["string"],
        name: "string",
        remote: "string",
        tlsCertificate: "string",
    });
    
    type: lxd:AuthIdentity
    properties:
        authMethod: string
        groups:
            - string
        name: string
        remote: string
        tlsCertificate: string
    

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

    AuthMethod string
    Required - Authentication method, can be either tls or bearer.
    Groups List<string>
    Optional - List of group names to add this identity to.
    Name string
    Required - Name of the identity.
    Remote string
    Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
    TlsCertificate string
    Optional - PEM encoded x509 certificate. Must be set when authentication method is tls.
    AuthMethod string
    Required - Authentication method, can be either tls or bearer.
    Groups []string
    Optional - List of group names to add this identity to.
    Name string
    Required - Name of the identity.
    Remote string
    Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
    TlsCertificate string
    Optional - PEM encoded x509 certificate. Must be set when authentication method is tls.
    authMethod String
    Required - Authentication method, can be either tls or bearer.
    groups List<String>
    Optional - List of group names to add this identity to.
    name String
    Required - Name of the identity.
    remote String
    Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
    tlsCertificate String
    Optional - PEM encoded x509 certificate. Must be set when authentication method is tls.
    authMethod string
    Required - Authentication method, can be either tls or bearer.
    groups string[]
    Optional - List of group names to add this identity to.
    name string
    Required - Name of the identity.
    remote string
    Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
    tlsCertificate string
    Optional - PEM encoded x509 certificate. Must be set when authentication method is tls.
    auth_method str
    Required - Authentication method, can be either tls or bearer.
    groups Sequence[str]
    Optional - List of group names to add this identity to.
    name str
    Required - Name of the identity.
    remote str
    Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
    tls_certificate str
    Optional - PEM encoded x509 certificate. Must be set when authentication method is tls.
    authMethod String
    Required - Authentication method, can be either tls or bearer.
    groups List<String>
    Optional - List of group names to add this identity to.
    name String
    Required - Name of the identity.
    remote String
    Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
    tlsCertificate String
    Optional - PEM encoded x509 certificate. Must be set when authentication method is tls.

    Outputs

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

    Get an existing AuthIdentity 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?: AuthIdentityState, opts?: CustomResourceOptions): AuthIdentity
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            auth_method: Optional[str] = None,
            groups: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            remote: Optional[str] = None,
            tls_certificate: Optional[str] = None) -> AuthIdentity
    func GetAuthIdentity(ctx *Context, name string, id IDInput, state *AuthIdentityState, opts ...ResourceOption) (*AuthIdentity, error)
    public static AuthIdentity Get(string name, Input<string> id, AuthIdentityState? state, CustomResourceOptions? opts = null)
    public static AuthIdentity get(String name, Output<String> id, AuthIdentityState state, CustomResourceOptions options)
    resources:  _:    type: lxd:AuthIdentity    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.
    The following state arguments are supported:
    AuthMethod string
    Required - Authentication method, can be either tls or bearer.
    Groups List<string>
    Optional - List of group names to add this identity to.
    Name string
    Required - Name of the identity.
    Remote string
    Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
    TlsCertificate string
    Optional - PEM encoded x509 certificate. Must be set when authentication method is tls.
    AuthMethod string
    Required - Authentication method, can be either tls or bearer.
    Groups []string
    Optional - List of group names to add this identity to.
    Name string
    Required - Name of the identity.
    Remote string
    Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
    TlsCertificate string
    Optional - PEM encoded x509 certificate. Must be set when authentication method is tls.
    authMethod String
    Required - Authentication method, can be either tls or bearer.
    groups List<String>
    Optional - List of group names to add this identity to.
    name String
    Required - Name of the identity.
    remote String
    Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
    tlsCertificate String
    Optional - PEM encoded x509 certificate. Must be set when authentication method is tls.
    authMethod string
    Required - Authentication method, can be either tls or bearer.
    groups string[]
    Optional - List of group names to add this identity to.
    name string
    Required - Name of the identity.
    remote string
    Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
    tlsCertificate string
    Optional - PEM encoded x509 certificate. Must be set when authentication method is tls.
    auth_method str
    Required - Authentication method, can be either tls or bearer.
    groups Sequence[str]
    Optional - List of group names to add this identity to.
    name str
    Required - Name of the identity.
    remote str
    Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
    tls_certificate str
    Optional - PEM encoded x509 certificate. Must be set when authentication method is tls.
    authMethod String
    Required - Authentication method, can be either tls or bearer.
    groups List<String>
    Optional - List of group names to add this identity to.
    name String
    Required - Name of the identity.
    remote String
    Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
    tlsCertificate String
    Optional - PEM encoded x509 certificate. Must be set when authentication method is tls.

    Package Details

    Repository
    lxd terraform-lxd/terraform-provider-lxd
    License
    Notes
    This Pulumi package is based on the lxd Terraform Provider.
    lxd logo
    Viewing docs for lxd 2.7.0
    published on Friday, Feb 27, 2026 by terraform-lxd
      Try Pulumi Cloud free. Your team will thank you.