Is there an existing issue for this?
Provider Version
v2.9.0
Terraform Version
v1.14.8
Terraform Edition
Terraform Open Source (OSS)
Current Behavior
Atlas-side update completes successfully, but Terraform errors at the apply post-read:
Terraform configuration to reproduce the issue
Minimal reproducer (single-region Azure replica set with compute auto-scaling enabled). advanced_configuration.oplog_size_mb is intentionally not set in HCL:
resource "mongodbatlas_advanced_cluster" "this" {
project_id = var.project_id
name = "repro-rfp"
cluster_type = "REPLICASET"
mongo_db_major_version = "8.0"
backup_enabled = true
pit_enabled = true
advanced_configuration = {
minimum_enabled_tls_protocol = "TLS1_2"
}
replication_specs = [{
region_configs = [{
provider_name = "AZURE"
region_name = "US_WEST"
priority = 7
electable_specs = {
instance_size = "M50" # <-- changed to M40 in the second apply
node_count = 3
disk_size_gb = 1024 # <-- changed to 512 in the second apply
}
auto_scaling = {
compute_enabled = true
compute_scale_down_enabled = true
compute_min_instance_size = "M50" # <-- changed to M40
compute_max_instance_size = "M60" # <-- changed to M50
disk_gb_enabled = true
}
}]
}]
}
Steps To Reproduce
- Deploy the cluster via
terraform apply the config above.
- Change
electable_specs.instance_size, electable_specs.disk_size_gb, and the auto_scaling.compute_min/max_instance_size to the lower tier (e.g. M40/512/M40/M50).
terraform plan shows an in-place update; the diff for advanced_configuration is hidden / unchanged
terraform apply does the the cluster scale down but fails with the error in the end:
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to
│ mongodbatlas_advanced_cluster.this["production-rfp"], provider
│ "provider[\"registry.terraform.io/mongodb/mongodbatlas\"]" produced an
│ unexpected new value: .advanced_configuration.oplog_size_mb: was
│ cty.NumberIntVal(52429), but now cty.NumberIntVal(26215).
│
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.
╵
Logs
Code of Conduct
Is there an existing issue for this?
Provider Version
v2.9.0
Terraform Version
v1.14.8
Terraform Edition
Terraform Open Source (OSS)
Current Behavior
Atlas-side update completes successfully, but Terraform errors at the apply post-read:
Terraform configuration to reproduce the issue
Minimal reproducer (single-region Azure replica set with compute auto-scaling enabled).
advanced_configuration.oplog_size_mbis intentionally not set in HCL:Steps To Reproduce
terraform applythe config above.electable_specs.instance_size,electable_specs.disk_size_gb, and theauto_scaling.compute_min/max_instance_sizeto the lower tier (e.g. M40/512/M40/M50).terraform planshows an in-place update; the diff foradvanced_configurationis hidden / unchangedterraform applydoes the the cluster scale down but fails with the error in the end:Logs
Code of Conduct