akshaykarle / terraform-provider-mongodbatlas

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

Errors while running terraform plan #87

Closed yashwanthkalva closed 5 years ago

yashwanthkalva commented 5 years ago

I was trying to run the "basic" example, fixed few other errors but not able to get what it is ,

region name is already specified in example

Create a Container

resource "mongodbatlas_container" "test" { group = "${mongodbatlas_project.test.id}" atlas_cidr_block = "10.0.0.0/21" provider_name = "AWS" region = "US_EAST_1" }

yashwanthkalva commented 5 years ago

changed to M0 as I am using atlas free tier now stuck at

mongodbatlas_container.test: 1 error(s) occurred:

yashwanthkalva commented 5 years ago

Can we use these tf scripts examples if we are on atlas free tier ?

dpiddockcmp commented 5 years ago

No. You cannot create or modify M0 clusters via the API. This is a limitation imposed by the Mongo service. https://docs.atlas.mongodb.com/reference/api/clusters-create-one/

akshaykarle commented 5 years ago

Closing this since @dpiddockcmp already covered this

ghost commented 5 years ago

I am getting one of the errors @yashwanthkalva got. I am using M10. I just today downloaded new version (switching from local MacOs to TFE build) and I am getting: * mongodbatlas_container.terraform: Error creating MongoDB Container: MongoDB Atlas: 400 The required attribute regionName was not specified.

However I have the region specified:

resource "mongodbatlas_container" "terraform" {
  depends_on = ["mongodbatlas_project.terraform"]
  group = "${mongodbatlas_project.terraform.id}"
  atlas_cidr_block = "${var.atlas_cidr}"
  provider_name = "AWS"
  region = "${var.atlas_region}"
}

The region variable contains EU_CENTRAL_1. The variable is then also passed to cluster, but cluster doesn't get created. This was working fine when I downloaded the provider ~2 months ago.

gnarea commented 4 years ago

@janlud, running into the same issue myself. I had some free credits so I thought that'd be enough, but I had to add my credit card to make it work.