Skip to content

Commit fa33e96

Browse files
committed
update
1 parent 4c29592 commit fa33e96

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Bicep modules
33
description: This article describes how to define a module in a Bicep file and how to use module scopes.
44
ms.topic: conceptual
55
ms.custom: devx-track-bicep
6-
ms.date: 03/25/2025
6+
ms.date: 05/09/2025
77
---
88

99
# Bicep modules
@@ -545,6 +545,8 @@ module stgModule '../create-storage-account/main.bicep' = {
545545
output storageEndpoint object = stgModule.outputs.storageEndpoint
546546
```
547547

548+
The `@secure()` decorator can now be applied to module outputs to mark them as sensitive, ensuring that their values are not exposed in logs or deployment history. This is particularly useful when a module needs to return sensitive data, such as a generated key or connection string, to the parent Bicep file without risking exposure. For more information, see [Secure outputs](./outputs.md#secure-outputs).
549+
548550
## Related content
549551

550552
- For a tutorial, see [Build your first Bicep template](/training/modules/deploy-azure-resources-by-using-bicep-templates/).

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Outputs in Bicep
33
description: Learn how to define output values in Bicep.
44
ms.topic: conceptual
55
ms.custom: devx-track-bicep
6-
ms.date: 03/25/2025
6+
ms.date: 05/09/2025
77
---
88

99
# Outputs in Bicep
@@ -153,7 +153,7 @@ See [Elevate error level](./user-defined-data-types.md#elevate-error-level).
153153

154154
### Secure outputs
155155

156-
With Bicep version 0.35.1 and later, you can mark string or object outputs as secure. The value of a secure output isn't saved to the deployment history and isn't logged.
156+
With Bicep version 0.35.1 and later, you can mark string or object outputs as secure. When an output is decorated with `@secure()`, Azure Resource Manager treats the output value as sensitive, preventing it from being logged or displayed in deployment history, Azure Portal, or command-line outputs.
157157

158158
```bicep
159159
@secure()
@@ -165,7 +165,7 @@ output demoSecretObject object
165165

166166
There are several linter rules related to this decorator: [Secure parameter default](./linter-rule-secure-parameter-default.md), [Secure parameters in nested deployments](./linter-rule-secure-params-in-nested-deploy.md), [Secure secrets in parameters](./linter-rule-secure-secrets-in-parameters.md).
167167

168-
168+
The `@secure()` decorator is valid only for outputs of type string or object, as these align with the [secureString](../templates/syntax.md#outputs) and [secureObject](../templates/syntax.md#outputs) types in ARM templates. To pass arrays or numbers securely, wrap them in a secureObject or serialize them as a secureString.
169169

170170
## Conditional output
171171

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Parameters in Bicep files
33
description: Learn how to define and use parameters in a Bicep file.
44
ms.topic: conceptual
55
ms.custom: devx-track-bicep
6-
ms.date: 03/25/2025
6+
ms.date: 05/09/2025
77
---
88

99
# Parameters in Bicep
@@ -207,7 +207,7 @@ See [Elevate error level](./user-defined-data-types.md#elevate-error-level).
207207

208208
### Secure parameters
209209

210-
You can mark string or object parameters as secure. The value of a secure parameter isn't saved to the deployment history and isn't logged.
210+
You can mark string or object parameters as secure. When a parameter is decorated with `@secure()`, Azure Resource Manager treats the parameter value as sensitive, preventing it from being logged or displayed in deployment history, Azure Portal, or command-line outputs.
211211

212212
```bicep
213213
@secure()
@@ -232,6 +232,8 @@ resource keyvault 'Microsoft.KeyVault/vaults@2019-09-01' = {
232232
}
233233
```
234234

235+
The `@secure()` decorator is valid only for parameters of type string or object, as these align with the [secureString](../templates/syntax.md#parameters) and [secureObject](../templates/syntax.md#parameters) types in ARM templates. To pass arrays or numbers securely, wrap them in a secureObject or serialize them as a secureString.
236+
235237
## Use objects as parameters
236238

237239
It can be easier to organize related values by passing them in as an object. This approach also reduces the number of parameters in the template.

0 commit comments

Comments
 (0)