microsoft / microsoft/AzureTRE
AML Compute Instance fails to build - Invalid Name format
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 235
- Forks
- 192
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 13
Description
Describe the bug
When adding an AML Compute Instance User Resource to a workspace, the deployment will fail if:
- the AML workspace name ends in four numeric characters and
- the Compute Instance Resource Id ends in four numeric characters
If the above two conditions apply, this results in an 'InvalidResourceName' error, with the following error message: "A name for an Azure ML Compute Instance must be between 3 and 24 characters in length and must use only numbers, letters and minus symbol (-) and must start with letters. Numbers cannot be the ending of the name if the previous character is a minus symbol (-). Please specify a different Azure ML Instance name"
Steps to reproduce
- Deploy an AML Workspace Service with a resource id ending in four numbers (e.g. 794d166a-d426-4050-be63-e0de1e174098)
- Deploy an AML Compute Instance with a resource id ending in four numbers (e.g. 440c0bae-c370-4b64-a8e5-0000ab006653)
- Deployment fails with 'InvalidResourceName' error (ci-40986653)
Source of Error
The error derives from the code in templates/workspace_services/azureml/user_resources/aml_compute/terraform/locals.tf:
aml_compute_id = "${local.short_service_id}${local.short_user_resource_id}"
aml_compute_instance_name = "ci-${local.aml_compute_id}"
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in templates/workspace_services/azureml/user_resources/aml_compute/terraform/locals.tf and reproduce the deployment using workspace and compute instance resource IDs ending in four digits. Trace how aml_compute_id and aml_compute_instance_name produce ci-40986653, then verify the deployment succeeds with valid Azure ML naming for those inputs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, terraform
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100