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(Cloud Database): support offline restore for MongoDB EE PITR #4601

Merged

Conversation

alexhemard
Copy link
Collaborator

@alexhemard alexhemard commented Jun 1, 2023

  • Add support for offline_restore flag for MongoDB EE Point-in-Time Restores, used in a disaster recovery scenario.
  • Support for an alternative provider to use cross-region testing in acceptance tests.
  • Replaces the IcdDBRegion variable with a Region method, to reference the same defaults as the provider configuration

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccIBMMongoDBEnterpriseDatabaseInstancePITR'

...

=== RUN   TestAccIBMMongoDBEnterpriseDatabaseInstancePITR
=== PAUSE TestAccIBMMongoDBEnterpriseDatabaseInstancePITR
=== CONT  TestAccIBMMongoDBEnterpriseDatabaseInstancePITR
--- PASS: TestAccIBMMongoDBEnterpriseDatabaseInstancePITR (14068.91s)

$ make testacc TESTARGS='-run=TestAccIBMDatabaseInstancePostgresBasic|TestAccIBMDatabaseInstance_Etcd_Basic|TestAccIBMDatabaseInstance_Redis_Basic'

...

=== RUN   TestAccIBMDatabaseInstance_Etcd_Basic
=== PAUSE TestAccIBMDatabaseInstance_Etcd_Basic
=== RUN   TestAccIBMDatabaseInstancePostgresBasic
=== PAUSE TestAccIBMDatabaseInstancePostgresBasic
=== RUN   TestAccIBMDatabaseInstance_Redis_Basic
=== PAUSE TestAccIBMDatabaseInstance_Redis_Basic
=== CONT  TestAccIBMDatabaseInstance_Etcd_Basic
=== CONT  TestAccIBMDatabaseInstance_Redis_Basic
=== CONT  TestAccIBMDatabaseInstancePostgresBasic
--- PASS: TestAccIBMDatabaseInstance_Redis_Basic (966.60s)
--- PASS: TestAccIBMDatabaseInstance_Etcd_Basic (1103.58s)
--- PASS: TestAccIBMDatabaseInstancePostgresBasic (1321.67s)
PASS

@alexhemard alexhemard changed the title feature(Cloud Database): support offline restore for MongoDB EE feat(Cloud Database): support offline restore for MongoDB EE Jun 1, 2023
@alexhemard alexhemard changed the title feat(Cloud Database): support offline restore for MongoDB EE feat(Cloud Database): support offline restore for MongoDB EE PITR Jun 2, 2023
@alexhemard alexhemard marked this pull request as ready for review October 20, 2023 15:17
}

func Region() string {
region, _ := schema.MultiEnvDefaultFunc([]string{"IC_REGION", "IBMCLOUD_REGION", "BM_REGION", "BLUEMIX_REGION"}, "us-south")()
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe this function is replacing IcdDbRegion. Previously IcdDbRegion = os.Getenv("ICD_DB_REGION").
I don't see that env var in this list. Are we good here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This function replaces IcdDbRegion and will use the same defaults the provider uses to configure region.
see https://github.com/IBM-Cloud/terraform-provider-ibm/blob/master/ibm/provider/provider.go#L93

@obai-1 obai-1 merged commit cf3b4e2 into IBM-Cloud:master Nov 10, 2023
2 checks passed
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.

2 participants