Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Small changes to secret export interface description to be more explicit #1447

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/static/includes/interfaces/int.secExp.input.bicep
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
secretsExportConfiguration: {
keyVaultResourceId: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{keyVaultName}'
>secretToExportName1<: 'myPrimarySecret'
>secretToExportName2<: 'mySecondarySecret'
>secretToExport1<Name: 'myPrimarySecret'
eriqua marked this conversation as resolved.
Show resolved Hide resolved
>secretToExport2<Name: 'mySecondarySecret'
// (...)
}
2 changes: 1 addition & 1 deletion docs/static/includes/interfaces/int.secExp.module.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Parameters //
// ============== //

@description('Required. The name of the Key Vault to set the ecrets in.')
@description('Required. The name of the Key Vault to set the secrets in.')
param keyVaultName string

@description('Required. The secrets to set in the Key Vault.')
Expand Down
4 changes: 2 additions & 2 deletions docs/static/includes/interfaces/int.secExp.output.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Get all exported secret references
output exportedSecrets object = >deploymentReference<.outputs.exportedSecrets

// Get the resource Id of just the secret with name >secretToExportName1<
output specificSecret string = >deploymentReference<.outputs.exportedSecrets.>secretToExportName1<.secretResourceId
// Get the resource Id of just the secret with name >secretToExport1<Name
output specificSecret string = >deploymentReference<.outputs.exportedSecrets.>secretToExport1<Name.secretResourceId

// Get the resource Ids of all secrets set
output exportedSecretResourceIds array = map(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"Type": "Object",
"Value": {
">secretToExportName1<": {
"secretResourceId": "/subscriptions/<subId>/resourceGroups/<rgName>providers/Microsoft.KeyVault/vaults/<vaultName>/secrets/>secretToExportName1<",
"secretResourceId": "/subscriptions/<subId>/resourceGroups/<rgName>providers/Microsoft.KeyVault/vaults/<vaultName>/secrets/>secretToExportName1<",
"secretUri": "https://<vaultName>.vault.azure.net/secrets/>secretToExportName1<"
},
">secretToExportName2<": {
Expand All @@ -19,8 +19,8 @@
"exportedSecretResourceIds": {
"Type": "Array",
"Value": [
"/subscriptions/<subId>/resourceGroups/<rgName>providers/Microsoft.KeyVault/vaults/<vaultName>/secrets/>secretToExportName2<",
"/subscriptions/<subId>/resourceGroups/<rgName>providers/Microsoft.KeyVault/vaults/<vaultName>/secrets/>secretToExportName1<"
"/subscriptions/<subId>/resourceGroups/<rgName>providers/Microsoft.KeyVault/vaults/<vaultName>/secrets/>secretToExportName1<",
"/subscriptions/<subId>/resourceGroups/<rgName>providers/Microsoft.KeyVault/vaults/<vaultName>/secrets/>secretToExportName2<"
]
}
}
}
12 changes: 6 additions & 6 deletions docs/static/includes/interfaces/int.secExp.udt.schema.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ module secretsExport 'modules/keyVaultExport.bicep' = if (secretsExportConfigura
keyVaultName: last(split(secretsExportConfiguration.?keyVaultResourceId ?? '//', '/'))
secretsToSet: union(
[],
contains(secretsExportConfiguration!, '>secretToExportName1<')
contains(secretsExportConfiguration!, '>secretToExport1<Name')
? [
{
name: secretsExportConfiguration!.>secretToExportName1<
name: secretsExportConfiguration!.>secretToExport1<Name
value: >secretReference1< // e.g., >singularMainResourceType<.listKeys().primaryMasterKey
}
]
: [],
contains(secretsExportConfiguration!, '>secretToExportName2<')
contains(secretsExportConfiguration!, '>secretToExport2<Name')
? [
{
name: secretsExportConfiguration!.>secretToExportName2<
name: secretsExportConfiguration!.>secretToExport2<Name
value:>secretReference2< // e.g., >singularMainResourceType<.listKeys().secondaryMasterKey
}
]
Expand Down Expand Up @@ -59,10 +59,10 @@ type secretsExportConfigurationType = {
keyVaultResourceId: string

@description('Optional. The >secretToExport1< secret name to create.')
>secretToExportName1<: string?
>secretToExport1<Name: string?

@description('Optional. The >secretToExport2< secret name to create.')
>secretToExportName2<: string?
>secretToExport2<Name: string?

// (...)
}
Expand Down