akshaykarle / terraform-provider-mongodbatlas

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

Can't create cluster on Azure due to missing required attribute `diskTypeName` #21

Open Brian-Gaffney opened 6 years ago

Brian-Gaffney commented 6 years ago

diskTypeName is a required attribute when deploying a non-shared (M10 and above) cluster to Azure however it's not supported by this TF provider.

When trying to deploy a non-shared cluster instance to Azure the MongoDB Atlas API returns a 400 error with the following message:

The required attribute diskTypeName was not specified

Is it possible to add diskTypeName as a supported attribute of this provider?

Thanks.


API documentation explaining the diskTypeName attribute: https://docs.atlas.mongodb.com/reference/api/clusters-modify-one/index.html


Example .tf file that will trigger the error:

provider "mongodbatlas" {
    username = "fake@fake.com"
    api_key = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

resource "mongodbatlas_cluster" "db_cluster" {
    name = "tf-db-cluster"
    group = "xxxxxxxxxxxxxxx"
    mongodb_major_version = "3.6"
    provider_name = "AZURE"
    region = "US_EAST_2"
    size = "M20"
    backup = false
    disk_gb_enabled = false
}
akshaykarle commented 6 years ago

Thanks for reporting that @Brian-Gaffney . Will look into this soon, but a PR is welcome if you want to give it a shot :)