terraform-provider-mongodbatlas
terraform-provider-mongodbatlas copied to clipboard
data "mongodbatlas_project" doesn't return name
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
-
terraform init
-
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
Thank you @JosephKelly - we'll take a look. Internal ticket INTMDB-351
@JosephKelly This is corrected in next release 1.4.4.
@JosephKelly release 1.4.4. it out. Thank you!