The gitlab_project_mirror
resource allows to manage the lifecycle of a project mirror.
This is for pushing changes to a remote repository. Pull Mirroring can be configured using a combination of the import_url, mirror, and mirror_trigger_builds properties on the gitlab_project resource.
Upstream API: GitLab REST API docs
resource "gitlab_project_mirror" "foo" {
project = "1"
url = "https://username:password@github.com/org/repository.git"
}
project
(String) The id of the project.url
(String, Sensitive) The URL of the remote repository to be mirrored.enabled
(Boolean) Determines if the mirror is enabled.keep_divergent_refs
(Boolean) Determines if divergent refs are skipped.only_protected_branches
(Boolean) Determines if only protected branches are mirrored.id
(String) The ID of this resource.mirror_id
(Number) Mirror ID.Import is supported using the following syntax:
# GitLab project mirror can be imported using an id made up of `project_id:mirror_id`, e.g.
terraform import gitlab_project_mirror.foo "12345:1337"