Created
August 8, 2021 11:50
-
-
Save apc-kamezaki/12015fa6e93b93cc4e6536e67f975147 to your computer and use it in GitHub Desktop.
Deploy postgresql using getSecret()
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
@description('key vault name') | |
param keyVaultName string | |
@description('secret name for db admin user') | |
param userSecretName string | |
@description('secret name for db admin password') | |
param passwordSecretName string | |
resource kv 'Microsoft.KeyVault/vaults@2019-09-01' existing = { | |
name: keyVaultName | |
} | |
resource pgsql 'Microsoft.DBForPostgreSQL/servers@2017-12-01' = { | |
name: name | |
location: location | |
sku: { | |
... | |
} | |
properties: { | |
createMode: 'Default' | |
administratorLogin: kv.getSecret(userSecretName) | |
administratorLoginPassword: kv.getSecret(passwordSecretName) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment