Azure / arm-deploy

ARM action to deploy an Azure Resource Manager (ARM) template to all the deployment scopes
MIT License
82 stars 36 forks source link

Pass github secrets to the bicep template #203

Closed bahramr closed 3 months ago

bahramr commented 3 months ago

This example in the README does not work when using bicep templates: https://github.com/Azure/arm-deploy?tab=readme-ov-file#example

For some reasons the bicep parameters specified are not overridden when using secrets, here is my code:

name: Deploy Bicep template uses: azure/arm-deploy@v1 with: scope: resourcegroup subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION }} resourceGroupName: "rg-contoso" template: ./main.bicep parameters: ./main.parameters.bicepparam adminUsername=${{ secrets.ADMINUSERNAME }} adminPassword=${{ secrets.ADMINPASSWORD }} failOnStdErr: false

anthony-c-martin commented 3 months ago

Closing as I believe this is a duplicate of #139.

There's an underlying issue with Azure CLI that'll be fixed with https://github.com/Azure/azure-cli/pull/28826. Until then, please take a look at the workaround suggested under #139.