I am not able to figure out below in Terraform (>= 0.13) using MongoDB Atlas provider (version >= 0.9.1)
How to set below 2 properties. Did a lot of google search with no luck
As per the documentation here: https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/resources/cluster
I would like to set below 2 properties:
providerSettings.autoScaling.compute.maxInstanceSize
providerSettings.autoScaling.compute.minInstanceSize
I have not tried above keys as it has . in it
tried below with no luck
providerAutoScalingComputeMaxInstanceSize = "M20"
providerAutoScalingComputeMinInstanceSize = "M10"
provider_autoScaling_compute_maxInstanceSize = "M20"
provider_autoScaling_compute_minInstanceSize = "M10"
On terraform plan. I see error:
Error: Unsupported argument
on .terraform/modules/mongodb_test_b/main.tf line 10, in resource "mongodbatlas_cluster" "mongodbatlas_cluster":
10: providerAutoScalingComputeMaxInstanceSize = var.providerAutoScalingComputeMaxInstanceSize
An argument named "providerAutoScalingComputeMaxInstanceSize" is not expected
here.
Error: Unsupported argument
on .terraform/modules/mongodb_test_b/main.tf line 12, in resource "mongodbatlas_cluster" "mongodbatlas_cluster":
12: providerAutoScalingComputeMinInstanceSize = var.providerAutoScalingComputeMinInstanceSize
An argument named "providerAutoScalingComputeMinInstanceSize" is not expected
here.
Code snippet
resource "mongodbatlas_cluster" "mongodbatlas_cluster" {
project_id = var.project_id
provider_name = var.provider_name
name = var.name
provider_instance_size_name = var.provider_instance_size_name
provider_disk_type_name = var.provider_disk_type_name
auto_scaling_compute_enabled = var.auto_scaling_compute_enabled
providerAutoScalingComputeMaxInstanceSize = var.providerAutoScalingComputeMaxInstanceSize
auto_scaling_compute_scale_down_enabled = var.auto_scaling_compute_scale_down_enabled
providerAutoScalingComputeMinInstanceSize = var.providerAutoScalingComputeMinInstanceSize
pit_enabled = var.pit_enabled
cluster_type = var.cluster_type
replication_specs {
num_shards = var.replication_specs_num_shards
regions_config {
region_name = var.region_name
electable_nodes = var.replication_specs_regions_config_electable_nodes
priority = var.replication_specs_regions_config_priority
read_only_nodes = var.replication_specs_regions_config_read_only_nodes
analytics_nodes = var.analytics_nodes
}
}
mongo_db_major_version = var.mongo_db_major_version
provider_backup_enabled = var.provider_backup_enabled
auto_scaling_disk_gb_enabled = var.auto_scaling_disk_gb_enabled
}
Any assistance. Much appreciated.