Skip to content

[Issue] Using Access Token as a bicep parameter #1211

@fangjian0423

Description

@fangjian0423

hi,

As I know, the variables defined in main.parameters.json file will be replaced by azd, and there are 2 ways to do that:

  1. replace by the values of .azure/{env}/.env file or environment variables
"param": {
    "value": "${AZURE_ACCESS_TOKEN}"
 }
  1. use secretOrRandomPassword keyword to get value from KeyVault to replace variables
"param": {
    "value": "$(secretOrRandomPassword ${AZURE_KEY_VAULT_NAME} sqlAdminPassword)"
},

Is there any ways to use access token as a bicep parameter?

If I use bicep directly, I can get access token as a parameter, not sure azd can do it or not:

az deployment sub create --location centralus --template-file test.bicep --parameters accessToken=$(az account get-access-token --resource-type oss-rdbms --output tsv --query accessToken)

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions