akshaykarle / terraform-provider-mongodbatlas

Terraform provider for MongoDB Atlas
Mozilla Public License 2.0
122 stars 54 forks source link

Example and documentation not matching #104

Closed MarcWadai closed 5 years ago

MarcWadai commented 5 years ago

Terraform v0.12.9 provider.mongodbatlas v0.2.0

Error: Invalid resource type
  on config.tf line 65, in resource "mongodbatlas_ip_whitelist" "mini_goodeed":
  65: resource "mongodbatlas_ip_whitelist" "mini_goodeed" {

The provider provider.mongodbatlas does not support resource type
"mongodbatlas_ip_whitelist".

Error: Invalid resource type
  on config.tf line 72, in resource "mongodbatlas_container" "mini_goodeed":
  72: resource "mongodbatlas_container" "mini_goodeed" {
The provider provider.mongodbatlas does not support resource type
"mongodbatlas_container".

Error: Missing required argument
  on config.tf line 93, in resource "mongodbatlas_database_user" "mini_goodeed":
  93: resource "mongodbatlas_database_user" "mini_goodeed" {
The argument "database_name" is required, but no definition was found.

Error: Missing required argument
  on config.tf line 93, in resource "mongodbatlas_database_user" "mini_goodeed":
  93: resource "mongodbatlas_database_user" "mini_goodeed" {
The argument "project_id" is required, but no definition was found.

Error: Unsupported argument
  on config.tf line 96, in resource "mongodbatlas_database_user" "mini_goodeed":
  96:   database = "admin"
An argument named "database" is not expected here.

Error: Unsupported argument
  on config.tf line 97, in resource "mongodbatlas_database_user" "mini_goodeed":
  97:   group = "${mongodbatlas_project.mini_goodeed.id}"
An argument named "group" is not expected here.

Error: Unsupported argument
  on config.tf line 99, in resource "mongodbatlas_database_user" "mini_goodeed":
  99:     name = "readWrite"
An argument named "name" is not expected here.

Error: Unsupported argument
  on config.tf line 100, in resource "mongodbatlas_database_user" "mini_goodeed":
 100:     database = "admin"
An argument named "database" is not expected here

I tried running the basic example and received those error. Then the documentation and it was indeed different from the examples

themantissa commented 5 years ago

Hi @MarcWadai - this part, provider.mongodbatlas v0.2.0, tells us that this is the official provider MongoDB has been working on and that is documented on the Terraform web site (https://www.terraform.io/docs/providers/mongodbatlas/index.html) and is automatically loaded by terraform init. Due to naming conventions the names are the same, which can be confusing. This is a preexisting community written provider.