The gitlab_managed_license
resource allows to manage the lifecycle of a managed license.
Upstream API: GitLab REST API docs
resource "gitlab_project" "foo" {
name = "example project"
description = "Lorem Ipsum"
visibility_level = "public"
}
resource "gitlab_managed_license" "mit" {
project = gitlab_project.foo.id
name = "MIT license"
approval_status = "allowed"
}
approval_status
(String) The approval status of the license. Valid values are: approved
, blacklisted
, allowed
, denied
. "approved" and "blacklisted"
have been deprecated in favor of "allowed" and "denied"; use "allowed" and "denied" for GitLab versions 15.0 and higher.
Prior to version 15.0 and after 14.6, the values are equivalent.name
(String) The name of the managed license (I.e., 'Apache License 2.0' or 'MIT license')project
(String) The ID of the project under which the managed license will be created.id
(String) The ID of this resource.Import is supported using the following syntax:
# You can import this resource with an id made up of `{project-id}:{license-id}`, e.g.
terraform import gitlab_managed_license.foo 1:2