1. Packages
  2. Azure Classic
  3. API Docs
  4. appconfiguration
  5. ConfigurationKey

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
azure logo

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Manages an Azure App Configuration Key.

    Note: App Configuration Keys are provisioned using a Data Plane API which requires the role App Configuration Data Owner on either the App Configuration or a parent scope (such as the Resource Group/Subscription). More information can be found in the Azure Documentation for App Configuration.

    Example Usage

    Kv Type

    using Pulumi;
    using Azure = Pulumi.Azure;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var rg = new Azure.Core.ResourceGroup("rg", new Azure.Core.ResourceGroupArgs
            {
                Location = "West Europe",
            });
            var appconf = new Azure.AppConfiguration.ConfigurationStore("appconf", new Azure.AppConfiguration.ConfigurationStoreArgs
            {
                ResourceGroupName = rg.Name,
                Location = rg.Location,
            });
            var current = Output.Create(Azure.Core.GetClientConfig.InvokeAsync());
            var appconfDataowner = new Azure.Authorization.Assignment("appconfDataowner", new Azure.Authorization.AssignmentArgs
            {
                Scope = appconf.Id,
                RoleDefinitionName = "App Configuration Data Owner",
                PrincipalId = current.Apply(current => current.ObjectId),
            });
            var test = new Azure.AppConfiguration.ConfigurationKey("test", new Azure.AppConfiguration.ConfigurationKeyArgs
            {
                ConfigurationStoreId = appconf.Id,
                Key = "appConfKey1",
                Label = "somelabel",
                Value = "a test",
            }, new CustomResourceOptions
            {
                DependsOn = 
                {
                    appconfDataowner,
                },
            });
        }
    
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/appconfiguration"
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/authorization"
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		rg, err := core.NewResourceGroup(ctx, "rg", &core.ResourceGroupArgs{
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		appconf, err := appconfiguration.NewConfigurationStore(ctx, "appconf", &appconfiguration.ConfigurationStoreArgs{
    			ResourceGroupName: rg.Name,
    			Location:          rg.Location,
    		})
    		if err != nil {
    			return err
    		}
    		current, err := core.GetClientConfig(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		appconfDataowner, err := authorization.NewAssignment(ctx, "appconfDataowner", &authorization.AssignmentArgs{
    			Scope:              appconf.ID(),
    			RoleDefinitionName: pulumi.String("App Configuration Data Owner"),
    			PrincipalId:        pulumi.String(current.ObjectId),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = appconfiguration.NewConfigurationKey(ctx, "test", &appconfiguration.ConfigurationKeyArgs{
    			ConfigurationStoreId: appconf.ID(),
    			Key:                  pulumi.String("appConfKey1"),
    			Label:                pulumi.String("somelabel"),
    			Value:                pulumi.String("a test"),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			appconfDataowner,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Example coming soon!

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const rg = new azure.core.ResourceGroup("rg", {location: "West Europe"});
    const appconf = new azure.appconfiguration.ConfigurationStore("appconf", {
        resourceGroupName: rg.name,
        location: rg.location,
    });
    const current = azure.core.getClientConfig({});
    const appconfDataowner = new azure.authorization.Assignment("appconfDataowner", {
        scope: appconf.id,
        roleDefinitionName: "App Configuration Data Owner",
        principalId: current.then(current => current.objectId),
    });
    const test = new azure.appconfiguration.ConfigurationKey("test", {
        configurationStoreId: appconf.id,
        key: "appConfKey1",
        label: "somelabel",
        value: "a test",
    }, {
        dependsOn: [appconfDataowner],
    });
    
    import pulumi
    import pulumi_azure as azure
    
    rg = azure.core.ResourceGroup("rg", location="West Europe")
    appconf = azure.appconfiguration.ConfigurationStore("appconf",
        resource_group_name=rg.name,
        location=rg.location)
    current = azure.core.get_client_config()
    appconf_dataowner = azure.authorization.Assignment("appconfDataowner",
        scope=appconf.id,
        role_definition_name="App Configuration Data Owner",
        principal_id=current.object_id)
    test = azure.appconfiguration.ConfigurationKey("test",
        configuration_store_id=appconf.id,
        key="appConfKey1",
        label="somelabel",
        value="a test",
        opts=pulumi.ResourceOptions(depends_on=[appconf_dataowner]))
    

    Example coming soon!

    Vault Type

    using Pulumi;
    using Azure = Pulumi.Azure;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var rg = new Azure.Core.ResourceGroup("rg", new Azure.Core.ResourceGroupArgs
            {
                Location = "West Europe",
            });
            var appconf = new Azure.AppConfiguration.ConfigurationStore("appconf", new Azure.AppConfiguration.ConfigurationStoreArgs
            {
                ResourceGroupName = rg.Name,
                Location = rg.Location,
            });
            var current = Output.Create(Azure.Core.GetClientConfig.InvokeAsync());
            var kv = new Azure.KeyVault.KeyVault("kv", new Azure.KeyVault.KeyVaultArgs
            {
                Location = azurerm_resource_group.Test.Location,
                ResourceGroupName = azurerm_resource_group.Test.Name,
                TenantId = current.Apply(current => current.TenantId),
                SkuName = "premium",
                SoftDeleteRetentionDays = 7,
                AccessPolicies = 
                {
                    new Azure.KeyVault.Inputs.KeyVaultAccessPolicyArgs
                    {
                        TenantId = current.Apply(current => current.TenantId),
                        ObjectId = current.Apply(current => current.ObjectId),
                        KeyPermissions = 
                        {
                            "create",
                            "get",
                        },
                        SecretPermissions = 
                        {
                            "set",
                            "get",
                            "delete",
                            "purge",
                            "recover",
                        },
                    },
                },
            });
            var kvs = new Azure.KeyVault.Secret("kvs", new Azure.KeyVault.SecretArgs
            {
                Value = "szechuan",
                KeyVaultId = kv.Id,
            });
            var appconfDataowner = new Azure.Authorization.Assignment("appconfDataowner", new Azure.Authorization.AssignmentArgs
            {
                Scope = appconf.Id,
                RoleDefinitionName = "App Configuration Data Owner",
                PrincipalId = current.Apply(current => current.ObjectId),
            });
            var test = new Azure.AppConfiguration.ConfigurationKey("test", new Azure.AppConfiguration.ConfigurationKeyArgs
            {
                ConfigurationStoreId = azurerm_app_configuration.Test.Id,
                Key = "key1",
                Type = "vault",
                Label = "label1",
                VaultKeyReference = kvs.Id,
            }, new CustomResourceOptions
            {
                DependsOn = 
                {
                    appconfDataowner,
                },
            });
        }
    
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/appconfiguration"
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/authorization"
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/keyvault"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		rg, err := core.NewResourceGroup(ctx, "rg", &core.ResourceGroupArgs{
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		appconf, err := appconfiguration.NewConfigurationStore(ctx, "appconf", &appconfiguration.ConfigurationStoreArgs{
    			ResourceGroupName: rg.Name,
    			Location:          rg.Location,
    		})
    		if err != nil {
    			return err
    		}
    		current, err := core.GetClientConfig(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		kv, err := keyvault.NewKeyVault(ctx, "kv", &keyvault.KeyVaultArgs{
    			Location:                pulumi.Any(azurerm_resource_group.Test.Location),
    			ResourceGroupName:       pulumi.Any(azurerm_resource_group.Test.Name),
    			TenantId:                pulumi.String(current.TenantId),
    			SkuName:                 pulumi.String("premium"),
    			SoftDeleteRetentionDays: pulumi.Int(7),
    			AccessPolicies: keyvault.KeyVaultAccessPolicyArray{
    				&keyvault.KeyVaultAccessPolicyArgs{
    					TenantId: pulumi.String(current.TenantId),
    					ObjectId: pulumi.String(current.ObjectId),
    					KeyPermissions: pulumi.StringArray{
    						pulumi.String("create"),
    						pulumi.String("get"),
    					},
    					SecretPermissions: pulumi.StringArray{
    						pulumi.String("set"),
    						pulumi.String("get"),
    						pulumi.String("delete"),
    						pulumi.String("purge"),
    						pulumi.String("recover"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		kvs, err := keyvault.NewSecret(ctx, "kvs", &keyvault.SecretArgs{
    			Value:      pulumi.String("szechuan"),
    			KeyVaultId: kv.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		appconfDataowner, err := authorization.NewAssignment(ctx, "appconfDataowner", &authorization.AssignmentArgs{
    			Scope:              appconf.ID(),
    			RoleDefinitionName: pulumi.String("App Configuration Data Owner"),
    			PrincipalId:        pulumi.String(current.ObjectId),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = appconfiguration.NewConfigurationKey(ctx, "test", &appconfiguration.ConfigurationKeyArgs{
    			ConfigurationStoreId: pulumi.Any(azurerm_app_configuration.Test.Id),
    			Key:                  pulumi.String("key1"),
    			Type:                 pulumi.String("vault"),
    			Label:                pulumi.String("label1"),
    			VaultKeyReference:    kvs.ID(),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			appconfDataowner,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Example coming soon!

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const rg = new azure.core.ResourceGroup("rg", {location: "West Europe"});
    const appconf = new azure.appconfiguration.ConfigurationStore("appconf", {
        resourceGroupName: rg.name,
        location: rg.location,
    });
    const current = azure.core.getClientConfig({});
    const kv = new azure.keyvault.KeyVault("kv", {
        location: azurerm_resource_group.test.location,
        resourceGroupName: azurerm_resource_group.test.name,
        tenantId: current.then(current => current.tenantId),
        skuName: "premium",
        softDeleteRetentionDays: 7,
        accessPolicies: [{
            tenantId: current.then(current => current.tenantId),
            objectId: current.then(current => current.objectId),
            keyPermissions: [
                "create",
                "get",
            ],
            secretPermissions: [
                "set",
                "get",
                "delete",
                "purge",
                "recover",
            ],
        }],
    });
    const kvs = new azure.keyvault.Secret("kvs", {
        value: "szechuan",
        keyVaultId: kv.id,
    });
    const appconfDataowner = new azure.authorization.Assignment("appconfDataowner", {
        scope: appconf.id,
        roleDefinitionName: "App Configuration Data Owner",
        principalId: current.then(current => current.objectId),
    });
    const test = new azure.appconfiguration.ConfigurationKey("test", {
        configurationStoreId: azurerm_app_configuration.test.id,
        key: "key1",
        type: "vault",
        label: "label1",
        vaultKeyReference: kvs.id,
    }, {
        dependsOn: [appconfDataowner],
    });
    
    import pulumi
    import pulumi_azure as azure
    
    rg = azure.core.ResourceGroup("rg", location="West Europe")
    appconf = azure.appconfiguration.ConfigurationStore("appconf",
        resource_group_name=rg.name,
        location=rg.location)
    current = azure.core.get_client_config()
    kv = azure.keyvault.KeyVault("kv",
        location=azurerm_resource_group["test"]["location"],
        resource_group_name=azurerm_resource_group["test"]["name"],
        tenant_id=current.tenant_id,
        sku_name="premium",
        soft_delete_retention_days=7,
        access_policies=[azure.keyvault.KeyVaultAccessPolicyArgs(
            tenant_id=current.tenant_id,
            object_id=current.object_id,
            key_permissions=[
                "create",
                "get",
            ],
            secret_permissions=[
                "set",
                "get",
                "delete",
                "purge",
                "recover",
            ],
        )])
    kvs = azure.keyvault.Secret("kvs",
        value="szechuan",
        key_vault_id=kv.id)
    appconf_dataowner = azure.authorization.Assignment("appconfDataowner",
        scope=appconf.id,
        role_definition_name="App Configuration Data Owner",
        principal_id=current.object_id)
    test = azure.appconfiguration.ConfigurationKey("test",
        configuration_store_id=azurerm_app_configuration["test"]["id"],
        key="key1",
        type="vault",
        label="label1",
        vault_key_reference=kvs.id,
        opts=pulumi.ResourceOptions(depends_on=[appconf_dataowner]))
    

    Example coming soon!

    Create ConfigurationKey Resource

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

    Constructor syntax

    new ConfigurationKey(name: string, args: ConfigurationKeyArgs, opts?: CustomResourceOptions);
    @overload
    def ConfigurationKey(resource_name: str,
                         args: ConfigurationKeyArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def ConfigurationKey(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         configuration_store_id: Optional[str] = None,
                         key: Optional[str] = None,
                         content_type: Optional[str] = None,
                         etag: Optional[str] = None,
                         label: Optional[str] = None,
                         locked: Optional[bool] = None,
                         tags: Optional[Mapping[str, str]] = None,
                         type: Optional[str] = None,
                         value: Optional[str] = None,
                         vault_key_reference: Optional[str] = None)
    func NewConfigurationKey(ctx *Context, name string, args ConfigurationKeyArgs, opts ...ResourceOption) (*ConfigurationKey, error)
    public ConfigurationKey(string name, ConfigurationKeyArgs args, CustomResourceOptions? opts = null)
    public ConfigurationKey(String name, ConfigurationKeyArgs args)
    public ConfigurationKey(String name, ConfigurationKeyArgs args, CustomResourceOptions options)
    
    type: azure:appconfiguration:ConfigurationKey
    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 ConfigurationKeyArgs
    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 ConfigurationKeyArgs
    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 ConfigurationKeyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ConfigurationKeyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ConfigurationKeyArgs
    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 configurationKeyResource = new Azure.AppConfiguration.ConfigurationKey("configurationKeyResource", new()
    {
        ConfigurationStoreId = "string",
        Key = "string",
        ContentType = "string",
        Etag = "string",
        Label = "string",
        Locked = false,
        Tags = 
        {
            { "string", "string" },
        },
        Type = "string",
        Value = "string",
        VaultKeyReference = "string",
    });
    
    example, err := appconfiguration.NewConfigurationKey(ctx, "configurationKeyResource", &appconfiguration.ConfigurationKeyArgs{
    	ConfigurationStoreId: pulumi.String("string"),
    	Key:                  pulumi.String("string"),
    	ContentType:          pulumi.String("string"),
    	Etag:                 pulumi.String("string"),
    	Label:                pulumi.String("string"),
    	Locked:               pulumi.Bool(false),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Type:              pulumi.String("string"),
    	Value:             pulumi.String("string"),
    	VaultKeyReference: pulumi.String("string"),
    })
    
    var configurationKeyResource = new ConfigurationKey("configurationKeyResource", ConfigurationKeyArgs.builder()
        .configurationStoreId("string")
        .key("string")
        .contentType("string")
        .etag("string")
        .label("string")
        .locked(false)
        .tags(Map.of("string", "string"))
        .type("string")
        .value("string")
        .vaultKeyReference("string")
        .build());
    
    configuration_key_resource = azure.appconfiguration.ConfigurationKey("configurationKeyResource",
        configuration_store_id="string",
        key="string",
        content_type="string",
        etag="string",
        label="string",
        locked=False,
        tags={
            "string": "string",
        },
        type="string",
        value="string",
        vault_key_reference="string")
    
    const configurationKeyResource = new azure.appconfiguration.ConfigurationKey("configurationKeyResource", {
        configurationStoreId: "string",
        key: "string",
        contentType: "string",
        etag: "string",
        label: "string",
        locked: false,
        tags: {
            string: "string",
        },
        type: "string",
        value: "string",
        vaultKeyReference: "string",
    });
    
    type: azure:appconfiguration:ConfigurationKey
    properties:
        configurationStoreId: string
        contentType: string
        etag: string
        key: string
        label: string
        locked: false
        tags:
            string: string
        type: string
        value: string
        vaultKeyReference: string
    

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

    ConfigurationStoreId string
    Specifies the id of the App Configuration. Changing this forces a new resource to be created.
    Key string
    The name of the App Configuration Key to create. Changing this forces a new resource to be created.
    ContentType string
    The content type of the App Configuration Key. This should only be set when type is set to kv.
    Etag string
    The ETag of the key.
    Label string
    The label of the App Configuration Key. Changing this forces a new resource to be created.
    Locked bool
    Should this App Configuration Key be Locked to prevent changes?
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    Type string
    The type of the App Configuration Key. It can either be kv (simple key/value) or vault (where the value is a reference to a Key Vault Secret.
    Value string
    The value of the App Configuration Key. This should only be set when type is set to kv.
    VaultKeyReference string
    The ID of the vault secret this App Configuration Key refers to, when type is set to vault.
    ConfigurationStoreId string
    Specifies the id of the App Configuration. Changing this forces a new resource to be created.
    Key string
    The name of the App Configuration Key to create. Changing this forces a new resource to be created.
    ContentType string
    The content type of the App Configuration Key. This should only be set when type is set to kv.
    Etag string
    The ETag of the key.
    Label string
    The label of the App Configuration Key. Changing this forces a new resource to be created.
    Locked bool
    Should this App Configuration Key be Locked to prevent changes?
    Tags map[string]string
    A mapping of tags to assign to the resource.
    Type string
    The type of the App Configuration Key. It can either be kv (simple key/value) or vault (where the value is a reference to a Key Vault Secret.
    Value string
    The value of the App Configuration Key. This should only be set when type is set to kv.
    VaultKeyReference string
    The ID of the vault secret this App Configuration Key refers to, when type is set to vault.
    configurationStoreId String
    Specifies the id of the App Configuration. Changing this forces a new resource to be created.
    key String
    The name of the App Configuration Key to create. Changing this forces a new resource to be created.
    contentType String
    The content type of the App Configuration Key. This should only be set when type is set to kv.
    etag String
    The ETag of the key.
    label String
    The label of the App Configuration Key. Changing this forces a new resource to be created.
    locked Boolean
    Should this App Configuration Key be Locked to prevent changes?
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    type String
    The type of the App Configuration Key. It can either be kv (simple key/value) or vault (where the value is a reference to a Key Vault Secret.
    value String
    The value of the App Configuration Key. This should only be set when type is set to kv.
    vaultKeyReference String
    The ID of the vault secret this App Configuration Key refers to, when type is set to vault.
    configurationStoreId string
    Specifies the id of the App Configuration. Changing this forces a new resource to be created.
    key string
    The name of the App Configuration Key to create. Changing this forces a new resource to be created.
    contentType string
    The content type of the App Configuration Key. This should only be set when type is set to kv.
    etag string
    The ETag of the key.
    label string
    The label of the App Configuration Key. Changing this forces a new resource to be created.
    locked boolean
    Should this App Configuration Key be Locked to prevent changes?
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    type string
    The type of the App Configuration Key. It can either be kv (simple key/value) or vault (where the value is a reference to a Key Vault Secret.
    value string
    The value of the App Configuration Key. This should only be set when type is set to kv.
    vaultKeyReference string
    The ID of the vault secret this App Configuration Key refers to, when type is set to vault.
    configuration_store_id str
    Specifies the id of the App Configuration. Changing this forces a new resource to be created.
    key str
    The name of the App Configuration Key to create. Changing this forces a new resource to be created.
    content_type str
    The content type of the App Configuration Key. This should only be set when type is set to kv.
    etag str
    The ETag of the key.
    label str
    The label of the App Configuration Key. Changing this forces a new resource to be created.
    locked bool
    Should this App Configuration Key be Locked to prevent changes?
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    type str
    The type of the App Configuration Key. It can either be kv (simple key/value) or vault (where the value is a reference to a Key Vault Secret.
    value str
    The value of the App Configuration Key. This should only be set when type is set to kv.
    vault_key_reference str
    The ID of the vault secret this App Configuration Key refers to, when type is set to vault.
    configurationStoreId String
    Specifies the id of the App Configuration. Changing this forces a new resource to be created.
    key String
    The name of the App Configuration Key to create. Changing this forces a new resource to be created.
    contentType String
    The content type of the App Configuration Key. This should only be set when type is set to kv.
    etag String
    The ETag of the key.
    label String
    The label of the App Configuration Key. Changing this forces a new resource to be created.
    locked Boolean
    Should this App Configuration Key be Locked to prevent changes?
    tags Map<String>
    A mapping of tags to assign to the resource.
    type String
    The type of the App Configuration Key. It can either be kv (simple key/value) or vault (where the value is a reference to a Key Vault Secret.
    value String
    The value of the App Configuration Key. This should only be set when type is set to kv.
    vaultKeyReference String
    The ID of the vault secret this App Configuration Key refers to, when type is set to vault.

    Outputs

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

    Get an existing ConfigurationKey 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?: ConfigurationKeyState, opts?: CustomResourceOptions): ConfigurationKey
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            configuration_store_id: Optional[str] = None,
            content_type: Optional[str] = None,
            etag: Optional[str] = None,
            key: Optional[str] = None,
            label: Optional[str] = None,
            locked: Optional[bool] = None,
            tags: Optional[Mapping[str, str]] = None,
            type: Optional[str] = None,
            value: Optional[str] = None,
            vault_key_reference: Optional[str] = None) -> ConfigurationKey
    func GetConfigurationKey(ctx *Context, name string, id IDInput, state *ConfigurationKeyState, opts ...ResourceOption) (*ConfigurationKey, error)
    public static ConfigurationKey Get(string name, Input<string> id, ConfigurationKeyState? state, CustomResourceOptions? opts = null)
    public static ConfigurationKey get(String name, Output<String> id, ConfigurationKeyState state, CustomResourceOptions options)
    resources:  _:    type: azure:appconfiguration:ConfigurationKey    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:
    ConfigurationStoreId string
    Specifies the id of the App Configuration. Changing this forces a new resource to be created.
    ContentType string
    The content type of the App Configuration Key. This should only be set when type is set to kv.
    Etag string
    The ETag of the key.
    Key string
    The name of the App Configuration Key to create. Changing this forces a new resource to be created.
    Label string
    The label of the App Configuration Key. Changing this forces a new resource to be created.
    Locked bool
    Should this App Configuration Key be Locked to prevent changes?
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    Type string
    The type of the App Configuration Key. It can either be kv (simple key/value) or vault (where the value is a reference to a Key Vault Secret.
    Value string
    The value of the App Configuration Key. This should only be set when type is set to kv.
    VaultKeyReference string
    The ID of the vault secret this App Configuration Key refers to, when type is set to vault.
    ConfigurationStoreId string
    Specifies the id of the App Configuration. Changing this forces a new resource to be created.
    ContentType string
    The content type of the App Configuration Key. This should only be set when type is set to kv.
    Etag string
    The ETag of the key.
    Key string
    The name of the App Configuration Key to create. Changing this forces a new resource to be created.
    Label string
    The label of the App Configuration Key. Changing this forces a new resource to be created.
    Locked bool
    Should this App Configuration Key be Locked to prevent changes?
    Tags map[string]string
    A mapping of tags to assign to the resource.
    Type string
    The type of the App Configuration Key. It can either be kv (simple key/value) or vault (where the value is a reference to a Key Vault Secret.
    Value string
    The value of the App Configuration Key. This should only be set when type is set to kv.
    VaultKeyReference string
    The ID of the vault secret this App Configuration Key refers to, when type is set to vault.
    configurationStoreId String
    Specifies the id of the App Configuration. Changing this forces a new resource to be created.
    contentType String
    The content type of the App Configuration Key. This should only be set when type is set to kv.
    etag String
    The ETag of the key.
    key String
    The name of the App Configuration Key to create. Changing this forces a new resource to be created.
    label String
    The label of the App Configuration Key. Changing this forces a new resource to be created.
    locked Boolean
    Should this App Configuration Key be Locked to prevent changes?
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    type String
    The type of the App Configuration Key. It can either be kv (simple key/value) or vault (where the value is a reference to a Key Vault Secret.
    value String
    The value of the App Configuration Key. This should only be set when type is set to kv.
    vaultKeyReference String
    The ID of the vault secret this App Configuration Key refers to, when type is set to vault.
    configurationStoreId string
    Specifies the id of the App Configuration. Changing this forces a new resource to be created.
    contentType string
    The content type of the App Configuration Key. This should only be set when type is set to kv.
    etag string
    The ETag of the key.
    key string
    The name of the App Configuration Key to create. Changing this forces a new resource to be created.
    label string
    The label of the App Configuration Key. Changing this forces a new resource to be created.
    locked boolean
    Should this App Configuration Key be Locked to prevent changes?
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    type string
    The type of the App Configuration Key. It can either be kv (simple key/value) or vault (where the value is a reference to a Key Vault Secret.
    value string
    The value of the App Configuration Key. This should only be set when type is set to kv.
    vaultKeyReference string
    The ID of the vault secret this App Configuration Key refers to, when type is set to vault.
    configuration_store_id str
    Specifies the id of the App Configuration. Changing this forces a new resource to be created.
    content_type str
    The content type of the App Configuration Key. This should only be set when type is set to kv.
    etag str
    The ETag of the key.
    key str
    The name of the App Configuration Key to create. Changing this forces a new resource to be created.
    label str
    The label of the App Configuration Key. Changing this forces a new resource to be created.
    locked bool
    Should this App Configuration Key be Locked to prevent changes?
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    type str
    The type of the App Configuration Key. It can either be kv (simple key/value) or vault (where the value is a reference to a Key Vault Secret.
    value str
    The value of the App Configuration Key. This should only be set when type is set to kv.
    vault_key_reference str
    The ID of the vault secret this App Configuration Key refers to, when type is set to vault.
    configurationStoreId String
    Specifies the id of the App Configuration. Changing this forces a new resource to be created.
    contentType String
    The content type of the App Configuration Key. This should only be set when type is set to kv.
    etag String
    The ETag of the key.
    key String
    The name of the App Configuration Key to create. Changing this forces a new resource to be created.
    label String
    The label of the App Configuration Key. Changing this forces a new resource to be created.
    locked Boolean
    Should this App Configuration Key be Locked to prevent changes?
    tags Map<String>
    A mapping of tags to assign to the resource.
    type String
    The type of the App Configuration Key. It can either be kv (simple key/value) or vault (where the value is a reference to a Key Vault Secret.
    value String
    The value of the App Configuration Key. This should only be set when type is set to kv.
    vaultKeyReference String
    The ID of the vault secret this App Configuration Key refers to, when type is set to vault.

    Import

    App Configuration Keys can be imported using the resource id, e.g.

     $ pulumi import azure:appconfiguration/configurationKey:ConfigurationKey test /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resourceGroup1/providers/Microsoft.AppConfiguration/configurationStores/appConf1/AppConfigurationKey/appConfKey1/Label/label1
    

    If you wish to import a key with an empty label then sustitute the label’s name with %00, like this

     $ pulumi import azure:appconfiguration/configurationKey:ConfigurationKey test /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resourceGroup1/providers/Microsoft.AppConfiguration/configurationStores/appConf1/AppConfigurationKey/appConfKey1/Label/%00
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Viewing docs for Azure v4.42.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.