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

Supported for '=' in parameter file #133

Open
JFolberth opened this issue Jun 8, 2023 · 2 comments
Open

Supported for '=' in parameter file #133

JFolberth opened this issue Jun 8, 2023 · 2 comments
Assignees
Labels
need-to-triage Requires investigation

Comments

@JFolberth
Copy link

I believe there is a bug when passing in values to the parameter argument. My scenario is I am deploying Data Factory w/ Linked ARM templates. As part of this deployment I am :

  1. creating a storage account
  2. creating a container in the storage account
  3. uploading templates to the storage account
  4. creating a SAS for the container
  5. running an ARM deployment
  6. deleing the storage account

I am seeing an issue when the ARM deployment executes that the template file w/ the URL for the storage account and including the SAS key works. This same method does not work with the parameters and it appears it is stopping on the '=' in the SAS key and thinks this is an override to an ARM parameter in the template.

Error: ERROR: unrecognized template parameter 'https://saadf1234deveus.blob.core.windows.net/templates/datafactory/cicd-parameters/ARMTemplateParams-Dev.json?se'. Allowed parameters: LS_AKV_Storage_Demo_properties_typeProperties_baseUrl, containerSasToken, containerUri, factoryName

Link to my action: https://github.com/JFolberth/adf-cicd-demo/actions/runs/5207084212/jobs/9394295417

Here is the code:

    - name: Run ARM deploy
      uses: azure/arm-deploy@v1
      with:
        resourceGroupName: ${{ inputs.resource-group-name }}
        template:  ${{ format('{0}?{1}', 'https://saadf1234deveus.blob.core.windows.net/templates/linkedTemplates/ArmTemplate_master.json',env.SAS_TOKEN) }}
        parameters: ${{ format('{0}/{1}?{2}', 'https://saadf1234deveus.blob.core.windows.net/templates/datafactory/cicd-parameters', inputs.arm-template-parameters-file, env.SAS_TOKEN) }}
@JFolberth
Copy link
Author

To illustrate a little more I did find a workout around using the Azure CLI for the deployment:

    - name: Deploy ARM Template
      uses: azure/CLI@v1
      with:
        inlineScript: |
           az deployment group create --resource-group ${{ inputs.resource-group-name }} --template-uri ${{ format('{0}?{1}', 'https://saadf1234deveus.blob.core.windows.net/templates/linkedTemplates/ArmTemplate_master.json',env.SAS_TOKEN) }} --parameters ${{ format('{0}/{1}?{2}', 'https://saadf1234deveus.blob.core.windows.net/templates/datafactory/cicd-parameters', inputs.arm-template-parameters-file, env.SAS_TOKEN) }}

Seeing the arguments are the same I feel confident this is a bug in how the arm action is interpreting the values passed into parameters

@JFolberth
Copy link
Author

@bishal-pdMSFT Any update on this. Feels like this is a big issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need-to-triage Requires investigation
Projects
None yet
Development

No branches or pull requests

3 participants