Created
January 17, 2022 21:45
-
-
Save xximjasonxx/deff8a6feb8d0bfee62588f115442c45 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// in deploy.bicep | |
module appConfig 'modules/app-config.bicep' = { | |
name: 'appConfigDeploy' | |
params: { | |
name: 'appconfig-pocapplication-${suffix}' | |
location: location | |
configValues: [ | |
{ | |
name: 'searchAddress' | |
value: 'hhttps://www.bing.com' | |
contentType: 'text/plain' | |
} | |
{ | |
name: 'sensitive-value' | |
contentType: 'application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8' | |
value: '{ "uri": "${secret.properties.secretUri}" }' | |
} | |
{ | |
name: 'connection-string' | |
contentType: 'text/plain' | |
value: 'Server=tcp:${database.outputs.serverFqdn};Authentication=Active Directory Managed Identity; User Id=${identity.outputs.principalId}; Database=${database.outputs.databaseName};"' | |
} | |
] | |
applicationIdentityPrincipalId: identity.outputs.principalId | |
} | |
dependsOn: [ | |
identity | |
] | |
} | |
// in the module | |
resource keyValues 'Microsoft.AppConfiguration/configurationStores/keyValues@2021-03-01-preview' = [for config in configValues: { | |
parent: appConfig | |
name: config.name | |
properties: { | |
contentType: config.contentType | |
value: config.value | |
} | |
}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment