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

feat: Add support for using DEV/QA for mongodbgov #2009

Merged
merged 4 commits into from Mar 12, 2024

Conversation

maastha
Copy link
Collaborator

@maastha maastha commented Mar 11, 2024

Description

Currently if is_mongodbgov_cloud flag is set in the provider config, it will always call mongodbgov production, even if base_url is set to use dev/QA env of mongodbgov. This PR will let the user/developer specify base_url correctly when is_mongodbgov_cloud flag is set.

Link to any related issue(s):

Type of change:

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

Required Checklist:

  • I have signed the MongoDB CLA
  • I have read the contribution guidelines
  • I have checked that this change does not generate any credentials and that they are NOT accidentally logged anywhere.
  • 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
  • If changes include deprecations or removals, I defined an isolated PR with a relevant title as it will be used in the auto-generated changelog.
  • If changes include removal or addition of 3rd party GitHub actions, I updated our internal document. Reach out to the APIx Integration slack channel to get access to the internal document.

Further comments

@maastha maastha marked this pull request as ready for review March 11, 2024 16:51
@maastha maastha requested a review from a team as a code owner March 11, 2024 16:51
@maastha maastha changed the title feat: Add support for using dev/qa URLs for mongodbgov feat: Add support for using dev/qa for mongodbgov Mar 11, 2024
@maastha maastha changed the title feat: Add support for using dev/qa for mongodbgov feat: Add support for using DEV/QA for mongodbgov Mar 11, 2024
@lantoli
Copy link
Member

lantoli commented Mar 11, 2024

LGTM, one question asked offline

@maastha maastha marked this pull request as draft March 11, 2024 17:51
@maastha maastha marked this pull request as ready for review March 12, 2024 09:46
@maastha
Copy link
Collaborator Author

maastha commented Mar 12, 2024

@lantoli updated based on discussion

Copy link
Member

@lantoli lantoli left a comment

Choose a reason for hiding this comment

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

LGTM, just a small suggestion

Co-authored-by: Leo Antoli <430982+lantoli@users.noreply.github.com>
Copy link
Collaborator

@AgustinBettati AgustinBettati left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines +492 to +494
func isGovBaseURLConfiguredForProvider(data *tfMongodbAtlasProviderModel) bool {
return isGovBaseURLConfigured(data.BaseURL.ValueString())
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: would remove this function replacing for the inner call directly

Comment on lines +580 to +582
func isGovBaseURLConfiguredForSDK2Provider(d *schema.ResourceData) bool {
return isGovBaseURLConfigured(d.Get("base_url").(string))
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here

@maastha maastha merged commit c6e4a0d into master Mar 12, 2024
43 of 44 checks passed
@maastha maastha deleted the gov-dev-base-url-support branch March 12, 2024 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants