nebari icon indicating copy to clipboard operation
nebari copied to clipboard

[BUG] - AWS resource group doesn't follow the project-namespace convention

Open sblair-metrostar opened this issue 2 years ago • 1 comments

Describe the bug

It seems that everything created in AWS by Nebari follows the project-namespace naming convention except for the resource group. Assuming this convention was established to allow for multiple environments with the same project name but different namespaces to co-exist, this exception creates a conflict when deploying the second.

Expected behavior

Should be able to create two environments of the same project with different namespaces in AWS.

OS and architecture in which you are running Nebari

Linux, x64

How to Reproduce the problem?

Create two Nebari AWS deployments in the same account with the following configurations:

provider: aws
namespace: one
nebari_version: 2023.11.1
project_name: <project name>
provider: aws
namespace: two
nebari_version: 2023.11.1
project_name: <project name>

Command output

[terraform]: â•·
[terraform]: │ Error: error creating resource group: BadRequestException: Cannot create group: group already exists
[terraform]: │ 
[terraform]: │   with module.accounting.aws_resourcegroups_group.main,
[terraform]: │   on modules/accounting/main.tf line 1, in resource "aws_resourcegroups_group" "main":
[terraform]: │    1: resource "aws_resourcegroups_group" "main" {
[terraform]: │

Versions and dependencies used.

Nebari: 2023.11.1

Compute environment

AWS

Integrations

No response

Anything else?

No response

sblair-metrostar avatar Dec 01 '23 19:12 sblair-metrostar

Thanks for opening the issue @sblair-metrostar.

Assuming this convention was established to allow for multiple environments with the same project name but different namespaces to co-exist.

I believe you'd like to deploy multiple Nebari deployments on a single AKS cluster. It seems that with both deployments, you are using the aws provider. This should be possible, and we have some docs on this here, but the 2nd deployment would use the existing provider.

Does the method in the example in the docs work for you?

Adam-D-Lewis avatar May 21 '24 15:05 Adam-D-Lewis