1. Packages
  2. Zitadel
  3. API Docs
  4. ApplicationKey
zitadel v0.1.8 published on Thursday, May 30, 2024 by pulumiverse

zitadel.ApplicationKey

Explore with Pulumi AI

zitadel logo
zitadel v0.1.8 published on Thursday, May 30, 2024 by pulumiverse

    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 = data.Zitadel_org.Default.Id,
            ProjectId = data.Zitadel_project.Default.Id,
            AppId = data.Zitadel_application_api.Default.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.NewApplicationKey(ctx, "default", &zitadel.ApplicationKeyArgs{
    			OrgId:          pulumi.Any(data.Zitadel_org.Default.Id),
    			ProjectId:      pulumi.Any(data.Zitadel_project.Default.Id),
    			AppId:          pulumi.Any(data.Zitadel_application_api.Default.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.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(data.zitadel_org().default().id())
                .projectId(data.zitadel_project().default().id())
                .appId(data.zitadel_application_api().default().id())
                .keyType("KEY_TYPE_JSON")
                .expirationDate("2519-04-01T08:45:00Z")
                .build());
    
        }
    }
    
    import pulumi
    import pulumiverse_zitadel as zitadel
    
    default = zitadel.ApplicationKey("default",
        org_id=data["zitadel_org"]["default"]["id"],
        project_id=data["zitadel_project"]["default"]["id"],
        app_id=data["zitadel_application_api"]["default"]["id"],
        key_type="KEY_TYPE_JSON",
        expiration_date="2519-04-01T08:45:00Z")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as zitadel from "@pulumiverse/zitadel";
    
    const _default = new zitadel.ApplicationKey("default", {
        orgId: data.zitadel_org["default"].id,
        projectId: data.zitadel_project["default"].id,
        appId: data.zitadel_application_api["default"].id,
        keyType: "KEY_TYPE_JSON",
        expirationDate: "2519-04-01T08:45:00Z",
    });
    
    resources:
      default:
        type: zitadel:ApplicationKey
        properties:
          orgId: ${data.zitadel_org.default.id}
          projectId: ${data.zitadel_project.default.id}
          appId: ${data.zitadel_application_api.default.id}
          keyType: KEY_TYPE_JSON
          expirationDate: 2519-04-01T08:45:00Z
    

    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 string
    The unique name of the resource.
    args ApplicationKeyArgs
    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 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 string
    The unique name of the resource.
    args ApplicationKeyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ApplicationKeyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args 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",
    });
    
    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"),
    })
    
    var applicationKeyResource = new ApplicationKey("applicationKeyResource", ApplicationKeyArgs.builder()
        .appId("string")
        .expirationDate("string")
        .keyType("string")
        .projectId("string")
        .orgId("string")
        .build());
    
    application_key_resource = zitadel.ApplicationKey("applicationKeyResource",
        app_id="string",
        expiration_date="string",
        key_type="string",
        project_id="string",
        org_id="string")
    
    const applicationKeyResource = new zitadel.ApplicationKey("applicationKeyResource", {
        appId: "string",
        expirationDate: "string",
        keyType: "string",
        projectId: "string",
        orgId: "string",
    });
    
    type: zitadel:ApplicationKey
    properties:
        appId: string
        expirationDate: string
        keyType: string
        orgId: string
        projectId: string
    

    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

    The ApplicationKey resource accepts the following input properties:

    AppId string
    ID of the application
    ExpirationDate string
    Expiration date of the app key in the RFC3339 format
    KeyType string
    Type of the app key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
    ProjectId string
    ID of the project
    OrgId string
    ID of the organization
    AppId string
    ID of the application
    ExpirationDate string
    Expiration date of the app key in the RFC3339 format
    KeyType string
    Type of the app key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
    ProjectId string
    ID of the project
    OrgId string
    ID of the organization
    appId String
    ID of the application
    expirationDate String
    Expiration date of the app key in the RFC3339 format
    keyType String
    Type of the app key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
    projectId String
    ID of the project
    orgId String
    ID of the organization
    appId string
    ID of the application
    expirationDate string
    Expiration date of the app key in the RFC3339 format
    keyType string
    Type of the app key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
    projectId string
    ID of the project
    orgId string
    ID of the organization
    app_id str
    ID of the application
    expiration_date str
    Expiration date of the app key in the RFC3339 format
    key_type str
    Type of the app key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
    project_id str
    ID of the project
    org_id str
    ID of the organization
    appId String
    ID of the application
    expirationDate String
    Expiration date of the app key in the RFC3339 format
    keyType String
    Type of the app key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
    projectId String
    ID of the project
    orgId 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)
    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.
    The following state arguments are supported:
    AppId string
    ID of the application
    ExpirationDate string
    Expiration date of the app key in the RFC3339 format
    KeyDetails string
    Value of the app key
    KeyType string
    Type of the app key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
    OrgId string
    ID of the organization
    ProjectId string
    ID of the project
    AppId string
    ID of the application
    ExpirationDate string
    Expiration date of the app key in the RFC3339 format
    KeyDetails string
    Value of the app key
    KeyType string
    Type of the app key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
    OrgId string
    ID of the organization
    ProjectId string
    ID of the project
    appId String
    ID of the application
    expirationDate String
    Expiration date of the app key in the RFC3339 format
    keyDetails String
    Value of the app key
    keyType String
    Type of the app key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
    orgId String
    ID of the organization
    projectId String
    ID of the project
    appId string
    ID of the application
    expirationDate string
    Expiration date of the app key in the RFC3339 format
    keyDetails string
    Value of the app key
    keyType string
    Type of the app key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
    orgId string
    ID of the organization
    projectId string
    ID of the project
    app_id str
    ID of the application
    expiration_date str
    Expiration date of the app key in the RFC3339 format
    key_details str
    Value of the app key
    key_type str
    Type of the app key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
    org_id str
    ID of the organization
    project_id str
    ID of the project
    appId String
    ID of the application
    expirationDate String
    Expiration date of the app key in the RFC3339 format
    keyDetails String
    Value of the app key
    keyType String
    Type of the app key, supported values: KEYTYPEUNSPECIFIED, KEYTYPEJSON
    orgId String
    ID of the organization
    projectId String
    ID of the project

    Import

    terraform 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')"
    

    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.
    zitadel logo
    zitadel v0.1.8 published on Thursday, May 30, 2024 by pulumiverse