The gitlab.ProjectPullMirror resource allows managing pull mirroring for GitLab projects.
This resource uses the dedicated pull mirror API endpoint which provides reliable configuration of pull mirroring after project creation.
Upstream API: GitLab REST API docs
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
// Basic pull mirror from GitHub
// Note: Unspecified options will use GitLab's defaults
const github = new gitlab.ProjectPullMirror("github", {
project: example.id,
url: "https://github.com/example/repo.git",
authUser: "github-username",
authPassword: githubToken,
});
// Pull mirror with explicit options
// Only specify options you want to control; omit others to use GitLab defaults
const advanced = new gitlab.ProjectPullMirror("advanced", {
project: example.id,
url: "https://github.com/example/repo.git",
enabled: true,
authUser: "github-username",
authPassword: githubToken,
mirrorTriggerBuilds: true,
onlyMirrorProtectedBranches: true,
mirrorOverwritesDivergedBranches: false,
});
// Pull mirror with branch regex (Premium/Ultimate)
const regex = new gitlab.ProjectPullMirror("regex", {
project: example.id,
url: "https://github.com/example/repo.git",
authUser: "github-username",
authPassword: githubToken,
mirrorBranchRegex: "^(main|develop|release/.*)$",
});
import pulumi
import pulumi_gitlab as gitlab
# Basic pull mirror from GitHub
# Note: Unspecified options will use GitLab's defaults
github = gitlab.ProjectPullMirror("github",
project=example["id"],
url="https://github.com/example/repo.git",
auth_user="github-username",
auth_password=github_token)
# Pull mirror with explicit options
# Only specify options you want to control; omit others to use GitLab defaults
advanced = gitlab.ProjectPullMirror("advanced",
project=example["id"],
url="https://github.com/example/repo.git",
enabled=True,
auth_user="github-username",
auth_password=github_token,
mirror_trigger_builds=True,
only_mirror_protected_branches=True,
mirror_overwrites_diverged_branches=False)
# Pull mirror with branch regex (Premium/Ultimate)
regex = gitlab.ProjectPullMirror("regex",
project=example["id"],
url="https://github.com/example/repo.git",
auth_user="github-username",
auth_password=github_token,
mirror_branch_regex="^(main|develop|release/.*)$")
package main
import (
"github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Basic pull mirror from GitHub
// Note: Unspecified options will use GitLab's defaults
_, err := gitlab.NewProjectPullMirror(ctx, "github", &gitlab.ProjectPullMirrorArgs{
Project: pulumi.Any(example.Id),
Url: pulumi.String("https://github.com/example/repo.git"),
AuthUser: pulumi.String("github-username"),
AuthPassword: pulumi.Any(githubToken),
})
if err != nil {
return err
}
// Pull mirror with explicit options
// Only specify options you want to control; omit others to use GitLab defaults
_, err = gitlab.NewProjectPullMirror(ctx, "advanced", &gitlab.ProjectPullMirrorArgs{
Project: pulumi.Any(example.Id),
Url: pulumi.String("https://github.com/example/repo.git"),
Enabled: pulumi.Bool(true),
AuthUser: pulumi.String("github-username"),
AuthPassword: pulumi.Any(githubToken),
MirrorTriggerBuilds: pulumi.Bool(true),
OnlyMirrorProtectedBranches: pulumi.Bool(true),
MirrorOverwritesDivergedBranches: pulumi.Bool(false),
})
if err != nil {
return err
}
// Pull mirror with branch regex (Premium/Ultimate)
_, err = gitlab.NewProjectPullMirror(ctx, "regex", &gitlab.ProjectPullMirrorArgs{
Project: pulumi.Any(example.Id),
Url: pulumi.String("https://github.com/example/repo.git"),
AuthUser: pulumi.String("github-username"),
AuthPassword: pulumi.Any(githubToken),
MirrorBranchRegex: pulumi.String("^(main|develop|release/.*)$"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
// Basic pull mirror from GitHub
// Note: Unspecified options will use GitLab's defaults
var github = new GitLab.ProjectPullMirror("github", new()
{
Project = example.Id,
Url = "https://github.com/example/repo.git",
AuthUser = "github-username",
AuthPassword = githubToken,
});
// Pull mirror with explicit options
// Only specify options you want to control; omit others to use GitLab defaults
var advanced = new GitLab.ProjectPullMirror("advanced", new()
{
Project = example.Id,
Url = "https://github.com/example/repo.git",
Enabled = true,
AuthUser = "github-username",
AuthPassword = githubToken,
MirrorTriggerBuilds = true,
OnlyMirrorProtectedBranches = true,
MirrorOverwritesDivergedBranches = false,
});
// Pull mirror with branch regex (Premium/Ultimate)
var regex = new GitLab.ProjectPullMirror("regex", new()
{
Project = example.Id,
Url = "https://github.com/example/repo.git",
AuthUser = "github-username",
AuthPassword = githubToken,
MirrorBranchRegex = "^(main|develop|release/.*)$",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.ProjectPullMirror;
import com.pulumi.gitlab.ProjectPullMirrorArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
// Basic pull mirror from GitHub
// Note: Unspecified options will use GitLab's defaults
var github = new ProjectPullMirror("github", ProjectPullMirrorArgs.builder()
.project(example.id())
.url("https://github.com/example/repo.git")
.authUser("github-username")
.authPassword(githubToken)
.build());
// Pull mirror with explicit options
// Only specify options you want to control; omit others to use GitLab defaults
var advanced = new ProjectPullMirror("advanced", ProjectPullMirrorArgs.builder()
.project(example.id())
.url("https://github.com/example/repo.git")
.enabled(true)
.authUser("github-username")
.authPassword(githubToken)
.mirrorTriggerBuilds(true)
.onlyMirrorProtectedBranches(true)
.mirrorOverwritesDivergedBranches(false)
.build());
// Pull mirror with branch regex (Premium/Ultimate)
var regex = new ProjectPullMirror("regex", ProjectPullMirrorArgs.builder()
.project(example.id())
.url("https://github.com/example/repo.git")
.authUser("github-username")
.authPassword(githubToken)
.mirrorBranchRegex("^(main|develop|release/.*)$")
.build());
}
}
resources:
# Basic pull mirror from GitHub
# Note: Unspecified options will use GitLab's defaults
github:
type: gitlab:ProjectPullMirror
properties:
project: ${example.id}
url: https://github.com/example/repo.git
authUser: github-username
authPassword: ${githubToken}
# Pull mirror with explicit options
# Only specify options you want to control; omit others to use GitLab defaults
advanced:
type: gitlab:ProjectPullMirror
properties:
project: ${example.id}
url: https://github.com/example/repo.git
enabled: true
authUser: github-username
authPassword: ${githubToken}
mirrorTriggerBuilds: true
onlyMirrorProtectedBranches: true
mirrorOverwritesDivergedBranches: false
# Pull mirror with branch regex (Premium/Ultimate)
regex:
type: gitlab:ProjectPullMirror
properties:
project: ${example.id}
url: https://github.com/example/repo.git
authUser: github-username
authPassword: ${githubToken}
mirrorBranchRegex: ^(main|develop|release/.*)$
Create ProjectPullMirror Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ProjectPullMirror(name: string, args: ProjectPullMirrorArgs, opts?: CustomResourceOptions);@overload
def ProjectPullMirror(resource_name: str,
args: ProjectPullMirrorArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ProjectPullMirror(resource_name: str,
opts: Optional[ResourceOptions] = None,
project: Optional[str] = None,
url: Optional[str] = None,
auth_password: Optional[str] = None,
auth_user: Optional[str] = None,
enabled: Optional[bool] = None,
mirror_branch_regex: Optional[str] = None,
mirror_overwrites_diverged_branches: Optional[bool] = None,
mirror_trigger_builds: Optional[bool] = None,
only_mirror_protected_branches: Optional[bool] = None)func NewProjectPullMirror(ctx *Context, name string, args ProjectPullMirrorArgs, opts ...ResourceOption) (*ProjectPullMirror, error)public ProjectPullMirror(string name, ProjectPullMirrorArgs args, CustomResourceOptions? opts = null)
public ProjectPullMirror(String name, ProjectPullMirrorArgs args)
public ProjectPullMirror(String name, ProjectPullMirrorArgs args, CustomResourceOptions options)
type: gitlab:ProjectPullMirror
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ProjectPullMirrorArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ProjectPullMirrorArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ProjectPullMirrorArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ProjectPullMirrorArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ProjectPullMirrorArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var projectPullMirrorResource = new GitLab.ProjectPullMirror("projectPullMirrorResource", new()
{
Project = "string",
Url = "string",
AuthPassword = "string",
AuthUser = "string",
Enabled = false,
MirrorBranchRegex = "string",
MirrorOverwritesDivergedBranches = false,
MirrorTriggerBuilds = false,
OnlyMirrorProtectedBranches = false,
});
example, err := gitlab.NewProjectPullMirror(ctx, "projectPullMirrorResource", &gitlab.ProjectPullMirrorArgs{
Project: pulumi.String("string"),
Url: pulumi.String("string"),
AuthPassword: pulumi.String("string"),
AuthUser: pulumi.String("string"),
Enabled: pulumi.Bool(false),
MirrorBranchRegex: pulumi.String("string"),
MirrorOverwritesDivergedBranches: pulumi.Bool(false),
MirrorTriggerBuilds: pulumi.Bool(false),
OnlyMirrorProtectedBranches: pulumi.Bool(false),
})
var projectPullMirrorResource = new ProjectPullMirror("projectPullMirrorResource", ProjectPullMirrorArgs.builder()
.project("string")
.url("string")
.authPassword("string")
.authUser("string")
.enabled(false)
.mirrorBranchRegex("string")
.mirrorOverwritesDivergedBranches(false)
.mirrorTriggerBuilds(false)
.onlyMirrorProtectedBranches(false)
.build());
project_pull_mirror_resource = gitlab.ProjectPullMirror("projectPullMirrorResource",
project="string",
url="string",
auth_password="string",
auth_user="string",
enabled=False,
mirror_branch_regex="string",
mirror_overwrites_diverged_branches=False,
mirror_trigger_builds=False,
only_mirror_protected_branches=False)
const projectPullMirrorResource = new gitlab.ProjectPullMirror("projectPullMirrorResource", {
project: "string",
url: "string",
authPassword: "string",
authUser: "string",
enabled: false,
mirrorBranchRegex: "string",
mirrorOverwritesDivergedBranches: false,
mirrorTriggerBuilds: false,
onlyMirrorProtectedBranches: false,
});
type: gitlab:ProjectPullMirror
properties:
authPassword: string
authUser: string
enabled: false
mirrorBranchRegex: string
mirrorOverwritesDivergedBranches: false
mirrorTriggerBuilds: false
onlyMirrorProtectedBranches: false
project: string
url: string
ProjectPullMirror Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ProjectPullMirror resource accepts the following input properties:
- Project string
- The ID or URL-encoded path of the project owned by the authenticated user.
- Url string
- The URL of the remote repository to mirror from. While the API call allows including username and password as basic authentication in the URL, this resourcedoes not for security and idempotency reasons. Use
auth_userandauth_passwordinstead. - Auth
Password string - Authentication password or token for the remote repository.
- Auth
User string - Authentication username for the remote repository.
- Enabled bool
- Enable or disable the pull mirror. Defaults to
true. - Mirror
Branch stringRegex - Regular expression for branches to mirror. Requires GitLab Premium or Ultimate. Cannot be used with
only_mirror_protected_branches. - Mirror
Overwrites boolDiverged Branches - Overwrite diverged branches on the target project.
- Mirror
Trigger boolBuilds - Trigger CI/CD pipelines when the mirror updates.
- Only
Mirror boolProtected Branches - Mirror only protected branches. Cannot be used with
mirror_branch_regex.
- Project string
- The ID or URL-encoded path of the project owned by the authenticated user.
- Url string
- The URL of the remote repository to mirror from. While the API call allows including username and password as basic authentication in the URL, this resourcedoes not for security and idempotency reasons. Use
auth_userandauth_passwordinstead. - Auth
Password string - Authentication password or token for the remote repository.
- Auth
User string - Authentication username for the remote repository.
- Enabled bool
- Enable or disable the pull mirror. Defaults to
true. - Mirror
Branch stringRegex - Regular expression for branches to mirror. Requires GitLab Premium or Ultimate. Cannot be used with
only_mirror_protected_branches. - Mirror
Overwrites boolDiverged Branches - Overwrite diverged branches on the target project.
- Mirror
Trigger boolBuilds - Trigger CI/CD pipelines when the mirror updates.
- Only
Mirror boolProtected Branches - Mirror only protected branches. Cannot be used with
mirror_branch_regex.
- project String
- The ID or URL-encoded path of the project owned by the authenticated user.
- url String
- The URL of the remote repository to mirror from. While the API call allows including username and password as basic authentication in the URL, this resourcedoes not for security and idempotency reasons. Use
auth_userandauth_passwordinstead. - auth
Password String - Authentication password or token for the remote repository.
- auth
User String - Authentication username for the remote repository.
- enabled Boolean
- Enable or disable the pull mirror. Defaults to
true. - mirror
Branch StringRegex - Regular expression for branches to mirror. Requires GitLab Premium or Ultimate. Cannot be used with
only_mirror_protected_branches. - mirror
Overwrites BooleanDiverged Branches - Overwrite diverged branches on the target project.
- mirror
Trigger BooleanBuilds - Trigger CI/CD pipelines when the mirror updates.
- only
Mirror BooleanProtected Branches - Mirror only protected branches. Cannot be used with
mirror_branch_regex.
- project string
- The ID or URL-encoded path of the project owned by the authenticated user.
- url string
- The URL of the remote repository to mirror from. While the API call allows including username and password as basic authentication in the URL, this resourcedoes not for security and idempotency reasons. Use
auth_userandauth_passwordinstead. - auth
Password string - Authentication password or token for the remote repository.
- auth
User string - Authentication username for the remote repository.
- enabled boolean
- Enable or disable the pull mirror. Defaults to
true. - mirror
Branch stringRegex - Regular expression for branches to mirror. Requires GitLab Premium or Ultimate. Cannot be used with
only_mirror_protected_branches. - mirror
Overwrites booleanDiverged Branches - Overwrite diverged branches on the target project.
- mirror
Trigger booleanBuilds - Trigger CI/CD pipelines when the mirror updates.
- only
Mirror booleanProtected Branches - Mirror only protected branches. Cannot be used with
mirror_branch_regex.
- project str
- The ID or URL-encoded path of the project owned by the authenticated user.
- url str
- The URL of the remote repository to mirror from. While the API call allows including username and password as basic authentication in the URL, this resourcedoes not for security and idempotency reasons. Use
auth_userandauth_passwordinstead. - auth_
password str - Authentication password or token for the remote repository.
- auth_
user str - Authentication username for the remote repository.
- enabled bool
- Enable or disable the pull mirror. Defaults to
true. - mirror_
branch_ strregex - Regular expression for branches to mirror. Requires GitLab Premium or Ultimate. Cannot be used with
only_mirror_protected_branches. - mirror_
overwrites_ booldiverged_ branches - Overwrite diverged branches on the target project.
- mirror_
trigger_ boolbuilds - Trigger CI/CD pipelines when the mirror updates.
- only_
mirror_ boolprotected_ branches - Mirror only protected branches. Cannot be used with
mirror_branch_regex.
- project String
- The ID or URL-encoded path of the project owned by the authenticated user.
- url String
- The URL of the remote repository to mirror from. While the API call allows including username and password as basic authentication in the URL, this resourcedoes not for security and idempotency reasons. Use
auth_userandauth_passwordinstead. - auth
Password String - Authentication password or token for the remote repository.
- auth
User String - Authentication username for the remote repository.
- enabled Boolean
- Enable or disable the pull mirror. Defaults to
true. - mirror
Branch StringRegex - Regular expression for branches to mirror. Requires GitLab Premium or Ultimate. Cannot be used with
only_mirror_protected_branches. - mirror
Overwrites BooleanDiverged Branches - Overwrite diverged branches on the target project.
- mirror
Trigger BooleanBuilds - Trigger CI/CD pipelines when the mirror updates.
- only
Mirror BooleanProtected Branches - Mirror only protected branches. Cannot be used with
mirror_branch_regex.
Outputs
All input properties are implicitly available as output properties. Additionally, the ProjectPullMirror resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Error string - Last error message from the mirror operation.
- Last
Successful stringUpdate At - Timestamp of the last successful mirror update.
- Last
Update stringAt - Timestamp of the last mirror update attempt.
- Last
Update stringStarted At - Timestamp when the last mirror update started.
- Mirror
Id int - The ID of the pull mirror. This ID is set by GitLab.
- Update
Status string - Current status of the mirror update.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Error string - Last error message from the mirror operation.
- Last
Successful stringUpdate At - Timestamp of the last successful mirror update.
- Last
Update stringAt - Timestamp of the last mirror update attempt.
- Last
Update stringStarted At - Timestamp when the last mirror update started.
- Mirror
Id int - The ID of the pull mirror. This ID is set by GitLab.
- Update
Status string - Current status of the mirror update.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Error String - Last error message from the mirror operation.
- last
Successful StringUpdate At - Timestamp of the last successful mirror update.
- last
Update StringAt - Timestamp of the last mirror update attempt.
- last
Update StringStarted At - Timestamp when the last mirror update started.
- mirror
Id Integer - The ID of the pull mirror. This ID is set by GitLab.
- update
Status String - Current status of the mirror update.
- id string
- The provider-assigned unique ID for this managed resource.
- last
Error string - Last error message from the mirror operation.
- last
Successful stringUpdate At - Timestamp of the last successful mirror update.
- last
Update stringAt - Timestamp of the last mirror update attempt.
- last
Update stringStarted At - Timestamp when the last mirror update started.
- mirror
Id number - The ID of the pull mirror. This ID is set by GitLab.
- update
Status string - Current status of the mirror update.
- id str
- The provider-assigned unique ID for this managed resource.
- last_
error str - Last error message from the mirror operation.
- last_
successful_ strupdate_ at - Timestamp of the last successful mirror update.
- last_
update_ strat - Timestamp of the last mirror update attempt.
- last_
update_ strstarted_ at - Timestamp when the last mirror update started.
- mirror_
id int - The ID of the pull mirror. This ID is set by GitLab.
- update_
status str - Current status of the mirror update.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Error String - Last error message from the mirror operation.
- last
Successful StringUpdate At - Timestamp of the last successful mirror update.
- last
Update StringAt - Timestamp of the last mirror update attempt.
- last
Update StringStarted At - Timestamp when the last mirror update started.
- mirror
Id Number - The ID of the pull mirror. This ID is set by GitLab.
- update
Status String - Current status of the mirror update.
Look up Existing ProjectPullMirror Resource
Get an existing ProjectPullMirror resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ProjectPullMirrorState, opts?: CustomResourceOptions): ProjectPullMirror@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
auth_password: Optional[str] = None,
auth_user: Optional[str] = None,
enabled: Optional[bool] = None,
last_error: Optional[str] = None,
last_successful_update_at: Optional[str] = None,
last_update_at: Optional[str] = None,
last_update_started_at: Optional[str] = None,
mirror_branch_regex: Optional[str] = None,
mirror_id: Optional[int] = None,
mirror_overwrites_diverged_branches: Optional[bool] = None,
mirror_trigger_builds: Optional[bool] = None,
only_mirror_protected_branches: Optional[bool] = None,
project: Optional[str] = None,
update_status: Optional[str] = None,
url: Optional[str] = None) -> ProjectPullMirrorfunc GetProjectPullMirror(ctx *Context, name string, id IDInput, state *ProjectPullMirrorState, opts ...ResourceOption) (*ProjectPullMirror, error)public static ProjectPullMirror Get(string name, Input<string> id, ProjectPullMirrorState? state, CustomResourceOptions? opts = null)public static ProjectPullMirror get(String name, Output<String> id, ProjectPullMirrorState state, CustomResourceOptions options)resources: _: type: gitlab:ProjectPullMirror get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Auth
Password string - Authentication password or token for the remote repository.
- Auth
User string - Authentication username for the remote repository.
- Enabled bool
- Enable or disable the pull mirror. Defaults to
true. - Last
Error string - Last error message from the mirror operation.
- Last
Successful stringUpdate At - Timestamp of the last successful mirror update.
- Last
Update stringAt - Timestamp of the last mirror update attempt.
- Last
Update stringStarted At - Timestamp when the last mirror update started.
- Mirror
Branch stringRegex - Regular expression for branches to mirror. Requires GitLab Premium or Ultimate. Cannot be used with
only_mirror_protected_branches. - Mirror
Id int - The ID of the pull mirror. This ID is set by GitLab.
- Mirror
Overwrites boolDiverged Branches - Overwrite diverged branches on the target project.
- Mirror
Trigger boolBuilds - Trigger CI/CD pipelines when the mirror updates.
- Only
Mirror boolProtected Branches - Mirror only protected branches. Cannot be used with
mirror_branch_regex. - Project string
- The ID or URL-encoded path of the project owned by the authenticated user.
- Update
Status string - Current status of the mirror update.
- Url string
- The URL of the remote repository to mirror from. While the API call allows including username and password as basic authentication in the URL, this resourcedoes not for security and idempotency reasons. Use
auth_userandauth_passwordinstead.
- Auth
Password string - Authentication password or token for the remote repository.
- Auth
User string - Authentication username for the remote repository.
- Enabled bool
- Enable or disable the pull mirror. Defaults to
true. - Last
Error string - Last error message from the mirror operation.
- Last
Successful stringUpdate At - Timestamp of the last successful mirror update.
- Last
Update stringAt - Timestamp of the last mirror update attempt.
- Last
Update stringStarted At - Timestamp when the last mirror update started.
- Mirror
Branch stringRegex - Regular expression for branches to mirror. Requires GitLab Premium or Ultimate. Cannot be used with
only_mirror_protected_branches. - Mirror
Id int - The ID of the pull mirror. This ID is set by GitLab.
- Mirror
Overwrites boolDiverged Branches - Overwrite diverged branches on the target project.
- Mirror
Trigger boolBuilds - Trigger CI/CD pipelines when the mirror updates.
- Only
Mirror boolProtected Branches - Mirror only protected branches. Cannot be used with
mirror_branch_regex. - Project string
- The ID or URL-encoded path of the project owned by the authenticated user.
- Update
Status string - Current status of the mirror update.
- Url string
- The URL of the remote repository to mirror from. While the API call allows including username and password as basic authentication in the URL, this resourcedoes not for security and idempotency reasons. Use
auth_userandauth_passwordinstead.
- auth
Password String - Authentication password or token for the remote repository.
- auth
User String - Authentication username for the remote repository.
- enabled Boolean
- Enable or disable the pull mirror. Defaults to
true. - last
Error String - Last error message from the mirror operation.
- last
Successful StringUpdate At - Timestamp of the last successful mirror update.
- last
Update StringAt - Timestamp of the last mirror update attempt.
- last
Update StringStarted At - Timestamp when the last mirror update started.
- mirror
Branch StringRegex - Regular expression for branches to mirror. Requires GitLab Premium or Ultimate. Cannot be used with
only_mirror_protected_branches. - mirror
Id Integer - The ID of the pull mirror. This ID is set by GitLab.
- mirror
Overwrites BooleanDiverged Branches - Overwrite diverged branches on the target project.
- mirror
Trigger BooleanBuilds - Trigger CI/CD pipelines when the mirror updates.
- only
Mirror BooleanProtected Branches - Mirror only protected branches. Cannot be used with
mirror_branch_regex. - project String
- The ID or URL-encoded path of the project owned by the authenticated user.
- update
Status String - Current status of the mirror update.
- url String
- The URL of the remote repository to mirror from. While the API call allows including username and password as basic authentication in the URL, this resourcedoes not for security and idempotency reasons. Use
auth_userandauth_passwordinstead.
- auth
Password string - Authentication password or token for the remote repository.
- auth
User string - Authentication username for the remote repository.
- enabled boolean
- Enable or disable the pull mirror. Defaults to
true. - last
Error string - Last error message from the mirror operation.
- last
Successful stringUpdate At - Timestamp of the last successful mirror update.
- last
Update stringAt - Timestamp of the last mirror update attempt.
- last
Update stringStarted At - Timestamp when the last mirror update started.
- mirror
Branch stringRegex - Regular expression for branches to mirror. Requires GitLab Premium or Ultimate. Cannot be used with
only_mirror_protected_branches. - mirror
Id number - The ID of the pull mirror. This ID is set by GitLab.
- mirror
Overwrites booleanDiverged Branches - Overwrite diverged branches on the target project.
- mirror
Trigger booleanBuilds - Trigger CI/CD pipelines when the mirror updates.
- only
Mirror booleanProtected Branches - Mirror only protected branches. Cannot be used with
mirror_branch_regex. - project string
- The ID or URL-encoded path of the project owned by the authenticated user.
- update
Status string - Current status of the mirror update.
- url string
- The URL of the remote repository to mirror from. While the API call allows including username and password as basic authentication in the URL, this resourcedoes not for security and idempotency reasons. Use
auth_userandauth_passwordinstead.
- auth_
password str - Authentication password or token for the remote repository.
- auth_
user str - Authentication username for the remote repository.
- enabled bool
- Enable or disable the pull mirror. Defaults to
true. - last_
error str - Last error message from the mirror operation.
- last_
successful_ strupdate_ at - Timestamp of the last successful mirror update.
- last_
update_ strat - Timestamp of the last mirror update attempt.
- last_
update_ strstarted_ at - Timestamp when the last mirror update started.
- mirror_
branch_ strregex - Regular expression for branches to mirror. Requires GitLab Premium or Ultimate. Cannot be used with
only_mirror_protected_branches. - mirror_
id int - The ID of the pull mirror. This ID is set by GitLab.
- mirror_
overwrites_ booldiverged_ branches - Overwrite diverged branches on the target project.
- mirror_
trigger_ boolbuilds - Trigger CI/CD pipelines when the mirror updates.
- only_
mirror_ boolprotected_ branches - Mirror only protected branches. Cannot be used with
mirror_branch_regex. - project str
- The ID or URL-encoded path of the project owned by the authenticated user.
- update_
status str - Current status of the mirror update.
- url str
- The URL of the remote repository to mirror from. While the API call allows including username and password as basic authentication in the URL, this resourcedoes not for security and idempotency reasons. Use
auth_userandauth_passwordinstead.
- auth
Password String - Authentication password or token for the remote repository.
- auth
User String - Authentication username for the remote repository.
- enabled Boolean
- Enable or disable the pull mirror. Defaults to
true. - last
Error String - Last error message from the mirror operation.
- last
Successful StringUpdate At - Timestamp of the last successful mirror update.
- last
Update StringAt - Timestamp of the last mirror update attempt.
- last
Update StringStarted At - Timestamp when the last mirror update started.
- mirror
Branch StringRegex - Regular expression for branches to mirror. Requires GitLab Premium or Ultimate. Cannot be used with
only_mirror_protected_branches. - mirror
Id Number - The ID of the pull mirror. This ID is set by GitLab.
- mirror
Overwrites BooleanDiverged Branches - Overwrite diverged branches on the target project.
- mirror
Trigger BooleanBuilds - Trigger CI/CD pipelines when the mirror updates.
- only
Mirror BooleanProtected Branches - Mirror only protected branches. Cannot be used with
mirror_branch_regex. - project String
- The ID or URL-encoded path of the project owned by the authenticated user.
- update
Status String - Current status of the mirror update.
- url String
- The URL of the remote repository to mirror from. While the API call allows including username and password as basic authentication in the URL, this resourcedoes not for security and idempotency reasons. Use
auth_userandauth_passwordinstead.
Import
Starting in Terraform v1.5.0, you can use an import block to import gitlab_project_pull_mirror. For example:
terraform
import {
to = gitlab_project_pull_mirror.example
id = “see CLI command below for ID”
}
Importing using the CLI is supported with the following syntax:
Import using project ID
$ pulumi import gitlab:index/projectPullMirror:ProjectPullMirror example 123
Import using project path
Note: Import is not supported for disabled mirrors because the GitLab API returns
http 400 for disabled mirrors.
$ pulumi import gitlab:index/projectPullMirror:ProjectPullMirror example "group/project"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- GitLab pulumi/pulumi-gitlab
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
gitlabTerraform Provider.
