zitadel.MachineKey
Resource representing a machine key
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Zitadel = Pulumiverse.Zitadel;
return await Deployment.RunAsync(() => 
{
    var @default = new Zitadel.MachineKey("default", new()
    {
        OrgId = defaultZitadelOrg.Id,
        UserId = defaultZitadelMachineUser.Id,
        KeyType = "KEY_TYPE_JSON",
        ExpirationDate = "2519-04-01T08:45:00Z",
    });
});
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.NewMachineKey(ctx, "default", &zitadel.MachineKeyArgs{
			OrgId:          pulumi.Any(defaultZitadelOrg.Id),
			UserId:         pulumi.Any(defaultZitadelMachineUser.Id),
			KeyType:        pulumi.String("KEY_TYPE_JSON"),
			ExpirationDate: pulumi.String("2519-04-01T08:45:00Z"),
		})
		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.MachineKey;
import com.pulumi.zitadel.MachineKeyArgs;
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 MachineKey("default", MachineKeyArgs.builder()        
            .orgId(defaultZitadelOrg.id())
            .userId(defaultZitadelMachineUser.id())
            .keyType("KEY_TYPE_JSON")
            .expirationDate("2519-04-01T08:45:00Z")
            .build());
    }
}
import * as pulumi from "@pulumi/pulumi";
import * as zitadel from "@pulumiverse/zitadel";
const _default = new zitadel.MachineKey("default", {
    orgId: defaultZitadelOrg.id,
    userId: defaultZitadelMachineUser.id,
    keyType: "KEY_TYPE_JSON",
    expirationDate: "2519-04-01T08:45:00Z",
});
import pulumi
import pulumiverse_zitadel as zitadel
default = zitadel.MachineKey("default",
    org_id=default_zitadel_org["id"],
    user_id=default_zitadel_machine_user["id"],
    key_type="KEY_TYPE_JSON",
    expiration_date="2519-04-01T08:45:00Z")
resources:
  default:
    type: zitadel:MachineKey
    properties:
      orgId: ${defaultZitadelOrg.id}
      userId: ${defaultZitadelMachineUser.id}
      keyType: KEY_TYPE_JSON
      expirationDate: 2519-04-01T08:45:00Z
Create MachineKey Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new MachineKey(name: string, args: MachineKeyArgs, opts?: CustomResourceOptions);@overload
def MachineKey(resource_name: str,
               args: MachineKeyArgs,
               opts: Optional[ResourceOptions] = None)
@overload
def MachineKey(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               key_type: Optional[str] = None,
               user_id: Optional[str] = None,
               expiration_date: Optional[str] = None,
               org_id: Optional[str] = None)func NewMachineKey(ctx *Context, name string, args MachineKeyArgs, opts ...ResourceOption) (*MachineKey, error)public MachineKey(string name, MachineKeyArgs args, CustomResourceOptions? opts = null)
public MachineKey(String name, MachineKeyArgs args)
public MachineKey(String name, MachineKeyArgs args, CustomResourceOptions options)
type: zitadel:MachineKey
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 MachineKeyArgs
- 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 MachineKeyArgs
- 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 MachineKeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MachineKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MachineKeyArgs
- 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 machineKeyResource = new Zitadel.MachineKey("machineKeyResource", new()
{
    KeyType = "string",
    UserId = "string",
    ExpirationDate = "string",
    OrgId = "string",
});
example, err := zitadel.NewMachineKey(ctx, "machineKeyResource", &zitadel.MachineKeyArgs{
	KeyType:        pulumi.String("string"),
	UserId:         pulumi.String("string"),
	ExpirationDate: pulumi.String("string"),
	OrgId:          pulumi.String("string"),
})
var machineKeyResource = new MachineKey("machineKeyResource", MachineKeyArgs.builder()
    .keyType("string")
    .userId("string")
    .expirationDate("string")
    .orgId("string")
    .build());
machine_key_resource = zitadel.MachineKey("machineKeyResource",
    key_type="string",
    user_id="string",
    expiration_date="string",
    org_id="string")
const machineKeyResource = new zitadel.MachineKey("machineKeyResource", {
    keyType: "string",
    userId: "string",
    expirationDate: "string",
    orgId: "string",
});
type: zitadel:MachineKey
properties:
    expirationDate: string
    keyType: string
    orgId: string
    userId: string
