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-200: Fixes a bug about updating a region name with GCP #463

Merged
merged 4 commits into from
Jun 4, 2021

Conversation

coderGo93
Copy link
Contributor

Description

Fixes the bug of provider_region_name are recognized but not applied properly

Link to any related issue(s):

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

@coderGo93 coderGo93 requested a review from leofigy May 20, 2021 22:49
@coderGo93 coderGo93 self-assigned this May 20, 2021
@coderGo93 coderGo93 requested a review from themantissa May 20, 2021 22:50
@coderGo93 coderGo93 changed the title INTMDB-200-2: Fixes a bug about updating a region name with GCP INTMDB-200: Fixes a bug about updating a region name with GCP May 20, 2021
@leofigy leofigy added the V1 label May 25, 2021
@leofigy leofigy requested a review from abner-dou May 27, 2021 05:16
Copy link
Contributor

@abner-dou abner-dou left a comment

Choose a reason for hiding this comment

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

LGTM

@themantissa themantissa requested review from a team and threebee and removed request for a team June 1, 2021 21:44
@threebee threebee requested a review from andreaangiolillo June 2, 2021 11:04
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.

I have just some questions : )

mongodbatlas/resource_mongodbatlas_cluster.go Show resolved Hide resolved
replaceRegion := ""
originalRegion := ""

if okPRName && d.Get("provider_name").(string) == "GCP" && cast.ToString(d.Get("cluster_type")) == "REPLICASET" {
Copy link
Collaborator

Choose a reason for hiding this comment

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

[q] I am not sure why we have the check only for REPLICASET

Copy link
Contributor Author

@coderGo93 coderGo93 Jun 3, 2021

Choose a reason for hiding this comment

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

For my understanding, since the user created a basic cluster, it seems in response it creates automatically with cluster type REPLICASET along the replication specs , this why I added validation, for this special scenario

mongodbatlas/resource_mongodbatlas_cluster.go Show resolved Hide resolved
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

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 - looks ready to merge.

@coderGo93 coderGo93 merged commit 8b22df8 into master Jun 4, 2021
@coderGo93 coderGo93 deleted the INTMDB-200-2 branch June 4, 2021 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants