Skip to content

Commit

Permalink
[AppConfig] Fix pipeline failures (Azure#26907)
Browse files Browse the repository at this point in the history
  • Loading branch information
YalinLi0312 authored Oct 25, 2022
1 parent f789c9c commit 3871bfa
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 5 deletions.
10 changes: 8 additions & 2 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -1125,8 +1125,14 @@
"Nify",
"ctxt",
"unflattened",
"deseralize",
"wday"
"deseralize",
"wday"
]
},
{
"filename": "sdk/appconfiguration/test-resources.json",
"words": [
"azconfig"
]
}
],
Expand Down
60 changes: 57 additions & 3 deletions sdk/appconfiguration/test-resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,30 @@
"defaultValue": "azconfig-net",
"type": "string"
},
"endpointSuffix": {
"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}.azconfig.io', parameters('baseName'), parameters('azConfigPrefix'))]"
"endpointValue": "[format('https://{0}-{1}{2}', parameters('baseName'), parameters('azConfigPrefix'), parameters('azConfigEndpointSuffix'))]",
"azureKeyVaultSecretUrl": "[format('https://{0}{1}/secrets/TestSecret', parameters('baseName'), parameters('keyVaultEndpointSuffix'))]"
},
"resources": [
{
Expand All @@ -79,17 +94,56 @@
"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": {

"APPCONFIGURATION_CONNECTION_STRING": {
"type": "string",
"value": "[listKeys(resourceId('Microsoft.AppConfiguration/configurationStores',variables('uniqueAzConfigName')), '2019-02-01-preview').value[0].connectionString]"
},
"APPCONFIGURATION_ENDPOINT_STRING": {
"type": "string",
"value": "[variables('endpointValue')]"
},
"KEYVAULT_SECRET_URL": {
"type": "string",
"value": "[variables('azureKeyVaultSecretUrl')]"
}
}
}

0 comments on commit 3871bfa

Please sign in to comment.