Closed yashwanthkalva closed 5 years ago
changed to M0 as I am using atlas free tier now stuck at
mongodbatlas_container.test: 1 error(s) occurred:
mongodbatlas_container.test: Error creating MongoDB Container: MongoDB Atlas: 400 The required attribute regionName was not specified.
mongodbatlas_cluster.test: 1 error(s) occurred:
mongodbatlas_cluster.test: Error creating MongoDB Cluster: MongoDB Atlas: 400 Invalid attribute instanceSizeName specified.
Can we use these tf scripts examples if we are on atlas free tier ?
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/
Closing this since @dpiddockcmp already covered this
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.
@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.
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" }
mongodbatlas_container.test: 1 error(s) occurred:
mongodbatlas_container.test: Error creating MongoDB Container: MongoDB Atlas: 400 The required attribute regionName was not specified.
mongodbatlas_cluster.test: 1 error(s) occurred:
mongodbatlas_cluster.test: Error creating MongoDB Cluster: MongoDB Atlas: 402 No payment information was found for group.