Because the GitLab Provider has moved to GitLab.com, the release cadence and versioning has been aligned with the GitLab monthly self-managed release cadence starting with 15.7 (22nd Dec 2022).
The version bump from 3.20.0
to
15.7.0
introduced a few breaking changes,
which are described below.
The GitLab Provider upgraded to Terraform Protocol v6, which requires at least Terraform 1.0.
The token
Provider argument is now marked as
sensitive
.
This affects current Provider configurations, which read the token
value from another non-sensitive Terraform value,
like an output attribute or variable.
Because the variable "gitlab_token"
declaration doesn't mark the variable as sensitive
,
code like the following will break:
variable "gitlab_token" {
type = string
}
provider "gitlab" {
token = var.gitlab_token
}
There are two ways to resolve this issue:
If you have control over the token value, mark it as sensitive:
variable "gitlab_token" {
type = string
sensitive = true
}
provider "gitlab" {
token = var.gitlab_token
}
If you don't have control over the token value, use the
sensitive()
function to create
a sensitive copy of the value to use:
provider "gitlab" {
token = sensitive(some_other_module.gitlab_token)
}