Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Documentation issue #2240

Open
2 tasks done
AdamMAtWork opened this issue May 7, 2024 · 5 comments
Open
2 tasks done

[Bug]: Documentation issue #2240

AdamMAtWork opened this issue May 7, 2024 · 5 comments
Labels

Comments

@AdamMAtWork
Copy link

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
Copy link
Contributor

github-actions bot commented May 7, 2024

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.

Copy link
Contributor

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!

@github-actions github-actions bot added the stale label May 13, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 16, 2024
@marcosuma marcosuma reopened this May 16, 2024
@marcosuma
Copy link
Collaborator

Thanks for opening this issue with us @AdamMAtWork , let me have a look at it and get back to you.

@marcosuma
Copy link
Collaborator

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.

Copy link
Contributor

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!

@github-actions github-actions bot added the stale label May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants