From e9917d622f4345fdfc01c03ea88ee5264baea339 Mon Sep 17 00:00:00 2001 From: YalinLi0312 Date: Tue, 18 Oct 2022 18:54:29 -0700 Subject: [PATCH 1/3] Update test-resources.json --- sdk/appconfiguration/test-resources.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sdk/appconfiguration/test-resources.json b/sdk/appconfiguration/test-resources.json index cd4d0859565d..3c17579fe3ff 100644 --- a/sdk/appconfiguration/test-resources.json +++ b/sdk/appconfiguration/test-resources.json @@ -48,7 +48,7 @@ "defaultValue": "azconfig-net", "type": "string" }, - "endpointSuffix": { + "azConfigEndpointSuffix": { "defaultValue": ".azconfig.io", "type": "string" } @@ -56,7 +56,7 @@ "variables": { "roleDefinitionId": "[format('/subscriptions/{0}/providers/Microsoft.Authorization/roleDefinitions/5ae67dd6-50cb-40e7-96ff-dc2bfa4b606b', subscription().subscriptionId)]", "uniqueAzConfigName": "[format('{0}-{1}', parameters('baseName'), parameters('azConfigPrefix'))]", - "endpointValue": "[format('https://{0}-{1}.azconfig.io', parameters('baseName'), parameters('azConfigPrefix'))]" + "endpointValue": "[format('https://{0}-{1}{2}', parameters('baseName'), parameters('azConfigPrefix'), parameters('azConfigEndpointSuffix'))]" }, "resources": [ { @@ -82,7 +82,6 @@ } ], "outputs": { - "APPCONFIGURATION_CONNECTION_STRING": { "type": "string", "value": "[listKeys(resourceId('Microsoft.AppConfiguration/configurationStores',variables('uniqueAzConfigName')), '2019-02-01-preview').value[0].connectionString]" From 24b45c2f6ff01f1ed678b75b586410055c2bf1b6 Mon Sep 17 00:00:00 2001 From: YalinLi0312 Date: Tue, 18 Oct 2022 21:22:32 -0700 Subject: [PATCH 2/3] Update test-resources.json --- sdk/appconfiguration/test-resources.json | 57 +++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/sdk/appconfiguration/test-resources.json b/sdk/appconfiguration/test-resources.json index 3c17579fe3ff..7cde9d6a443a 100644 --- a/sdk/appconfiguration/test-resources.json +++ b/sdk/appconfiguration/test-resources.json @@ -51,12 +51,27 @@ "azConfigEndpointSuffix": { "defaultValue": ".azconfig.io", "type": "string" + }, + "keyVaultEndpointSuffix": { + "defaultValue": ".vault.azure.net", + "type": "string", + "metadata": { + "description": "Endpoint suffix for sovereign clouds, requires the proceeding '.'. The default uses the public Azure Cloud (.vault.azure.net)" + } + }, + "keyVaultSku": { + "type": "string", + "defaultValue": "premium", + "metadata": { + "description": "Key Vault SKU to deploy. The default is 'premium'" + } } }, "variables": { "roleDefinitionId": "[format('/subscriptions/{0}/providers/Microsoft.Authorization/roleDefinitions/5ae67dd6-50cb-40e7-96ff-dc2bfa4b606b', subscription().subscriptionId)]", "uniqueAzConfigName": "[format('{0}-{1}', parameters('baseName'), parameters('azConfigPrefix'))]", - "endpointValue": "[format('https://{0}-{1}{2}', parameters('baseName'), parameters('azConfigPrefix'), parameters('azConfigEndpointSuffix'))]" + "endpointValue": "[format('https://{0}-{1}{2}', parameters('baseName'), parameters('azConfigPrefix'), parameters('azConfigEndpointSuffix'))]", + "azureKeyVaultSecretUrl": "[format('https://{0}{1}/secrets/TestSecret', parameters('baseName'), parameters('keyVaultEndpointSuffix'))]" }, "resources": [ { @@ -79,6 +94,42 @@ "roleDefinitionId": "[variables('roleDefinitionId')]", "principalId": "[parameters('testApplicationOid')]" } + }, + { + "type": "Microsoft.KeyVault/vaults", + "apiVersion": "2016-10-01", + "name": "[parameters('baseName')]", + "location": "[parameters('location')]", + "properties": { + "sku": { + "family": "A", + "name": "[parameters('keyVaultSku')]" + }, + "tenantId": "[parameters('tenantId')]", + "accessPolicies": [ + { + "tenantId": "[parameters('tenantId')]", + "objectId": "[parameters('testApplicationOid')]", + "permissions": { + "secrets": [ + "get" + ] + } + } + ] + } + }, + { + "type": "Microsoft.KeyVault/vaults/secrets", + "name": "[concat(parameters('baseName'), '/TestSecret')]", + "apiVersion": "2016-10-01", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.KeyVault/vaults', parameters('baseName'))]" + ], + "properties": { + "value": "Very secret value" + } } ], "outputs": { @@ -89,6 +140,10 @@ "APPCONFIGURATION_ENDPOINT_STRING": { "type": "string", "value": "[variables('endpointValue')]" + }, + "KEYVAULT_SECRET_URL": { + "type": "string", + "value": "[variables('azureKeyVaultSecretUrl')]" } } } \ No newline at end of file From 5738aeae27f94b10df06ef6a53507426101b9407 Mon Sep 17 00:00:00 2001 From: YalinLi0312 Date: Tue, 25 Oct 2022 12:52:38 -0700 Subject: [PATCH 3/3] Update cspell.json --- .vscode/cspell.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.vscode/cspell.json b/.vscode/cspell.json index cb2fb3022f17..e54743ea4b97 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -1117,6 +1117,12 @@ "mrenclave", "infile" ] + }, + { + "filename": "sdk/appconfiguration/test-resources.json", + "words": [ + "azconfig" + ] } ], "allowCompoundWords": true