chore: install acc tests external providers from a mirror

What does this MR do?

Acceptance tests that use ExternalProviders download old gitlabhq/gitlab and hashicorp/time releases from the Terraform Registry (which redirects to GitHub) during terraform init. A slow or throttled request fails the test and the whole job.

This MR builds those releases into the CI image instead:

  • .gitlab/ci/external-providers.txt lists the provider versions the tests need.
  • The Dockerfile downloads them into /usr/share/terraform/providers when the image is built.
  • .gitlab/ci/terraformrc makes Terraform install these two providers only from that directory. It's enabled in .testacc via TF_CLI_CONFIG_FILE, so local test runs are unchanged.
  • TestExternalProvidersAreMirrored (unit test) fails if any ExternalProviders source or version constraint isn't covered by the list. That way a missing entry is caught in go:test, not partway through the 2-hour acceptance job.

How to verify

  • TestAccGitlabGroupLabel_schemaMigrationV1toV2 passes with no requests to the registry or GitHub in Terraform's debug log.
  • With networking disabled in the image, terraform init installs the expected version for each constraint.

Closes #6875 (closed)

Merge request reports

Loading
Loading