base_url required since (even for the public instance) v15.7.0
Bug Report
Since the new version of the provider, I have a merge request with the following changes:
terraform {
required_providers {
gitlab = {
source = "gitlabhq/gitlab"
- version = "3.20.0"
+ version = "15.7.0"
}
# plus other providers untouched
}
}
When the plan ran I got this error:
│ Error: Invalid provider configuration
│
│ Provider "registry.terraform.io/gitlabhq/gitlab" requires explicit
│ configuration. Add a provider block to the root module and configure the
│ provider's required arguments as described in the provider documentation.
│
The plan works if I define GITLAB_BASE_URL
to https://gitlab.com/api/v4/
.
Relevant Terraform Configuration
I use the public gitlab.com instance (therefor shouldn't need the base_url
) and configure the token via GITLAB_TOKEN
environment variable.
Relevant Log Output
Terraform v1.3.6
on linux_amd64
Initializing plugins and modules...
# lots of other resources getting refreshed
╷
│ Error: Invalid provider configuration
│
│ Provider "registry.terraform.io/gitlabhq/gitlab" requires explicit
│ configuration. Add a provider block to the root module and configure the
│ provider's required arguments as described in the provider documentation.
│
╵
╷
│ Error: No GitLab Base URL configured, either use the `base_url` provider argument or set it as `GITLAB_BASE_URL` environment variable
│
│ with provider["registry.terraform.io/gitlabhq/gitlab"],
│ on <empty> line 0:
│ (source code not available)
│
╵
Operation failed: failed running terraform plan (exit 1)
Additional Details
- GitLab Terraform Provider Version:
15.7.0
- GitLab Version:
gitlab.com
- Terraform Version:
1.3.6