From 6316e031f9cd0da9728448ca05844b9f6727a1f0 Mon Sep 17 00:00:00 2001 From: Vic Perdana <7114832+vicperdana@users.noreply.github.com> Date: Wed, 24 Mar 2021 22:21:18 +1100 Subject: [PATCH 1/6] Commit changes --- CHANGELOG.md | 3 +++ src/PSDocs.Azure/docs/Azure.Template.Doc.ps1 | 9 +++++++-- src/PSDocs.Azure/en/PSDocs-strings.psd1 | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6767b26a..5766db51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Change log ## Unreleased +- General improvements: + - Added ability to detect "Required" or "Optional for each parameter. [#55](https://github.com/Azure/PSDocs.Azure/issues/55) + - Detects if parameter is either "Optional" or "Required" based on the availability of `DefaultValue` or `AllowedValues` ## v0.3.0-B2103011 (pre-release) diff --git a/src/PSDocs.Azure/docs/Azure.Template.Doc.ps1 b/src/PSDocs.Azure/docs/Azure.Template.Doc.ps1 index de0befe9..ce3c962a 100644 --- a/src/PSDocs.Azure/docs/Azure.Template.Doc.ps1 +++ b/src/PSDocs.Azure/docs/Azure.Template.Doc.ps1 @@ -20,15 +20,18 @@ function global:GetTemplateParameter { Description = '' DefaultValue = $Null AllowedValues = $Null + Required = "Required" } if ([bool]$property.Value.PSObject.Properties['metadata'] -and [bool]$property.Value.metadata.PSObject.Properties['description']) { $result.Description = $property.Value.metadata.description; } if ([bool]$property.Value.PSObject.Properties['defaultValue']) { $result.DefaultValue = $property.Value.defaultValue; + $result.Required = "Optional" } if ([bool]$property.Value.PSObject.Properties['allowedValues']) { $result.AllowedValues = $property.Value.allowedValues; + $result.Required = "Optional" } $result; } @@ -232,11 +235,13 @@ Document 'README' { # Add table and detail for each parameter Section $LocalizedData.Parameters { - $parameters | Table -Property @{ Name = $LocalizedData.ParameterName; Expression = { $_.Name }}, - @{ Name = $LocalizedData.Description; Expression = { $_.Description }} + $parameters | Table -Property @{ Name = $LocalizedData.ParameterName; Expression = { $_.Name }}, + @{ Required = $LocalizedData.Required; Expression = { $_.Required }}, + @{ Name = $LocalizedData.Description; Expression = { $_.Description }} foreach ($parameter in $parameters) { Section $parameter.Name { + $parameter.Required; $parameter.Description; if (![String]::IsNullOrEmpty($parameter.DefaultValue)) { diff --git a/src/PSDocs.Azure/en/PSDocs-strings.psd1 b/src/PSDocs.Azure/en/PSDocs-strings.psd1 index 87b62a9b..45670368 100644 --- a/src/PSDocs.Azure/en/PSDocs-strings.psd1 +++ b/src/PSDocs.Azure/en/PSDocs-strings.psd1 @@ -14,4 +14,5 @@ DefaultTitle = 'Azure template' ParameterFile = 'Parameter file' CommandLine = 'Command line' + Required = 'Required' } From 419d2ef958a63e6ef88c5a2d88d652bca8519bfa Mon Sep 17 00:00:00 2001 From: Vic Perdana <7114832+vicperdana@users.noreply.github.com> Date: Thu, 25 Mar 2021 21:56:58 +1100 Subject: [PATCH 2/6] Bugfix for $localizedData --- src/PSDocs.Azure/docs/Azure.Template.Doc.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PSDocs.Azure/docs/Azure.Template.Doc.ps1 b/src/PSDocs.Azure/docs/Azure.Template.Doc.ps1 index ce3c962a..2e16f856 100644 --- a/src/PSDocs.Azure/docs/Azure.Template.Doc.ps1 +++ b/src/PSDocs.Azure/docs/Azure.Template.Doc.ps1 @@ -236,7 +236,7 @@ Document 'README' { # Add table and detail for each parameter Section $LocalizedData.Parameters { $parameters | Table -Property @{ Name = $LocalizedData.ParameterName; Expression = { $_.Name }}, - @{ Required = $LocalizedData.Required; Expression = { $_.Required }}, + @{ Name = $LocalizedData.Required; Expression = { $_.Required }}, @{ Name = $LocalizedData.Description; Expression = { $_.Description }} foreach ($parameter in $parameters) { From 0a6a3b078abdafa1eff77efb82be653b253894d2 Mon Sep 17 00:00:00 2001 From: Vic Perdana <7114832+vicperdana@users.noreply.github.com> Date: Fri, 26 Mar 2021 19:38:30 +1100 Subject: [PATCH 3/6] updated test templates --- templates/storage/v1/README.md | 60 +++++++++++++++++++++++++--------- 1 file changed, 44 insertions(+), 16 deletions(-) diff --git a/templates/storage/v1/README.md b/templates/storage/v1/README.md index 13245f92..e748eadf 100644 --- a/templates/storage/v1/README.md +++ b/templates/storage/v1/README.md @@ -8,35 +8,41 @@ This template deploys a Storage Account including blob containers and files shar ## Parameters -Parameter name | Description --------------- | ----------- -storageAccountName | Required. The name of the Storage Account. -location | Optional. The Azure region to deploy to. -sku | Optional. Create the Storage Account as LRS or GRS. -suffixLength | Optional. Determine how many additional characters are added to the storage account name as a suffix. -containers | Optional. An array of storage containers to create on the storage account. -lifecycleRules | Optional. An array of lifecycle management policies for the storage account. -blobSoftDeleteDays | Optional. The number of days to retain deleted blobs. When set to 0, soft delete is disabled. -containerSoftDeleteDays | Optional. The number of days to retain deleted containers. When set to 0, soft delete is disabled. -shares | Optional. An array of file shares to create on the storage account. -useLargeFileShares | Optional. Determines if large file shares are enabled. This can not be disabled once enabled. -shareSoftDeleteDays | Optional. The number of days to retain deleted shares. When set to 0, soft delete is disabled. -allowBlobPublicAccess | Optional. Determines if any containers can be configured with the anonymous access types of blob or container. -keyVaultPrincipalId | Optional. Set to the objectId of Azure Key Vault to delegated permission for use with Key Managed Storage Accounts. -tags | Optional. Tags to apply to the resource. +Parameter name | Required | Description +-------------- | -------- | ----------- +storageAccountName | Required | Required. The name of the Storage Account. +location | Optional | Optional. The Azure region to deploy to. +sku | Optional | Optional. Create the Storage Account as LRS or GRS. +suffixLength | Optional | Optional. Determine how many additional characters are added to the storage account name as a suffix. +containers | Optional | Optional. An array of storage containers to create on the storage account. +lifecycleRules | Optional | Optional. An array of lifecycle management policies for the storage account. +blobSoftDeleteDays | Optional | Optional. The number of days to retain deleted blobs. When set to 0, soft delete is disabled. +containerSoftDeleteDays | Optional | Optional. The number of days to retain deleted containers. When set to 0, soft delete is disabled. +shares | Optional | Optional. An array of file shares to create on the storage account. +useLargeFileShares | Optional | Optional. Determines if large file shares are enabled. This can not be disabled once enabled. +shareSoftDeleteDays | Optional | Optional. The number of days to retain deleted shares. When set to 0, soft delete is disabled. +allowBlobPublicAccess | Optional | Optional. Determines if any containers can be configured with the anonymous access types of blob or container. +keyVaultPrincipalId | Optional | Optional. Set to the objectId of Azure Key Vault to delegated permission for use with Key Managed Storage Accounts. +tags | Optional | Optional. Tags to apply to the resource. ### storageAccountName +Required + Required. The name of the Storage Account. ### location +Optional + Optional. The Azure region to deploy to. - Default value: `[resourceGroup().location]` ### sku +Optional + Optional. Create the Storage Account as LRS or GRS. - Default value: `Standard_LRS` @@ -45,58 +51,80 @@ Optional. Create the Storage Account as LRS or GRS. ### suffixLength +Optional + Optional. Determine how many additional characters are added to the storage account name as a suffix. - Default value: `0` ### containers +Optional + Optional. An array of storage containers to create on the storage account. ### lifecycleRules +Optional + Optional. An array of lifecycle management policies for the storage account. ### blobSoftDeleteDays +Optional + Optional. The number of days to retain deleted blobs. When set to 0, soft delete is disabled. - Default value: `0` ### containerSoftDeleteDays +Optional + Optional. The number of days to retain deleted containers. When set to 0, soft delete is disabled. - Default value: `0` ### shares +Optional + Optional. An array of file shares to create on the storage account. ### useLargeFileShares +Optional + Optional. Determines if large file shares are enabled. This can not be disabled once enabled. - Default value: `False` ### shareSoftDeleteDays +Optional + Optional. The number of days to retain deleted shares. When set to 0, soft delete is disabled. - Default value: `0` ### allowBlobPublicAccess +Optional + Optional. Determines if any containers can be configured with the anonymous access types of blob or container. - Default value: `False` ### keyVaultPrincipalId +Optional + Optional. Set to the objectId of Azure Key Vault to delegated permission for use with Key Managed Storage Accounts. ### tags +Optional + Optional. Tags to apply to the resource. ## Outputs From 1a64f6f443c1625d42a4bfd725879a2d13b93970 Mon Sep 17 00:00:00 2001 From: Vic Perdana <7114832+vicperdana@users.noreply.github.com> Date: Fri, 26 Mar 2021 19:39:06 +1100 Subject: [PATCH 4/6] Updated test templates --- templates/acr/v1/README.md | 20 +++++++++----- templates/keyvault/v1/README.md | 48 ++++++++++++++++++++++++--------- 2 files changed, 49 insertions(+), 19 deletions(-) diff --git a/templates/acr/v1/README.md b/templates/acr/v1/README.md index 87cc342b..e5037f42 100644 --- a/templates/acr/v1/README.md +++ b/templates/acr/v1/README.md @@ -6,25 +6,31 @@ Create or update a Container Registry. ## Parameters -Parameter name | Description --------------- | ----------- -registryName | Required. The name of the container registry. -location | Optional. The location to deploy the container registry. -registrySku | Optional. The container registry SKU. -tags | Optional. Tags to apply to the resource. +Parameter name | Required | Description +-------------- | -------- | ----------- +registryName | Required | Required. The name of the container registry. +location | Optional | Optional. The location to deploy the container registry. +registrySku | Optional | Optional. The container registry SKU. +tags | Optional | Optional. Tags to apply to the resource. ### registryName +Required + Required. The name of the container registry. ### location +Optional + Optional. The location to deploy the container registry. - Default value: `[resourceGroup().location]` ### registrySku +Optional + Optional. The container registry SKU. - Default value: `Basic` @@ -33,6 +39,8 @@ Optional. The container registry SKU. ### tags +Optional + Optional. Tags to apply to the resource. ## Snippets diff --git a/templates/keyvault/v1/README.md b/templates/keyvault/v1/README.md index fa3f4cc6..b4c9f98d 100644 --- a/templates/keyvault/v1/README.md +++ b/templates/keyvault/v1/README.md @@ -6,76 +6,98 @@ Create or update a Key Vault. ## Parameters -Parameter name | Description --------------- | ----------- -vaultName | Required. The name of the Key Vault. -location | Optional. The Azure region to deploy to. -accessPolicies | Optional. The access policies defined for this vault. -useDeployment | Optional. Determines if Azure can deploy certificates from this Key Vault. -useTemplate | Optional. Determines if templates can reference secrets from this Key Vault. -useDiskEncryption | Optional. Determines if this Key Vault can be used for Azure Disk Encryption. -useSoftDelete | Optional. Determine if soft delete is enabled on this Key Vault. -usePurgeProtection | Optional. Determine if purge protection is enabled on this Key Vault. -networkAcls | Optional. The network firewall defined for this vault. -workspaceId | Optional. The workspace to store audit logs. -tags | Optional. Tags to apply to the resource. +Parameter name | Required | Description +-------------- | -------- | ----------- +vaultName | Required | Required. The name of the Key Vault. +location | Optional | Optional. The Azure region to deploy to. +accessPolicies | Optional | Optional. The access policies defined for this vault. +useDeployment | Optional | Optional. Determines if Azure can deploy certificates from this Key Vault. +useTemplate | Optional | Optional. Determines if templates can reference secrets from this Key Vault. +useDiskEncryption | Optional | Optional. Determines if this Key Vault can be used for Azure Disk Encryption. +useSoftDelete | Optional | Optional. Determine if soft delete is enabled on this Key Vault. +usePurgeProtection | Optional | Optional. Determine if purge protection is enabled on this Key Vault. +networkAcls | Optional | Optional. The network firewall defined for this vault. +workspaceId | Optional | Optional. The workspace to store audit logs. +tags | Optional | Optional. Tags to apply to the resource. ### vaultName +Required + Required. The name of the Key Vault. ### location +Optional + Optional. The Azure region to deploy to. - Default value: `[resourceGroup().location]` ### accessPolicies +Optional + Optional. The access policies defined for this vault. ### useDeployment +Optional + Optional. Determines if Azure can deploy certificates from this Key Vault. - Default value: `False` ### useTemplate +Optional + Optional. Determines if templates can reference secrets from this Key Vault. - Default value: `False` ### useDiskEncryption +Optional + Optional. Determines if this Key Vault can be used for Azure Disk Encryption. - Default value: `False` ### useSoftDelete +Optional + Optional. Determine if soft delete is enabled on this Key Vault. - Default value: `True` ### usePurgeProtection +Optional + Optional. Determine if purge protection is enabled on this Key Vault. - Default value: `True` ### networkAcls +Optional + Optional. The network firewall defined for this vault. - Default value: `@{defaultAction=Allow; bypass=AzureServices; ipRules=System.Object[]; virtualNetworkRules=System.Object[]}` ### workspaceId +Optional + Optional. The workspace to store audit logs. ### tags +Optional + Optional. Tags to apply to the resource. ## Outputs From 01eaa7c82843ba286215ce48bc93cd5333b5dadd Mon Sep 17 00:00:00 2001 From: Vic Perdana <7114832+vicperdana@users.noreply.github.com> Date: Sun, 28 Mar 2021 23:30:07 +1100 Subject: [PATCH 5/6] Updated with badges and yes/no style --- src/PSDocs.Azure/docs/Azure.Template.Doc.ps1 | 18 +++++-- templates/acr/v1/README.md | 16 +++--- templates/keyvault/v1/README.md | 44 +++++++-------- templates/storage/v1/README.md | 56 ++++++++++---------- 4 files changed, 72 insertions(+), 62 deletions(-) diff --git a/src/PSDocs.Azure/docs/Azure.Template.Doc.ps1 b/src/PSDocs.Azure/docs/Azure.Template.Doc.ps1 index 2e16f856..b6e460ff 100644 --- a/src/PSDocs.Azure/docs/Azure.Template.Doc.ps1 +++ b/src/PSDocs.Azure/docs/Azure.Template.Doc.ps1 @@ -20,7 +20,7 @@ function global:GetTemplateParameter { Description = '' DefaultValue = $Null AllowedValues = $Null - Required = "Required" + Required = $Null } if ([bool]$property.Value.PSObject.Properties['metadata'] -and [bool]$property.Value.metadata.PSObject.Properties['description']) { $result.Description = $property.Value.metadata.description; @@ -31,7 +31,6 @@ function global:GetTemplateParameter { } if ([bool]$property.Value.PSObject.Properties['allowedValues']) { $result.AllowedValues = $property.Value.allowedValues; - $result.Required = "Optional" } $result; } @@ -236,12 +235,23 @@ Document 'README' { # Add table and detail for each parameter Section $LocalizedData.Parameters { $parameters | Table -Property @{ Name = $LocalizedData.ParameterName; Expression = { $_.Name }}, - @{ Name = $LocalizedData.Required; Expression = { $_.Required }}, + @{ Name = $LocalizedData.Required; Expression = { + if($_.Required) { + "No" + } + else { + "Yes" + } + } + }, @{ Name = $LocalizedData.Description; Expression = { $_.Description }} foreach ($parameter in $parameters) { Section $parameter.Name { - $parameter.Required; + if($parameter.Required){ + "![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square)" + } + else{ "![Parameter Setting](https://img.shields.io/badge/parameter-required-orange?style=flat-square)" } $parameter.Description; if (![String]::IsNullOrEmpty($parameter.DefaultValue)) { diff --git a/templates/acr/v1/README.md b/templates/acr/v1/README.md index e5037f42..398e30b8 100644 --- a/templates/acr/v1/README.md +++ b/templates/acr/v1/README.md @@ -8,20 +8,20 @@ Create or update a Container Registry. Parameter name | Required | Description -------------- | -------- | ----------- -registryName | Required | Required. The name of the container registry. -location | Optional | Optional. The location to deploy the container registry. -registrySku | Optional | Optional. The container registry SKU. -tags | Optional | Optional. Tags to apply to the resource. +registryName | Yes | Required. The name of the container registry. +location | No | Optional. The location to deploy the container registry. +registrySku | No | Optional. The container registry SKU. +tags | No | Optional. Tags to apply to the resource. ### registryName -Required +![Parameter Setting](https://img.shields.io/badge/parameter-required-orange?style=flat-square) Required. The name of the container registry. ### location -Optional +![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square) Optional. The location to deploy the container registry. @@ -29,7 +29,7 @@ Optional. The location to deploy the container registry. ### registrySku -Optional +![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square) Optional. The container registry SKU. @@ -39,7 +39,7 @@ Optional. The container registry SKU. ### tags -Optional +![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square) Optional. Tags to apply to the resource. diff --git a/templates/keyvault/v1/README.md b/templates/keyvault/v1/README.md index b4c9f98d..8a56d6b7 100644 --- a/templates/keyvault/v1/README.md +++ b/templates/keyvault/v1/README.md @@ -8,27 +8,27 @@ Create or update a Key Vault. Parameter name | Required | Description -------------- | -------- | ----------- -vaultName | Required | Required. The name of the Key Vault. -location | Optional | Optional. The Azure region to deploy to. -accessPolicies | Optional | Optional. The access policies defined for this vault. -useDeployment | Optional | Optional. Determines if Azure can deploy certificates from this Key Vault. -useTemplate | Optional | Optional. Determines if templates can reference secrets from this Key Vault. -useDiskEncryption | Optional | Optional. Determines if this Key Vault can be used for Azure Disk Encryption. -useSoftDelete | Optional | Optional. Determine if soft delete is enabled on this Key Vault. -usePurgeProtection | Optional | Optional. Determine if purge protection is enabled on this Key Vault. -networkAcls | Optional | Optional. The network firewall defined for this vault. -workspaceId | Optional | Optional. The workspace to store audit logs. -tags | Optional | Optional. Tags to apply to the resource. +vaultName | Yes | Required. The name of the Key Vault. +location | No | Optional. The Azure region to deploy to. +accessPolicies | No | Optional. The access policies defined for this vault. +useDeployment | No | Optional. Determines if Azure can deploy certificates from this Key Vault. +useTemplate | No | Optional. Determines if templates can reference secrets from this Key Vault. +useDiskEncryption | No | Optional. Determines if this Key Vault can be used for Azure Disk Encryption. +useSoftDelete | No | Optional. Determine if soft delete is enabled on this Key Vault. +usePurgeProtection | No | Optional. Determine if purge protection is enabled on this Key Vault. +networkAcls | No | Optional. The network firewall defined for this vault. +workspaceId | No | Optional. The workspace to store audit logs. +tags | No | Optional. Tags to apply to the resource. ### vaultName -Required +![Parameter Setting](https://img.shields.io/badge/parameter-required-orange?style=flat-square) Required. The name of the Key Vault. ### location -Optional +![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square) Optional. The Azure region to deploy to. @@ -36,13 +36,13 @@ Optional. The Azure region to deploy to. ### accessPolicies -Optional +![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square) Optional. The access policies defined for this vault. ### useDeployment -Optional +![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square) Optional. Determines if Azure can deploy certificates from this Key Vault. @@ -50,7 +50,7 @@ Optional. Determines if Azure can deploy certificates from this Key Vault. ### useTemplate -Optional +![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square) Optional. Determines if templates can reference secrets from this Key Vault. @@ -58,7 +58,7 @@ Optional. Determines if templates can reference secrets from this Key Vault. ### useDiskEncryption -Optional +![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square) Optional. Determines if this Key Vault can be used for Azure Disk Encryption. @@ -66,7 +66,7 @@ Optional. Determines if this Key Vault can be used for Azure Disk Encryption. ### useSoftDelete -Optional +![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square) Optional. Determine if soft delete is enabled on this Key Vault. @@ -74,7 +74,7 @@ Optional. Determine if soft delete is enabled on this Key Vault. ### usePurgeProtection -Optional +![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square) Optional. Determine if purge protection is enabled on this Key Vault. @@ -82,7 +82,7 @@ Optional. Determine if purge protection is enabled on this Key Vault. ### networkAcls -Optional +![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square) Optional. The network firewall defined for this vault. @@ -90,13 +90,13 @@ Optional. The network firewall defined for this vault. ### workspaceId -Optional +![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square) Optional. The workspace to store audit logs. ### tags -Optional +![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square) Optional. Tags to apply to the resource. diff --git a/templates/storage/v1/README.md b/templates/storage/v1/README.md index e748eadf..43b63b21 100644 --- a/templates/storage/v1/README.md +++ b/templates/storage/v1/README.md @@ -10,30 +10,30 @@ This template deploys a Storage Account including blob containers and files shar Parameter name | Required | Description -------------- | -------- | ----------- -storageAccountName | Required | Required. The name of the Storage Account. -location | Optional | Optional. The Azure region to deploy to. -sku | Optional | Optional. Create the Storage Account as LRS or GRS. -suffixLength | Optional | Optional. Determine how many additional characters are added to the storage account name as a suffix. -containers | Optional | Optional. An array of storage containers to create on the storage account. -lifecycleRules | Optional | Optional. An array of lifecycle management policies for the storage account. -blobSoftDeleteDays | Optional | Optional. The number of days to retain deleted blobs. When set to 0, soft delete is disabled. -containerSoftDeleteDays | Optional | Optional. The number of days to retain deleted containers. When set to 0, soft delete is disabled. -shares | Optional | Optional. An array of file shares to create on the storage account. -useLargeFileShares | Optional | Optional. Determines if large file shares are enabled. This can not be disabled once enabled. -shareSoftDeleteDays | Optional | Optional. The number of days to retain deleted shares. When set to 0, soft delete is disabled. -allowBlobPublicAccess | Optional | Optional. Determines if any containers can be configured with the anonymous access types of blob or container. -keyVaultPrincipalId | Optional | Optional. Set to the objectId of Azure Key Vault to delegated permission for use with Key Managed Storage Accounts. -tags | Optional | Optional. Tags to apply to the resource. +storageAccountName | Yes | Required. The name of the Storage Account. +location | No | Optional. The Azure region to deploy to. +sku | No | Optional. Create the Storage Account as LRS or GRS. +suffixLength | No | Optional. Determine how many additional characters are added to the storage account name as a suffix. +containers | No | Optional. An array of storage containers to create on the storage account. +lifecycleRules | No | Optional. An array of lifecycle management policies for the storage account. +blobSoftDeleteDays | No | Optional. The number of days to retain deleted blobs. When set to 0, soft delete is disabled. +containerSoftDeleteDays | No | Optional. The number of days to retain deleted containers. When set to 0, soft delete is disabled. +shares | No | Optional. An array of file shares to create on the storage account. +useLargeFileShares | No | Optional. Determines if large file shares are enabled. This can not be disabled once enabled. +shareSoftDeleteDays | No | Optional. The number of days to retain deleted shares. When set to 0, soft delete is disabled. +allowBlobPublicAccess | No | Optional. Determines if any containers can be configured with the anonymous access types of blob or container. +keyVaultPrincipalId | No | Optional. Set to the objectId of Azure Key Vault to delegated permission for use with Key Managed Storage Accounts. +tags | No | Optional. Tags to apply to the resource. ### storageAccountName -Required +![Parameter Setting](https://img.shields.io/badge/parameter-required-orange?style=flat-square) Required. The name of the Storage Account. ### location -Optional +![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square) Optional. The Azure region to deploy to. @@ -41,7 +41,7 @@ Optional. The Azure region to deploy to. ### sku -Optional +![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square) Optional. Create the Storage Account as LRS or GRS. @@ -51,7 +51,7 @@ Optional. Create the Storage Account as LRS or GRS. ### suffixLength -Optional +![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square) Optional. Determine how many additional characters are added to the storage account name as a suffix. @@ -59,19 +59,19 @@ Optional. Determine how many additional characters are added to the storage acco ### containers -Optional +![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square) Optional. An array of storage containers to create on the storage account. ### lifecycleRules -Optional +![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square) Optional. An array of lifecycle management policies for the storage account. ### blobSoftDeleteDays -Optional +![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square) Optional. The number of days to retain deleted blobs. When set to 0, soft delete is disabled. @@ -79,7 +79,7 @@ Optional. The number of days to retain deleted blobs. When set to 0, soft delete ### containerSoftDeleteDays -Optional +![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square) Optional. The number of days to retain deleted containers. When set to 0, soft delete is disabled. @@ -87,13 +87,13 @@ Optional. The number of days to retain deleted containers. When set to 0, soft d ### shares -Optional +![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square) Optional. An array of file shares to create on the storage account. ### useLargeFileShares -Optional +![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square) Optional. Determines if large file shares are enabled. This can not be disabled once enabled. @@ -101,7 +101,7 @@ Optional. Determines if large file shares are enabled. This can not be disabled ### shareSoftDeleteDays -Optional +![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square) Optional. The number of days to retain deleted shares. When set to 0, soft delete is disabled. @@ -109,7 +109,7 @@ Optional. The number of days to retain deleted shares. When set to 0, soft delet ### allowBlobPublicAccess -Optional +![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square) Optional. Determines if any containers can be configured with the anonymous access types of blob or container. @@ -117,13 +117,13 @@ Optional. Determines if any containers can be configured with the anonymous acce ### keyVaultPrincipalId -Optional +![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square) Optional. Set to the objectId of Azure Key Vault to delegated permission for use with Key Managed Storage Accounts. ### tags -Optional +![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square) Optional. Tags to apply to the resource. From bf32eee1ae7bb319ace5c21b3f2632390d538f2c Mon Sep 17 00:00:00 2001 From: Bernie White Date: Tue, 30 Mar 2021 14:54:27 +1000 Subject: [PATCH 6/6] Suggested localization --- src/PSDocs.Azure/docs/Azure.Template.Doc.ps1 | 4 ++-- src/PSDocs.Azure/en/PSDocs-strings.psd1 | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/PSDocs.Azure/docs/Azure.Template.Doc.ps1 b/src/PSDocs.Azure/docs/Azure.Template.Doc.ps1 index b6e460ff..46aec810 100644 --- a/src/PSDocs.Azure/docs/Azure.Template.Doc.ps1 +++ b/src/PSDocs.Azure/docs/Azure.Template.Doc.ps1 @@ -237,10 +237,10 @@ Document 'README' { $parameters | Table -Property @{ Name = $LocalizedData.ParameterName; Expression = { $_.Name }}, @{ Name = $LocalizedData.Required; Expression = { if($_.Required) { - "No" + $LocalizedData.RequiredNo } else { - "Yes" + $LocalizedData.RequiredYes } } }, diff --git a/src/PSDocs.Azure/en/PSDocs-strings.psd1 b/src/PSDocs.Azure/en/PSDocs-strings.psd1 index 45670368..9fb13f53 100644 --- a/src/PSDocs.Azure/en/PSDocs-strings.psd1 +++ b/src/PSDocs.Azure/en/PSDocs-strings.psd1 @@ -15,4 +15,6 @@ ParameterFile = 'Parameter file' CommandLine = 'Command line' Required = 'Required' + RequiredYes = 'Yes' + RequiredNo = 'No' }