mlops-project-template icon indicating copy to clipboard operation
mlops-project-template copied to clipboard

The suffix tfstate/tf-state is used as is instead of it being a variable.

Open setuc opened this issue 3 years ago • 0 comments

The names of the storage and the resource group end up as prodtfstate and then results in an error because the storage name now is greater than 24 characters. See the steps below to reproduce. The config yaml required lines are as below

  namespace: mlopsv2hez
  postfix: 0918
  location: westus
  environment: prod
  enable_aml_computecluster: true

Running the pipeline with the above configuration results in the following error. Mostly due to the name being 27 characters instead of it limiting to 24 characters.

ERROR: (AccountNameInvalid) stmlopsv2hez0918prodtfstate is not a valid storage account name. Storage account name must be between 3 and 24 characters in length and use numbers and lower-case letters only.

Code: AccountNameInvalid

Message: stmlopsv2hez0918prodtfstate is not a valid storage account name. Storage account name must be between 3 and 24 characters in length and use numbers and lower-case letters only.

##[error]Script failed with exit code: 1

Potential fixes:

  1. Use only the first 24 characters
  2. Warn the user that the storage length is greater than 24 characters.
  3. Remove the tf-state from the Terrafrom code. Check the lines below: https://github.com/Azure/mlops-project-template/blob/f29fd86388d595401f7654ab6b6273766f912e49/config-infra-prod.yml#L31-L32

setuc avatar Jun 15 '22 05:06 setuc