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

INTMDB-211: Add new advanced shard key options in global cluster resource #562

Merged
merged 10 commits into from
Sep 23, 2021

Conversation

abner-dou
Copy link
Contributor

Description

Added isCustomShardKeyHashed and isShardKeyUnique properties to RS and DS for Global_cluster

Link to any related issue(s):INTMDB-211

Type of change:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Documentation fix/enhancement

Required Checklist:

  • I have signed the MongoDB CLA
  • I have read the Terraform contribution guidelines
  • I have added tests that prove my fix is effective or that my feature works per HashiCorp requirements
  • I have added any necessary documentation (if appropriate)
  • I have run make fmt and formatted my code

Further comments

Tests:

--- PASS: TestAccResourceMongoDBAtlasGlobalCluster_basic (662.26s)
PASS
coverage: 8.3% of statements
ok github.com/mongodb/terraform-provider-mongodbatlas/mongodbatlas 664.729s coverage: 8.3% of statements
? github.com/mongodb/terraform-provider-mongodbatlas/version [no test files]

addManagedNamespace.IsCustomShardKeyHashed = pointy.Bool(isCustomShardKeyHashed.(bool))
}

if isShardKeyUnique, okShard := mn["is_shard_"]; okShard {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is incomplete right? is_shard_

addManagedNamespace.IsCustomShardKeyHashed = pointy.Bool(isCustomShardKeyHashed.(bool))
}

if isShardKeyUnique, okShard := mn["is_shard_"]; okShard {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this being tested? it seems it is incomplete

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, It was incomplete

Copy link
Collaborator

@themantissa themantissa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Collaborator

@andreaangiolillo andreaangiolillo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@abner-dou abner-dou merged commit 57c0fa5 into master Sep 23, 2021
@thetonymaster thetonymaster deleted the INTMDB-211 branch September 27, 2021 15:44
abner-dou added a commit that referenced this pull request Oct 7, 2021
…urce (#562)

* Added is_custom_shard_key_hashed and is_shard_key_unique to cluster config

* fixed tests

* added documentation

* fix dep

* fixes

* go.mod changed

* fixed test format

* added tests

* fix lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants