Skip to content

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

@setuc

Description

@setuc

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:
    terraform_st_resource_group: rg-$(namespace)-$(postfix)$(environment)-tf-state
    terraform_st_storage_account: st$(namespace)$(postfix)$(environment)tfstate

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions