-
Now, Im trying to automate my secret creation. I have secret resource in different Resource Group that use the same secret value and Name. Im trying to retrieve the secret value in one Rg and apply to different Rg since they both are using the same secret Value and Name. Here is my code: // Retreiving KV // Key Vault modules } Errors: MultipleErrorsOccurred - Multiple error occurred: BadRequest,BadRequest,BadRequest,BadRequest,BadRequest,BadRequest,BadRequest,BadRequest,BadRequest,BadRequest. Please see details. SQL_BCPPwd'. Please see https://aka.ms/arm-keyvault for usage details. SQL_BCPPwd'. Please see https://aka.ms/arm-keyvault for usage details. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
Can you try removing the There are 2 options..
|
Beta Was this translation helpful? Give feedback.
-
The KV existed in Rg1. @secure() @secure() var keyVault_name_var = 'KIK${environment}KV1' resource keyVault_name 'Microsoft.KeyVault/vaults@2021-06-01-preview' = { properties: {
} resource keyVault_name_FE_SQL_BCPPwd 'Microsoft.KeyVault/vaults/secrets@2021-06-01-preview' = { properties: { resource keyVault_name_FE_SQL_BCPUser 'Microsoft.KeyVault/vaults/secrets@2021-06-01-preview' = { properties: { Module file code:******************* resource kvvalues 'Microsoft.KeyVault/vaults@2021-06-01-preview' existing = { // // Key Vault modules |
Beta Was this translation helpful? Give feedback.
-
If i removed RG2 in the module file, im getting error: Scope "subscription" is not valid for this module. Permitted scopes: "resourceGroup".bicep(BCP134) KV and secret are already created in RG01, so im retrieving secrets from RG01 and applying to RG02. they all have the same secret Name and secret Value. |
Beta Was this translation helpful? Give feedback.
-
I am using TenantID and ObjectID for I will look into RBAC for KV. resource biberk_wildcard_2019 'Microsoft.Cdn/profiles/secrets@2020-09-01' = { } |
Beta Was this translation helpful? Give feedback.
I am using TenantID and ObjectID for
accessPolicies: [
{
tenantId: ''
objectId: ''
I will look into RBAC for KV.
Second question: I have been trying to enable CDN MANAGED Certificate using Bicep but I am not able to get it to work. Any recommendation:
resource biberk_wildcard_2019 'Microsoft.Cdn/profiles/secrets@2020-09-01' = {
name: 'KeyVault1'
parent: testresearchcdn
properties: {
parameters: {
type: 'CustomerCertificate'
certificateAuthority: 'OU=http://certs.godaddy.com/repository/'
secretSource: {
id: ''
}
secretVersion: ''
subjectAlternativeNames: [
'*.example.com'
example.com'
]
useLatestVersion: false
}
}
dependsOn: [
test_researchcdn_biberk_com
]
}