[Bug]: Documentation issue
AdamMAtWork opened this issue · 5 comments
Is there an existing issue for this?
- I have searched the existing issues
Provider Version
1.16.0
Terraform Version
n/a
Terraform Edition
Terraform Enterprise
Current Behavior
In the reference documentation, num_shards is labelled as (Required) but the description says to omit the value when cluster_type is REPLICASET.
When applying a cluster_type of REPLICASET, if num_shards is omitted, the following error is produced:
Error: Provider produced invalid plan
Provider "registry.terraform.io/mongodb/mongodbatlas" planned an invalid value for
module.mongodb_contiguous_cluster.module.contiguous_cluster.mongodbatlas_advanced_cluster.replicaset.replication_specs[0].num_shards: planned value cty.NumberIntVal(1) for a non-computed attribute.
This is a bug in the provider, which should be reported in the provider's own issue tracker.
I'd like to create a non-sharded, REPLICASET cluster, but the documentation is misleading.
Terraform configuration to reproduce the issue
TBD
Steps To Reproduce
TBD
Logs
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
Thanks for opening this issue! Please make sure you've followed our guidelines when opening the issue. In short, to help us reproduce the issue we need:
- Terraform configuration file used to reproduce the issue
- Terraform log files from the run where the issue occurred
- Terraform Atlas provider version used to reproduce the issue
- Terraform version used to reproduce the issue
- Confirmation if Terraform OSS, Terraform Cloud, or Terraform Enterprise deployment
The ticket CLOUDP-248007 was created for internal tracking.
This issue has gone 7 days without any activity and meets the project’s definition of "stale". This will be auto-closed if there is no new activity over the next 7 days. If the issue is still relevant and active, you can simply comment with a "bump" to keep it open, or add the label "not_stale". Thanks for keeping our repository healthy!
Thanks for opening this issue with us @AdamMAtWork , let me have a look at it and get back to you.
I've did a quick test and created
resource "mongodbatlas_advanced_cluster" "this" {
project_id = var.project_id
name = "advanced-cluster-0"
mongo_db_major_version = "6.0"
termination_protection_enabled = false
cluster_type = "REPLICASET"
replication_specs {
region_configs {
electable_specs {
instance_size = "M10"
node_count = 3
}
analytics_specs {
instance_size = "M10"
node_count = 1
}
provider_name = "AWS"
priority = 7
region_name = "US_EAST_1"
}
}
}
and verified that num_shards is effectively not needed and that the creation succeeds.
I haven't investigated about your error, but I am assuming you tried to specify the num_shards field for a REPLICASET and you got that error.
You are correct the documentation should be updated and be more clear.
Let me take an action at it.
This issue has gone 7 days without any activity and meets the project’s definition of "stale". This will be auto-closed if there is no new activity over the next 7 days. If the issue is still relevant and active, you can simply comment with a "bump" to keep it open, or add the label "not_stale". Thanks for keeping our repository healthy!