You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Atlas project successfully imported into Terraform state:
....
Import successful!
The resources that were imported are shown above. These resources are now in
your Terraform state and will henceforth be managed by Terraform.
Actual Behavior
401 (request "Unauthorized") error.
Debug Output
mongodbatlas_project.atlas-test-project-imported: Importing from ID "5a7xxxxx"...
mongodbatlas_project.atlas-test-project-imported: Import prepared!
Prepared mongodbatlas_project for import
mongodbatlas_project.atlas-test-project-imported: Refreshing state... [id=5a7xxxxx]
Error: error getting project(5a7xxxxx): GET https://cloud.mongodb.com/api/atlas/v1.0/groups/5a7xxxxx: 401 (request "Unauthorized") You are not authorized for this resource.
Additional Context
Creating resources using the same Terraform provider (with the same api keys) works just fine.
Also, when trying to reproduce similar api call from curl, it seems to be working as well (please note 401 followed by 200, which I believe might be the cause of the original issue).
@michaljrk
As you confirmed, this is now working and you are not sure what really changed over the course of time since yesterday. Also, I could not repro this at my end and thus we decided to close this issue.
Terraform CLI and Terraform MongoDB Atlas Provider Version
Terraform Configuration File
Steps to Reproduce
terraform init
terraform import -var-file=input-vars.tfvars mongodbatlas_project.atlas-test-project-imported <project_id_from_point_2>
Expected Behavior
Atlas project successfully imported into Terraform state:
Actual Behavior
401 (request "Unauthorized")
error.Debug Output
Additional Context
Creating resources using the same Terraform provider (with the same api keys) works just fine.
Also, when trying to reproduce similar api call from
curl
, it seems to be working as well (please note 401 followed by 200, which I believe might be the cause of the original issue).References
#192
The text was updated successfully, but these errors were encountered: