We recommend using Azure Native.
azure.appconfiguration.getConfigurationKey
Explore with Pulumi AI
Use this data source to access information about an existing 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
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const test = azure.appconfiguration.getConfigurationKey({
configurationStoreId: appconf.id,
key: "appConfKey1",
label: "somelabel",
});
export const value = test.then(test => test.value);
import pulumi
import pulumi_azure as azure
test = azure.appconfiguration.get_configuration_key(configuration_store_id=appconf["id"],
key="appConfKey1",
label="somelabel")
pulumi.export("value", test.value)
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/appconfiguration"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
test, err := appconfiguration.LookupConfigurationKey(ctx, &appconfiguration.LookupConfigurationKeyArgs{
ConfigurationStoreId: appconf.Id,
Key: "appConfKey1",
Label: pulumi.StringRef("somelabel"),
}, nil)
if err != nil {
return err
}
ctx.Export("value", test.Value)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var test = Azure.AppConfiguration.GetConfigurationKey.Invoke(new()
{
ConfigurationStoreId = appconf.Id,
Key = "appConfKey1",
Label = "somelabel",
});
return new Dictionary<string, object?>
{
["value"] = test.Apply(getConfigurationKeyResult => getConfigurationKeyResult.Value),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.appconfiguration.AppconfigurationFunctions;
import com.pulumi.azure.appconfiguration.inputs.GetConfigurationKeyArgs;
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) {
final var test = AppconfigurationFunctions.getConfigurationKey(GetConfigurationKeyArgs.builder()
.configurationStoreId(appconf.id())
.key("appConfKey1")
.label("somelabel")
.build());
ctx.export("value", test.applyValue(getConfigurationKeyResult -> getConfigurationKeyResult.value()));
}
}
variables:
test:
fn::invoke:
Function: azure:appconfiguration:getConfigurationKey
Arguments:
configurationStoreId: ${appconf.id}
key: appConfKey1
label: somelabel
outputs:
value: ${test.value}
Using getConfigurationKey
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getConfigurationKey(args: GetConfigurationKeyArgs, opts?: InvokeOptions): Promise<GetConfigurationKeyResult>
function getConfigurationKeyOutput(args: GetConfigurationKeyOutputArgs, opts?: InvokeOptions): Output<GetConfigurationKeyResult>
def get_configuration_key(configuration_store_id: Optional[str] = None,
key: Optional[str] = None,
label: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetConfigurationKeyResult
def get_configuration_key_output(configuration_store_id: Optional[pulumi.Input[str]] = None,
key: Optional[pulumi.Input[str]] = None,
label: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetConfigurationKeyResult]
func LookupConfigurationKey(ctx *Context, args *LookupConfigurationKeyArgs, opts ...InvokeOption) (*LookupConfigurationKeyResult, error)
func LookupConfigurationKeyOutput(ctx *Context, args *LookupConfigurationKeyOutputArgs, opts ...InvokeOption) LookupConfigurationKeyResultOutput
> Note: This function is named LookupConfigurationKey
in the Go SDK.
public static class GetConfigurationKey
{
public static Task<GetConfigurationKeyResult> InvokeAsync(GetConfigurationKeyArgs args, InvokeOptions? opts = null)
public static Output<GetConfigurationKeyResult> Invoke(GetConfigurationKeyInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetConfigurationKeyResult> getConfigurationKey(GetConfigurationKeyArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: azure:appconfiguration/getConfigurationKey:getConfigurationKey
arguments:
# arguments dictionary
The following arguments are supported:
- Configuration
Store stringId - Specifies the id of the App Configuration.
- Key string
- The name of the App Configuration Key.
- Label string
- The label of the App Configuration Key.
- Configuration
Store stringId - Specifies the id of the App Configuration.
- Key string
- The name of the App Configuration Key.
- Label string
- The label of the App Configuration Key.
- configuration
Store StringId - Specifies the id of the App Configuration.
- key String
- The name of the App Configuration Key.
- label String
- The label of the App Configuration Key.
- configuration
Store stringId - Specifies the id of the App Configuration.
- key string
- The name of the App Configuration Key.
- label string
- The label of the App Configuration Key.
- configuration_
store_ strid - Specifies the id of the App Configuration.
- key str
- The name of the App Configuration Key.
- label str
- The label of the App Configuration Key.
- configuration
Store StringId - Specifies the id of the App Configuration.
- key String
- The name of the App Configuration Key.
- label String
- The label of the App Configuration Key.
getConfigurationKey Result
The following output properties are available:
- Configuration
Store stringId - Content
Type string - The content type of the App Configuration Key.
- Etag string
- The ETag of the key.
- Id string
- The provider-assigned unique ID for this managed resource.
- Key string
- Locked bool
- Is this App Configuration Key be Locked to prevent changes.
- Dictionary<string, string>
- A mapping of tags assigned to the resource.
- Type string
- The type of the App Configuration Key. It can either be
kv
(simple key/value) orvault
(where the value is a reference to a Key Vault Secret. - Value string
- The value of the App Configuration Key.
- Vault
Key stringReference - The ID of the vault secret this App Configuration Key refers to, when
type
isvault
. - Label string
- Configuration
Store stringId - Content
Type string - The content type of the App Configuration Key.
- Etag string
- The ETag of the key.
- Id string
- The provider-assigned unique ID for this managed resource.
- Key string
- Locked bool
- Is this App Configuration Key be Locked to prevent changes.
- map[string]string
- A mapping of tags assigned to the resource.
- Type string
- The type of the App Configuration Key. It can either be
kv
(simple key/value) orvault
(where the value is a reference to a Key Vault Secret. - Value string
- The value of the App Configuration Key.
- Vault
Key stringReference - The ID of the vault secret this App Configuration Key refers to, when
type
isvault
. - Label string
- configuration
Store StringId - content
Type String - The content type of the App Configuration Key.
- etag String
- The ETag of the key.
- id String
- The provider-assigned unique ID for this managed resource.
- key String
- locked Boolean
- Is this App Configuration Key be Locked to prevent changes.
- Map<String,String>
- A mapping of tags assigned to the resource.
- type String
- The type of the App Configuration Key. It can either be
kv
(simple key/value) orvault
(where the value is a reference to a Key Vault Secret. - value String
- The value of the App Configuration Key.
- vault
Key StringReference - The ID of the vault secret this App Configuration Key refers to, when
type
isvault
. - label String
- configuration
Store stringId - content
Type string - The content type of the App Configuration Key.
- etag string
- The ETag of the key.
- id string
- The provider-assigned unique ID for this managed resource.
- key string
- locked boolean
- Is this App Configuration Key be Locked to prevent changes.
- {[key: string]: string}
- A mapping of tags assigned to the resource.
- type string
- The type of the App Configuration Key. It can either be
kv
(simple key/value) orvault
(where the value is a reference to a Key Vault Secret. - value string
- The value of the App Configuration Key.
- vault
Key stringReference - The ID of the vault secret this App Configuration Key refers to, when
type
isvault
. - label string
- configuration_
store_ strid - content_
type str - The content type of the App Configuration Key.
- etag str
- The ETag of the key.
- id str
- The provider-assigned unique ID for this managed resource.
- key str
- locked bool
- Is this App Configuration Key be Locked to prevent changes.
- Mapping[str, str]
- A mapping of tags assigned to the resource.
- type str
- The type of the App Configuration Key. It can either be
kv
(simple key/value) orvault
(where the value is a reference to a Key Vault Secret. - value str
- The value of the App Configuration Key.
- vault_
key_ strreference - The ID of the vault secret this App Configuration Key refers to, when
type
isvault
. - label str
- configuration
Store StringId - content
Type String - The content type of the App Configuration Key.
- etag String
- The ETag of the key.
- id String
- The provider-assigned unique ID for this managed resource.
- key String
- locked Boolean
- Is this App Configuration Key be Locked to prevent changes.
- Map<String>
- A mapping of tags assigned to the resource.
- type String
- The type of the App Configuration Key. It can either be
kv
(simple key/value) orvault
(where the value is a reference to a Key Vault Secret. - value String
- The value of the App Configuration Key.
- vault
Key StringReference - The ID of the vault secret this App Configuration Key refers to, when
type
isvault
. - label String
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.