mongodb / terraform-provider-mongodbatlas

Terraform MongoDB Atlas Provider: Deploy, update, and manage MongoDB Atlas infrastructure as code through HashiCorp Terraform
https://registry.terraform.io/providers/mongodb/mongodbatlas
Mozilla Public License 2.0
230 stars 167 forks source link

chore: Supports running cloud gov tests in CI #2302

Closed EspenAlbert closed 1 month ago

EspenAlbert commented 1 month ago

Description

Supports running cloud gov tests in CI.

Follow-up PR with a gov migration and acceptance test: #2291

Solution discussion

Uses a fully configured provider when using cloud-gov, why?

  1. Enables running gov tests in the same process as cloud-dev/cloud-qa tests
  2. Keeps the CI simple with a single acceptance-tests job and we can run the tests often

Alternatives considered:

  1. Modify env-vars for each cloud-gov test run (similar to t.Setenv("MONGODB_ATLAS_LAST_VERSION", "1.2.3") but with MONGODB_ATLAS_PRIVATE/PUBLIC_KEY/BASE_URL++

    • Does not allow running tests in parallel since env-vars would impact the "normal" acceptance tests
  2. Run a separate process/workflow

    • Would require different CI workflows, but config would be a bit shorter as the provider would read env-vars directly

Link to any related issue(s): CLOUDP-250271

Type of change:

Required Checklist:

Further comments