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

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

Open
setuc opened this issue Jun 15, 2022 · 0 comments
Open
Assignees
Labels
🪲bug Something isn't working 🏗️infra

Comments

@setuc
Copy link
Collaborator

setuc commented Jun 15, 2022

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
@setuc setuc added the 🪲bug Something isn't working label Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪲bug Something isn't working 🏗️infra
Projects
None yet
Development

No branches or pull requests

2 participants