简体   繁体   中英

Add Value to Azure App Configuration using Pulumi

I created an App Configuration using Pulumi:

 _configurationStore = new ConfigurationStore(appConfigurationName, new ConfigurationStoreArgs
            {
                ResourceGroupName = _resourceGroup.Name,
                Location = _resourceGroup.Location,
                Sku = "standard"
            });

Now I am stuck adding values to it. The docs don't mention any method to read or write settings into my ConfigurationStore (or I simply cannot find it).

How can I store simple key/value-Pairs? How can I store "links" to values from an existing keyvault? Do I simply create the connectionstring manually?

Adding key-values was introduced by Azure Resource Manager (ARM) just recently in the 2020-07-01-preview version and there's no "stable" API version with them yet. So, you should use that version to define key-values

new Pulumi.AzureNextGen.AppConfiguration.V20200701Preview.KeyValue("kv",
    new Pulumi.AzureNextGen.AppConfiguration.V20200701Preview.KeyValueArgs
    {
        ResourceGroupName = _resourceGroup.Name,
        ConfigStoreName = _configurationStore.Name,
        KeyValueName = "key1",
        Value = "value1",
    });

You can read more in the docs: https://www.pulumi.com/docs/reference/pkg/azure-nextgen/appconfiguration/keyvalue/

Also, discussed in this issue: https://github.com/pulumi/pulumi-azure-nextgen/issues/62

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM