-
Notifications
You must be signed in to change notification settings - Fork 204
Open
Description
Bicep has a decorator @secure() that makes an output be able to pass secrets.
The problem is even using it, I still get an error from ARM toolkit.
Here is the official documentation: https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/outputs?tabs=azure-powershell#secure-outputs
Here is the line of code I'm using (Bicep):
@secure()
output accountKey string = storageAccount.listKeys().keys[0].value
Output in JSON:
"accountKey": {
"type": "securestring",
"value": "[listKeys('storageAccount', '2025-01-01').keys[0].value]"
}`
Here is the error:
NestedTemplate [parameters('storageAccountName')] [ Lines 485 - 776 ]
[-] Outputs Must Not Contain Secrets (6 ms)
Output contains secret: accountKey
Since the type is securestring, shouldn't the toolkit consider this as not an issue?
Metadata
Metadata
Assignees
Labels
No labels