Skip to content

Commit 17552fe

Browse files
committed
removing redundant getSecret function description
1 parent 5c07802 commit 17552fe

File tree

1 file changed

+0
-51
lines changed

1 file changed

+0
-51
lines changed

articles/azure-resource-manager/bicep/bicep-functions-resource.md

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -179,57 +179,6 @@ module sql './sql.bicep' = {
179179
}
180180
```
181181

182-
## az.getSecret
183-
184-
`az.getSecret(subscriptionId, resourceGroupName, keyVaultName, secretName, secretVersion)`
185-
186-
Returns a secret from an _Azure Key Vault_. Use this function to pass a secret to a secure string parameter of a Bicep module.
187-
188-
You can use the `az.getSecret()` function from within a `.bicepparam` file.
189-
190-
```bicep
191-
using './main.bicep'
192-
193-
param secureUserName = az.getSecret('<subscriptionId>', '<resourceGroupName>', '<keyVaultName>', '<secretName>', '<secretVersion>')
194-
param securePassword = az.getSecret('<subscriptionId>', '<resourceGroupName>', '<keyVaultName>', '<secretName>')
195-
```
196-
197-
You'll get an error if you use this function with string interpolation.
198-
199-
A [namespace qualifier](bicep-functions.md#namespaces-for-functions) (`az`) isn't needed because the function is available from the _default_ Azure Namespace.
200-
201-
### Parameters
202-
203-
| Parameter | Required | Type | Description |
204-
|:--- |:--- |:--- |:--- |
205-
| subscriptionId | Yes | string | The id of the subscription that has the KeyVault resource. |
206-
| resourceGroupName | Yes | string | The name of the resource group that has the KeyVault resource. |
207-
| keyVaultName | Yes | string | The name of the key vault. |
208-
| secretName | Yes | string | The name of the secret stored in the key vault. |
209-
| secretVersion | No | string | The version of the secret stored in the key vault. |
210-
211-
### Return value
212-
213-
The value for the secret.
214-
215-
### Example
216-
217-
The following `.bicepparam` file has a `securePassword` parameter that will have the latest value of the _\<secretName\>_ secret.
218-
219-
```bicep
220-
using './main.bicep'
221-
222-
param securePassword = az.getSecret('<subscriptionId>', '<resourceGroupName>', '<keyVaultName>', '<secretName>')
223-
```
224-
225-
The following `.bicepparam` file has a `securePassword` parameter that will have the value of the _\<secretName\>_ secret, but it's pinned to a specific _\<secretValue\>_.
226-
227-
```bicep
228-
using './main.bicep'
229-
230-
param securePassword = az.getSecret('<subscriptionId>', '<resourceGroupName>', '<keyVaultName>', '<secretName>', '<secretVersion>')
231-
```
232-
233182
<a id="listkeys"></a>
234183
<a id="list"></a>
235184

0 commit comments

Comments
 (0)