Closed bobjac closed 6 months ago
Initial investigation of the bug showed that "artifactsLocationSasToken" is being written to a variables file in both the Terraform implementation and the Bicep implementation. In both implemtations, the main template does not have a variable with that name declared.
Terraform will successfully deploy the solution with just a warning. ARM will throw the error above.
Possible solutions:
When executing the deployment of the Bicep sample, the following error is being thrown in the backend:
Started by user admin Running as SYSTEM Building in workspace /var/jenkins_home/workspace/arm [WS-CLEANUP] Deleting project workspace... [WS-CLEANUP] Deferred wipeout is used... [arm] $ /bin/sh -xe /tmp/jenkins12862157464284293671.sh
/var/jenkins_home/modm/source/jenkins/definitions/arm/deploy.sh [ { "environmentName": "AzureCloud", "homeTenantId": "5e3992bd-1b0a-43cf-b87a-a1aaacbf0be2", "id": "31e9f9a0-9fd2-4294-a0a3-0101246d9700", "isDefault": true, "managedByTenants": [ { "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" } ], "name": "Code-With-MngEnvMCAP527357", "state": "Enabled", "tenantId": "5e3992bd-1b0a-43cf-b87a-a1aaacbf0be2", "user": { "assignedIdentityInfo": "MSI", "name": "systemAssignedIdentity", "type": "servicePrincipal" } } ]
ERROR: {"code": "InvalidTemplate", "message": "Deployment template validation failed: 'The template parameters 'artifactsLocationSasToken' in the parameters file are not valid; they are not present in the original template and can therefore not be provided at deployment time. The only supported parameters for this template are 'location, resourceGroupName'. Please see https://aka.ms/arm-pass-parameter-values for usage details.'.", "additionalInfo": [{"type": "TemplateViolation", "info": {"lineNumber": 0, "linePosition": 0, "path": ""}}]} Build step 'Execute shell' marked build as failure Finished: FAILURE