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

Deployment Pane: secure param doesn't pass validation #14534

Open
coin8086 opened this issue Jul 12, 2024 · 0 comments
Open

Deployment Pane: secure param doesn't pass validation #14534

coin8086 opened this issue Jul 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@coin8086
Copy link
Member

My bicep script is like the following.

@secure()
param something string

resource test 'Microsoft.Storage/storageAccounts@2023-05-01' = {
  name: 'testtesttest'
  location: resourceGroup().location
  sku: {
    name: 'Standard_LRS'
  }
  kind: 'StorageV2'
  tags: {
    sometag: something
  }
}

Note the param something is decorated by secure().

Then open the script file in VS Code and show the Deployment Pane. Put "abc" for the param "something" and click the "Validate" action button, then the following error is returned

{
  "code": "InvalidTemplate",
  "message": "Deployment template validation failed: 'The value for the template parameter 'something' at line '1' and column '278' is not provided. Please see https://aka.ms/arm-create-parameter-file for usage details.'.",
  "additionalInfo": [
    {
      "type": "TemplateViolation",
      "info": {
        "lineNumber": 1,
        "linePosition": 278,
        "path": "properties.template.parameters.something"
      }
    }
  ]
}

Here's screenshot:

Screenshot 2024-07-12 122658

Note that if I remove the secure decoration, then the validation can pass. But that's not what I want.

Besides, the secure input is not well-supported in the Deployment Pane: the input is not masked but showed clearly as plain text.

@alex-frankel alex-frankel added bug Something isn't working and removed Needs: Triage 🔍 labels Jul 17, 2024
@alex-frankel alex-frankel added this to the Committed Backlog milestone Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

2 participants