MachineKey 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 MachineKey resource accepts the following input properties:
- KeyType string
- Type of the machine key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
- UserId string
- ID of the user
- ExpirationDate string
- Expiration date of the machine key in the RFC3339 format
- OrgId string
- ID of the organization
- KeyType string
- Type of the machine key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
- UserId string
- ID of the user
- ExpirationDate string
- Expiration date of the machine key in the RFC3339 format
- OrgId string
- ID of the organization
- keyType String
- Type of the machine key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
- userId String
- ID of the user
- expirationDate String
- Expiration date of the machine key in the RFC3339 format
- orgId String
- ID of the organization
- keyType string
- Type of the machine key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
- userId string
- ID of the user
- expirationDate string
- Expiration date of the machine key in the RFC3339 format
- orgId string
- ID of the organization
- key_type str
- Type of the machine key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
- user_id str
- ID of the user
- expiration_date str
- Expiration date of the machine key in the RFC3339 format
- org_id str
- ID of the organization
- keyType String
- Type of the machine key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
- userId String
- ID of the user
- expirationDate String
- Expiration date of the machine key in the RFC3339 format
- orgId String
- ID of the organization
Outputs
All input properties are implicitly available as output properties. Additionally, the MachineKey resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- KeyDetails string
- Value of the machine key
- Id string
- The provider-assigned unique ID for this managed resource.
- KeyDetails string
- Value of the machine key
- id String
- The provider-assigned unique ID for this managed resource.
- keyDetails String
- Value of the machine key
- id string
- The provider-assigned unique ID for this managed resource.
- keyDetails string
- Value of the machine key
- id str
- The provider-assigned unique ID for this managed resource.
- key_details str
- Value of the machine key
- id String
- The provider-assigned unique ID for this managed resource.
- keyDetails String
- Value of the machine key
Look up Existing MachineKey Resource
Get an existing MachineKey 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?: MachineKeyState, opts?: CustomResourceOptions): MachineKey@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        expiration_date: Optional[str] = None,
        key_details: Optional[str] = None,
        key_type: Optional[str] = None,
        org_id: Optional[str] = None,
        user_id: Optional[str] = None) -> MachineKeyfunc GetMachineKey(ctx *Context, name string, id IDInput, state *MachineKeyState, opts ...ResourceOption) (*MachineKey, error)public static MachineKey Get(string name, Input<string> id, MachineKeyState? state, CustomResourceOptions? opts = null)public static MachineKey get(String name, Output<String> id, MachineKeyState state, CustomResourceOptions options)resources:  _:    type: zitadel:MachineKey    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.
- ExpirationDate string
- Expiration date of the machine key in the RFC3339 format
- KeyDetails string
- Value of the machine key
- KeyType string
- Type of the machine key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
- OrgId string
- ID of the organization
- UserId string
- ID of the user
- ExpirationDate string
- Expiration date of the machine key in the RFC3339 format
- KeyDetails string
- Value of the machine key
- KeyType string
- Type of the machine key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
- OrgId string
- ID of the organization
- UserId string
- ID of the user
- expirationDate String
- Expiration date of the machine key in the RFC3339 format
- keyDetails String
- Value of the machine key
- keyType String
- Type of the machine key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
- orgId String
- ID of the organization
- userId String
- ID of the user
- expirationDate string
- Expiration date of the machine key in the RFC3339 format
- keyDetails string
- Value of the machine key
- keyType string
- Type of the machine key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
- orgId string
- ID of the organization
- userId string
- ID of the user
- expiration_date str
- Expiration date of the machine key in the RFC3339 format
- key_details str
- Value of the machine key
- key_type str
- Type of the machine key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
- org_id str
- ID of the organization
- user_id str
- ID of the user
- expirationDate String
- Expiration date of the machine key in the RFC3339 format
- keyDetails String
- Value of the machine key
- keyType String
- Type of the machine key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
- orgId String
- ID of the organization
- userId String
- ID of the user
Import
bash The resource can be imported using the ID format <id:user_id[:org_id][:key_details]>, e.g.
 $ pulumi import zitadel:index/machineKey:MachineKey imported '123456789012345678:123456789012345678:123456789012345678:{"type":"serviceaccount","keyId":"123456789012345678","key":"-----BEGIN RSA PRIVATE KEY-----\nMIIEpQ...-----END RSA PRIVATE KEY-----\n","userId":"123456789012345678"}'
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.
