terraform-provider-mongodbatlas icon indicating copy to clipboard operation
terraform-provider-mongodbatlas copied to clipboard

Projects Data Source inaccurate documentation

Open ashraidiam opened this issue 2 years ago • 1 comments

Hello, this a documentation bug for the mongodbatlas_projects data source to return all projects. The resource is incorrectly documented. projects != project.

The correct documentation should be:


data "mongodbatlas_projects" "active_projects" {
  page_num = 1
  items_per_page = 5

}

Terraform CLI and Terraform MongoDB Atlas Provider Version

data "mongodbatlas_project" "active_projects" {
  page_num = 1
  items_per_page = 5

}

Terraform Configuration File

# Copy-paste your configuration info here

Steps to Reproduce

Create the resource as described above.

Expected Behavior

Data to be returned.

Actual Behavior

│ Error: Unsupported argument
│ 
│   on projects.tf line 18, in data "mongodbatlas_project" "active_projects":
│   18:   page_num = 1
│ 
│ An argument named "page_num" is not expected here.
╵
╷
│ Error: Unsupported argument
│ 
│   on projects.tf line 19, in data "mongodbatlas_project" "active_projects":
│   19:   items_per_page = 5
│ 
│ An argument named "items_per_page" is not expected here.

Debug Output

Crash Output

Additional Context

References

https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/data-sources/projects

ashraidiam avatar Oct 11 '22 11:10 ashraidiam

Great catch @ashraidiam. PR created and docs should be updated next week. https://github.com/mongodb/terraform-provider-mongodbatlas/pull/869

Zuhairahmed avatar Oct 12 '22 19:10 Zuhairahmed

Closing as PR has been merged https://github.com/mongodb/terraform-provider-mongodbatlas/pull/869

Zuhairahmed avatar Nov 07 '22 16:11 Zuhairahmed