1. Packages
  2. Zitadel
  3. API Docs
  4. ApplicationKey
zitadel v0.2.0 published on Monday, Mar 24, 2025 by pulumiverse

zitadel.ApplicationKey

Explore with Pulumi AI

Resource representing a app key

Example Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Zitadel = Pulumiverse.Zitadel;

return await Deployment.RunAsync(() => 
{
    var @default = new Zitadel.ApplicationKey("default", new()
    {
        OrgId = defaultZitadelOrg.Id,
        ProjectId = defaultZitadelProject.Id,
        AppId = defaultZitadelApplicationApi.Id,
        KeyType = "KEY_TYPE_JSON",
        ExpirationDate = "2519-04-01T08:45:00Z",
    });

});
Copy
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.NewApplicationKey(ctx, "default", &zitadel.ApplicationKeyArgs{
			OrgId:          pulumi.Any(defaultZitadelOrg.Id),
			ProjectId:      pulumi.Any(defaultZitadelProject.Id),
			AppId:          pulumi.Any(defaultZitadelApplicationApi.Id),
			KeyType:        pulumi.String("KEY_TYPE_JSON"),
			ExpirationDate: pulumi.String("2519-04-01T08:45:00Z"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.zitadel.ApplicationKey;
import com.pulumi.zitadel.ApplicationKeyArgs;
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 ApplicationKey("default", ApplicationKeyArgs.builder()        
            .orgId(defaultZitadelOrg.id())
            .projectId(defaultZitadelProject.id())
            .appId(defaultZitadelApplicationApi.id())
            .keyType("KEY_TYPE_JSON")
            .expirationDate("2519-04-01T08:45:00Z")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as zitadel from "@pulumiverse/zitadel";

const _default = new zitadel.ApplicationKey("default", {
    orgId: defaultZitadelOrg.id,
    projectId: defaultZitadelProject.id,
    appId: defaultZitadelApplicationApi.id,
    keyType: "KEY_TYPE_JSON",
    expirationDate: "2519-04-01T08:45:00Z",
});
Copy
import pulumi
import pulumiverse_zitadel as zitadel

default = zitadel.ApplicationKey("default",
    org_id=default_zitadel_org["id"],
    project_id=default_zitadel_project["id"],
    app_id=default_zitadel_application_api["id"],
    key_type="KEY_TYPE_JSON",
    expiration_date="2519-04-01T08:45:00Z")
Copy
resources:
  default:
    type: zitadel:ApplicationKey
    properties:
      orgId: ${defaultZitadelOrg.id}
      projectId: ${defaultZitadelProject.id}
      appId: ${defaultZitadelApplicationApi.id}
      keyType: KEY_TYPE_JSON
      expirationDate: 2519-04-01T08:45:00Z
Copy

Create ApplicationKey Resource

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

Constructor syntax

new ApplicationKey(name: string, args: ApplicationKeyArgs, opts?: CustomResourceOptions);
@overload
def ApplicationKey(resource_name: str,
                   args: ApplicationKeyArgs,
                   opts: Optional[ResourceOptions] = None)

@overload
def ApplicationKey(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   app_id: Optional[str] = None,
                   expiration_date: Optional[str] = None,
                   key_type: Optional[str] = None,
                   project_id: Optional[str] = None,
                   org_id: Optional[str] = None)
func NewApplicationKey(ctx *Context, name string, args ApplicationKeyArgs, opts ...ResourceOption) (*ApplicationKey, error)
public ApplicationKey(string name, ApplicationKeyArgs args, CustomResourceOptions? opts = null)
public ApplicationKey(String name, ApplicationKeyArgs args)
public ApplicationKey(String name, ApplicationKeyArgs args, CustomResourceOptions options)
type: zitadel:ApplicationKey
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ApplicationKeyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ApplicationKeyArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ApplicationKeyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ApplicationKeyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ApplicationKeyArgs
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 applicationKeyResource = new Zitadel.ApplicationKey("applicationKeyResource", new()
{
    AppId = "string",
    ExpirationDate = "string",
    KeyType = "string",
    ProjectId = "string",
    OrgId = "string",
});
Copy
example, err := zitadel.NewApplicationKey(ctx, "applicationKeyResource", &zitadel.ApplicationKeyArgs{
	AppId:          pulumi.String("string"),
	ExpirationDate: pulumi.String("string"),
	KeyType:        pulumi.String("string"),
	ProjectId:      pulumi.String("string"),
	OrgId:          pulumi.String("string"),
})
Copy
var applicationKeyResource = new ApplicationKey("applicationKeyResource", ApplicationKeyArgs.builder()
    .appId("string")
    .expirationDate("string")
    .keyType("string")
    .projectId("string")
    .orgId("string")
    .build());
Copy
application_key_resource = zitadel.ApplicationKey("applicationKeyResource",
    app_id="string",
    expiration_date="string",
    key_type="string",
    project_id="string",
    org_id="string")
Copy
const applicationKeyResource = new zitadel.ApplicationKey("applicationKeyResource", {
    appId: "string",
    expirationDate: "string",
    keyType: "string",
    projectId: "string",
    orgId: "string",
});
Copy
type: zitadel:ApplicationKey
properties:
    appId: string
    expirationDate: string
    keyType: string
    orgId: string
    projectId: string
Copy

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

AppId
This property is required.
Changes to this property will trigger replacement.
string
ID of the application
ExpirationDate
This property is required.
Changes to this property will trigger replacement.
string
Expiration date of the app key in the RFC3339 format
KeyType
This property is required.
Changes to this property will trigger replacement.
string
Type of the app key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
ProjectId
This property is required.
Changes to this property will trigger replacement.
string
ID of the project
OrgId Changes to this property will trigger replacement. string
ID of the organization
AppId
This property is required.
Changes to this property will trigger replacement.
string
ID of the application
ExpirationDate
This property is required.
Changes to this property will trigger replacement.
string
Expiration date of the app key in the RFC3339 format
KeyType
This property is required.
Changes to this property will trigger replacement.
string
Type of the app key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
ProjectId
This property is required.
Changes to this property will trigger replacement.
string
ID of the project
OrgId Changes to this property will trigger replacement. string
ID of the organization
appId
This property is required.
Changes to this property will trigger replacement.
String
ID of the application
expirationDate
This property is required.
Changes to this property will trigger replacement.
String
Expiration date of the app key in the RFC3339 format
keyType
This property is required.
Changes to this property will trigger replacement.
String
Type of the app key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
projectId
This property is required.
Changes to this property will trigger replacement.
String
ID of the project
orgId Changes to this property will trigger replacement. String
ID of the organization
appId
This property is required.
Changes to this property will trigger replacement.
string
ID of the application
expirationDate
This property is required.
Changes to this property will trigger replacement.
string
Expiration date of the app key in the RFC3339 format
keyType
This property is required.
Changes to this property will trigger replacement.
string
Type of the app key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
projectId
This property is required.
Changes to this property will trigger replacement.
string
ID of the project
orgId Changes to this property will trigger replacement. string
ID of the organization
app_id
This property is required.
Changes to this property will trigger replacement.
str
ID of the application
expiration_date
This property is required.
Changes to this property will trigger replacement.
str
Expiration date of the app key in the RFC3339 format
key_type
This property is required.
Changes to this property will trigger replacement.
str
Type of the app key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
project_id
This property is required.
Changes to this property will trigger replacement.
str
ID of the project
org_id Changes to this property will trigger replacement. str
ID of the organization
appId
This property is required.
Changes to this property will trigger replacement.
String
ID of the application
expirationDate
This property is required.
Changes to this property will trigger replacement.
String
Expiration date of the app key in the RFC3339 format
keyType
This property is required.
Changes to this property will trigger replacement.
String
Type of the app key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
projectId
This property is required.
Changes to this property will trigger replacement.
String
ID of the project
orgId Changes to this property will trigger replacement. String
ID of the organization

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
KeyDetails string
Value of the app key
Id string
The provider-assigned unique ID for this managed resource.
KeyDetails string
Value of the app key
id String
The provider-assigned unique ID for this managed resource.
keyDetails String
Value of the app key
id string
The provider-assigned unique ID for this managed resource.
keyDetails string
Value of the app key
id str
The provider-assigned unique ID for this managed resource.
key_details str
Value of the app key
id String
The provider-assigned unique ID for this managed resource.
keyDetails String
Value of the app key

Look up Existing ApplicationKey Resource

Get an existing ApplicationKey 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?: ApplicationKeyState, opts?: CustomResourceOptions): ApplicationKey
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        app_id: Optional[str] = None,
        expiration_date: Optional[str] = None,
        key_details: Optional[str] = None,
        key_type: Optional[str] = None,
        org_id: Optional[str] = None,
        project_id: Optional[str] = None) -> ApplicationKey
func GetApplicationKey(ctx *Context, name string, id IDInput, state *ApplicationKeyState, opts ...ResourceOption) (*ApplicationKey, error)
public static ApplicationKey Get(string name, Input<string> id, ApplicationKeyState? state, CustomResourceOptions? opts = null)
public static ApplicationKey get(String name, Output<String> id, ApplicationKeyState state, CustomResourceOptions options)
resources:  _:    type: zitadel:ApplicationKey    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
AppId Changes to this property will trigger replacement. string
ID of the application
ExpirationDate Changes to this property will trigger replacement. string
Expiration date of the app key in the RFC3339 format
KeyDetails string
Value of the app key
KeyType Changes to this property will trigger replacement. string
Type of the app key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
OrgId Changes to this property will trigger replacement. string
ID of the organization
ProjectId Changes to this property will trigger replacement. string
ID of the project
AppId Changes to this property will trigger replacement. string
ID of the application
ExpirationDate Changes to this property will trigger replacement. string
Expiration date of the app key in the RFC3339 format
KeyDetails string
Value of the app key
KeyType Changes to this property will trigger replacement. string
Type of the app key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
OrgId Changes to this property will trigger replacement. string
ID of the organization
ProjectId Changes to this property will trigger replacement. string
ID of the project
appId Changes to this property will trigger replacement. String
ID of the application
expirationDate Changes to this property will trigger replacement. String
Expiration date of the app key in the RFC3339 format
keyDetails String
Value of the app key
keyType Changes to this property will trigger replacement. String
Type of the app key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
orgId Changes to this property will trigger replacement. String
ID of the organization
projectId Changes to this property will trigger replacement. String
ID of the project
appId Changes to this property will trigger replacement. string
ID of the application
expirationDate Changes to this property will trigger replacement. string
Expiration date of the app key in the RFC3339 format
keyDetails string
Value of the app key
keyType Changes to this property will trigger replacement. string
Type of the app key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
orgId Changes to this property will trigger replacement. string
ID of the organization
projectId Changes to this property will trigger replacement. string
ID of the project
app_id Changes to this property will trigger replacement. str
ID of the application
expiration_date Changes to this property will trigger replacement. str
Expiration date of the app key in the RFC3339 format
key_details str
Value of the app key
key_type Changes to this property will trigger replacement. str
Type of the app key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
org_id Changes to this property will trigger replacement. str
ID of the organization
project_id Changes to this property will trigger replacement. str
ID of the project
appId Changes to this property will trigger replacement. String
ID of the application
expirationDate Changes to this property will trigger replacement. String
Expiration date of the app key in the RFC3339 format
keyDetails String
Value of the app key
keyType Changes to this property will trigger replacement. String
Type of the app key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
orgId Changes to this property will trigger replacement. String
ID of the organization
projectId Changes to this property will trigger replacement. String
ID of the project

Import

bash The resource can be imported using the ID format <id:project_id:app_id[:org_id][:key_details]>. You can use SEMICOLON to escape :, e.g.

 $ pulumi import zitadel:index/applicationKey:ApplicationKey imported "123456789012345678:123456789012345678:123456789012345678:123456789012345678:$(cat ~/Downloads/123456789012345678.json | sed -e 's/:/__SEMICOLON__/g')"
Copy

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.