Skip to content

dhoppeIT/terraform-gitlab-project_mirror

Repository files navigation

terraform-gitlab-project_mirror

Terraform module to manage the following Twingate resources:

  • gitlab_project_mirror

Usage

Copy and paste the following code snippet to your Terraform configuration, specify the required variables and run the command terraform init.

module "gitlab_group" {
  source  = "gitlab.com/terraform-child-modules-48151/terraform-gitlab-group/local"
  version = "1.1.4"

  name = "Example (group)"
  path = "example-group-48165"
}

module "gitlab_project" {
  source  = "gitlab.com/terraform-child-modules-48151/terraform-gitlab-project/local"
  version = "1.1.5"

  name = "example-project"

  description  = "Example (project)"
  namespace_id = module.gitlab_group.id
}

module "gitlab_project_mirror" {
  source  = "gitlab.com/terraform-child-modules-48151/terraform-gitlab-project-mirror/local"
  version = "1.1.0"

  project = module.gitlab_project.id
  url     = "https://username:[email protected]/example-project"
}

Requirements

Name Version
terraform >= 1.0
gitlab ~> 18.0

Providers

Name Version
gitlab ~> 18.0

Modules

No modules.

Resources

Name Type
gitlab_project_mirror.this resource

Inputs

Name Description Type Default Required
auth_method Determines the mirror authentication method string "password" no
enabled Determines if the mirror is enabled bool true no
keep_divergent_refs Determines if divergent refs are skipped bool false no
only_protected_branches Determines if only protected branches are mirrored bool false no
project The ID of the project string n/a yes
url The URL of the remote repository to be mirrored string n/a yes

Outputs

Name Description
id The ID of the project mirror
mirror_id The ID of the mirror

Authors

Created and maintained by Dennis Hoppe.

License

Apache 2 licensed. See LICENSE for full details.