Skip to content

Bug: Provider does not support alias #86

@bluemalkin

Description

@bluemalkin

It appears that the provider (using latest build) does not support alias.

provider "mongodbatlas" {
  alias = "operations-1"

  username = "xxx"
  api_key  = "xxx"
}

resource "mongodbatlas_project" "operations-1" {
  provider = "mongodbatlas.operations-1"

  org_id = "xxx"
  name   = "Operations-1"
}

Results in:

terraform import mongodbatlas_project.operations-1 xxxx
mongodbatlas_project.operations-1: Importing from ID "xxxxx"...
mongodbatlas_project.operations-1: Import complete!
  Imported mongodbatlas_project (ID: xxxx)
mongodbatlas_project.operations-1: Refreshing state... (ID: xxxx)

Error: mongodbatlas_project.operations-1 (import id: xxxx): 1 error(s) occurred:

* import mongodbatlas_project.operations-1 result: xxxx: mongodbatlas_project.operations-1: Error reading MongoDB Project xxx: MongoDB Atlas: 401 User cannot access this group.

If I remove alias = "operations-1" and provider = "mongodbatlas.operations-1" lines it works.

Really need this to work as I'm managing multiple projects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions