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

[BUG] - Can't deploy on azure if project name includes a dash #2405

Open
Adam-D-Lewis opened this issue Apr 17, 2024 · 2 comments
Open

[BUG] - Can't deploy on azure if project name includes a dash #2405

Adam-D-Lewis opened this issue Apr 17, 2024 · 2 comments
Labels
provider: Azure type: bug 🐛 Something isn't working

Comments

@Adam-D-Lewis
Copy link
Member

Describe the bug

I tried deploying on Azure with the project name dd-nebari and the deployment had an error. I didn't copy it but the error mentioned this line. It seems likely that using "a" as the escape character makes it impossible to tell if other "a" characters are escape characters or not, but I haven't tracked this down specifically.

Expected behavior

No error

OS and architecture in which you are running Nebari

Linux x86-64

How to Reproduce the problem?

See above

Command output

2024.3.3

Versions and dependencies used.

No response

Compute environment

Azure

Integrations

No response

Anything else?

No response

@Adam-D-Lewis Adam-D-Lewis added type: bug 🐛 Something isn't working needs: triage 🚦 Someone needs to have a look at this issue and triage labels Apr 17, 2024
@Adam-D-Lewis Adam-D-Lewis added provider: Azure and removed needs: triage 🚦 Someone needs to have a look at this issue and triage labels Apr 17, 2024
@Adam-D-Lewis Adam-D-Lewis changed the title [BUG] - Can't deploy on azure if project name includes a dash and the letter a [BUG] - Can't deploy on azure if project name includes a dash Apr 22, 2024
@Adam-D-Lewis
Copy link
Member Author

Adam-D-Lewis commented Apr 22, 2024

Just tried to deploy Nebari on Azure with the project name ne-bri and I get the following error just after the terraform state resource group, storage container, and storage account are created.

The actual resource group is named nebridevxhz2, but Nebari seems to be looking for nea2Dbridevxhz2.

[terraform]: Plan: 3 to add, 0 to change, 0 to destroy.
[terraform]: module.terraform-state.azurerm_resource_group.terraform-state-resource-group: Creating...
[terraform]: module.terraform-state.azurerm_resource_group.terraform-state-resource-group: Creation complete after 1s [id=/subscriptions/901d2965-5cce-4799-aa15-44991169568b/resourceGroups/ne-bri-dev-state]
[terraform]: module.terraform-state.azurerm_storage_account.terraform-state-storage-account: Creating...
[terraform]: module.terraform-state.azurerm_storage_account.terraform-state-storage-account: Still creating... [10s elapsed]
[terraform]: module.terraform-state.azurerm_storage_account.terraform-state-storage-account: Still creating... [20s elapsed]
[terraform]: module.terraform-state.azurerm_storage_account.terraform-state-storage-account: Creation complete after 23s [id=/subscriptions/901d2965-5cce-4799-aa15-44991169568b/resourceGroups/ne-bri-dev-state/providers/Microsoft.Storage/storageAccounts/nebridevxhz2]
[terraform]: module.terraform-state.azurerm_storage_container.storage_container: Creating...
[terraform]: module.terraform-state.azurerm_storage_container.storage_container: Creation complete after 0s [id=https://nebridevxhz2.blob.core.windows.net/ne-bri-dev-state]
[terraform]: 
[terraform]: Apply complete! Resources: 3 added, 0 changed, 0 destroyed.
[terraform]: [terraform]: 
[terraform]: Initializing the backend...
[terraform]: Upgrading modules...
[terraform]: - kubernetes in modules/kubernetes
[terraform]: - registry in modules/registry
[terraform]: ╷
[terraform]: │ Error: Failed to get existing workspaces: Error retrieving keys for Storage Account "nea2Dbridevxhz2": storage.AccountsClient#ListKeys: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: Service returned an error. Status=404 Code="ResourceNotFound" Message="The Resource 'Microsoft.Storage/storageAccounts/nea2Dbridevxhz2' under resource group 'ne-bri-dev-state' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"

@Adam-D-Lewis
Copy link
Member Author

The issue is that we mutate the project_name to get the storage account name (e.g. strip dashes), but we create the storage account in a different place from where we read the storage account name and we don't apply the same mutation when we're creating the storage account as we do when we're reading (terraform importing) the storage class name.

So with a project name of ne-bri. we end up creating a storage account called nebridevxhz2, but then Nebari looks for a storage account called nea2Dbridevxhz2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
provider: Azure type: bug 🐛 Something isn't working
Projects
Status: New 🚦
Development

Successfully merging a pull request may close this issue.

1 participant