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

data "mongodbatlas_project" doesn't return name #788

Closed
JosephKelly opened this issue Jul 14, 2022 · 3 comments
Closed

data "mongodbatlas_project" doesn't return name #788

JosephKelly opened this issue Jul 14, 2022 · 3 comments

Comments

@JosephKelly
Copy link

JosephKelly commented Jul 14, 2022

When using mongodbatlas_project data, searching by project_id, the project name is not included in the terraform data object. The documentation lists it as an attribute.

Terraform CLI and Terraform MongoDB Atlas Provider Version

Terraform v1.2.5
issue with both:
- mongodb/mongodbatlas v1.4.2
- mongodb/mongodbatlas v1.4.1

Terraform Configuration File

terraform {
  required_providers {
    mongodbatlas = {
      source  = "mongodb/mongodbatlas"
      version = "~> 1"
    }
  }
}
variable "project_id" {
  type        = string
  description = "MongoDB Atlas Project ID"
}
data "mongodbatlas_project" "project" {
  project_id = var.project_id
}

output "project_name" {
  value = data.mongodbatlas_project.project.name
  description = "(Expected) Name of the MongoDB Atlas Cluster"
}

Steps to Reproduce

  1. terraform init
  2. terraform apply -var project_id=$ANY_PROJECT_ID

Expected Behavior

Expected output available, e.g.

project_name = _[name of the project as reported from API call]_

Actual Behavior

NO OUTPUT as data.mongodbatlas_project.project.name is null

@themantissa themantissa changed the title data "mongodbatlas_project" doesn't include name data "mongodbatlas_project" doesn't return name Jul 19, 2022
@themantissa
Copy link
Collaborator

Thank you @JosephKelly - we'll take a look. Internal ticket INTMDB-351

@martinstibbe
Copy link
Contributor

martinstibbe commented Aug 2, 2022

@JosephKelly This is corrected in next release 1.4.4.

@themantissa
Copy link
Collaborator

@JosephKelly release 1.4.4. it out. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants