0

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?

Ole Albers
  • 8,715
  • 10
  • 73
  • 166

1 Answers1

3

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

Mikhail Shilkov
  • 34,128
  • 3
  • 68
  • 107
  • I had this working a few days ago around the time this was posted (non-related to this post). Today I suddenly started getting " error: cannot check existence of resource" when adding key values. I've tested this against 3 different subscriptions with full permissions. Not sure what changed... any ideas? – Eric Tijerina Feb 19 '21 at 06:45
  • Discussed in https://github.com/pulumi/pulumi-azure-nextgen/issues/298 – Mikhail Shilkov Feb 19 '21 at 08:35