1. Packages
  2. Gitlab Provider
  3. API Docs
  4. ProjectPullMirror
GitLab v9.8.0 published on Friday, Jan 16, 2026 by Pulumi
gitlab logo
GitLab v9.8.0 published on Friday, Jan 16, 2026 by Pulumi

    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_user and auth_password instead.
    AuthPassword string
    Authentication password or token for the remote repository.
    AuthUser string
    Authentication username for the remote repository.
    Enabled bool
    Enable or disable the pull mirror. Defaults to true.
    MirrorBranchRegex string
    Regular expression for branches to mirror. Requires GitLab Premium or Ultimate. Cannot be used with only_mirror_protected_branches.
    MirrorOverwritesDivergedBranches bool
    Overwrite diverged branches on the target project.
    MirrorTriggerBuilds bool
    Trigger CI/CD pipelines when the mirror updates.
    OnlyMirrorProtectedBranches bool
    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_user and auth_password instead.
    AuthPassword string
    Authentication password or token for the remote repository.
    AuthUser string
    Authentication username for the remote repository.
    Enabled bool
    Enable or disable the pull mirror. Defaults to true.
    MirrorBranchRegex string
    Regular expression for branches to mirror. Requires GitLab Premium or Ultimate. Cannot be used with only_mirror_protected_branches.
    MirrorOverwritesDivergedBranches bool
    Overwrite diverged branches on the target project.
    MirrorTriggerBuilds bool
    Trigger CI/CD pipelines when the mirror updates.
    OnlyMirrorProtectedBranches bool
    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_user and auth_password instead.
    authPassword String
    Authentication password or token for the remote repository.
    authUser String
    Authentication username for the remote repository.
    enabled Boolean
    Enable or disable the pull mirror. Defaults to true.
    mirrorBranchRegex String
    Regular expression for branches to mirror. Requires GitLab Premium or Ultimate. Cannot be used with only_mirror_protected_branches.
    mirrorOverwritesDivergedBranches Boolean
    Overwrite diverged branches on the target project.
    mirrorTriggerBuilds Boolean
    Trigger CI/CD pipelines when the mirror updates.
    onlyMirrorProtectedBranches Boolean
    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_user and auth_password instead.
    authPassword string
    Authentication password or token for the remote repository.
    authUser string
    Authentication username for the remote repository.
    enabled boolean
    Enable or disable the pull mirror. Defaults to true.
    mirrorBranchRegex string
    Regular expression for branches to mirror. Requires GitLab Premium or Ultimate. Cannot be used with only_mirror_protected_branches.
    mirrorOverwritesDivergedBranches boolean
    Overwrite diverged branches on the target project.
    mirrorTriggerBuilds boolean
    Trigger CI/CD pipelines when the mirror updates.
    onlyMirrorProtectedBranches boolean
    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_user and auth_password instead.
    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_regex str
    Regular expression for branches to mirror. Requires GitLab Premium or Ultimate. Cannot be used with only_mirror_protected_branches.
    mirror_overwrites_diverged_branches bool
    Overwrite diverged branches on the target project.
    mirror_trigger_builds bool
    Trigger CI/CD pipelines when the mirror updates.
    only_mirror_protected_branches bool
    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_user and auth_password instead.
    authPassword String
    Authentication password or token for the remote repository.
    authUser String
    Authentication username for the remote repository.
    enabled Boolean
    Enable or disable the pull mirror. Defaults to true.
    mirrorBranchRegex String
    Regular expression for branches to mirror. Requires GitLab Premium or Ultimate. Cannot be used with only_mirror_protected_branches.
    mirrorOverwritesDivergedBranches Boolean
    Overwrite diverged branches on the target project.
    mirrorTriggerBuilds Boolean
    Trigger CI/CD pipelines when the mirror updates.
    onlyMirrorProtectedBranches Boolean
    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.
    LastError string
    Last error message from the mirror operation.
    LastSuccessfulUpdateAt string
    Timestamp of the last successful mirror update.
    LastUpdateAt string
    Timestamp of the last mirror update attempt.
    LastUpdateStartedAt string
    Timestamp when the last mirror update started.
    MirrorId int
    The ID of the pull mirror. This ID is set by GitLab.
    UpdateStatus string
    Current status of the mirror update.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastError string
    Last error message from the mirror operation.
    LastSuccessfulUpdateAt string
    Timestamp of the last successful mirror update.
    LastUpdateAt string
    Timestamp of the last mirror update attempt.
    LastUpdateStartedAt string
    Timestamp when the last mirror update started.
    MirrorId int
    The ID of the pull mirror. This ID is set by GitLab.
    UpdateStatus string
    Current status of the mirror update.
    id String
    The provider-assigned unique ID for this managed resource.
    lastError String
    Last error message from the mirror operation.
    lastSuccessfulUpdateAt String
    Timestamp of the last successful mirror update.
    lastUpdateAt String
    Timestamp of the last mirror update attempt.
    lastUpdateStartedAt String
    Timestamp when the last mirror update started.
    mirrorId Integer
    The ID of the pull mirror. This ID is set by GitLab.
    updateStatus String
    Current status of the mirror update.
    id string
    The provider-assigned unique ID for this managed resource.
    lastError string
    Last error message from the mirror operation.
    lastSuccessfulUpdateAt string
    Timestamp of the last successful mirror update.
    lastUpdateAt string
    Timestamp of the last mirror update attempt.
    lastUpdateStartedAt string
    Timestamp when the last mirror update started.
    mirrorId number
    The ID of the pull mirror. This ID is set by GitLab.
    updateStatus 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_update_at str
    Timestamp of the last successful mirror update.
    last_update_at str
    Timestamp of the last mirror update attempt.
    last_update_started_at str
    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.
    lastError String
    Last error message from the mirror operation.
    lastSuccessfulUpdateAt String
    Timestamp of the last successful mirror update.
    lastUpdateAt String
    Timestamp of the last mirror update attempt.
    lastUpdateStartedAt String
    Timestamp when the last mirror update started.
    mirrorId Number
    The ID of the pull mirror. This ID is set by GitLab.
    updateStatus 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) -> ProjectPullMirror
    func 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.
    The following state arguments are supported:
    AuthPassword string
    Authentication password or token for the remote repository.
    AuthUser string
    Authentication username for the remote repository.
    Enabled bool
    Enable or disable the pull mirror. Defaults to true.
    LastError string
    Last error message from the mirror operation.
    LastSuccessfulUpdateAt string
    Timestamp of the last successful mirror update.
    LastUpdateAt string
    Timestamp of the last mirror update attempt.
    LastUpdateStartedAt string
    Timestamp when the last mirror update started.
    MirrorBranchRegex string
    Regular expression for branches to mirror. Requires GitLab Premium or Ultimate. Cannot be used with only_mirror_protected_branches.
    MirrorId int
    The ID of the pull mirror. This ID is set by GitLab.
    MirrorOverwritesDivergedBranches bool
    Overwrite diverged branches on the target project.
    MirrorTriggerBuilds bool
    Trigger CI/CD pipelines when the mirror updates.
    OnlyMirrorProtectedBranches bool
    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.
    UpdateStatus 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_user and auth_password instead.
    AuthPassword string
    Authentication password or token for the remote repository.
    AuthUser string
    Authentication username for the remote repository.
    Enabled bool
    Enable or disable the pull mirror. Defaults to true.
    LastError string
    Last error message from the mirror operation.
    LastSuccessfulUpdateAt string
    Timestamp of the last successful mirror update.
    LastUpdateAt string
    Timestamp of the last mirror update attempt.
    LastUpdateStartedAt string
    Timestamp when the last mirror update started.
    MirrorBranchRegex string
    Regular expression for branches to mirror. Requires GitLab Premium or Ultimate. Cannot be used with only_mirror_protected_branches.
    MirrorId int
    The ID of the pull mirror. This ID is set by GitLab.
    MirrorOverwritesDivergedBranches bool
    Overwrite diverged branches on the target project.
    MirrorTriggerBuilds bool
    Trigger CI/CD pipelines when the mirror updates.
    OnlyMirrorProtectedBranches bool
    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.
    UpdateStatus 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_user and auth_password instead.
    authPassword String
    Authentication password or token for the remote repository.
    authUser String
    Authentication username for the remote repository.
    enabled Boolean
    Enable or disable the pull mirror. Defaults to true.
    lastError String
    Last error message from the mirror operation.
    lastSuccessfulUpdateAt String
    Timestamp of the last successful mirror update.
    lastUpdateAt String
    Timestamp of the last mirror update attempt.
    lastUpdateStartedAt String
    Timestamp when the last mirror update started.
    mirrorBranchRegex String
    Regular expression for branches to mirror. Requires GitLab Premium or Ultimate. Cannot be used with only_mirror_protected_branches.
    mirrorId Integer
    The ID of the pull mirror. This ID is set by GitLab.
    mirrorOverwritesDivergedBranches Boolean
    Overwrite diverged branches on the target project.
    mirrorTriggerBuilds Boolean
    Trigger CI/CD pipelines when the mirror updates.
    onlyMirrorProtectedBranches Boolean
    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.
    updateStatus 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_user and auth_password instead.
    authPassword string
    Authentication password or token for the remote repository.
    authUser string
    Authentication username for the remote repository.
    enabled boolean
    Enable or disable the pull mirror. Defaults to true.
    lastError string
    Last error message from the mirror operation.
    lastSuccessfulUpdateAt string
    Timestamp of the last successful mirror update.
    lastUpdateAt string
    Timestamp of the last mirror update attempt.
    lastUpdateStartedAt string
    Timestamp when the last mirror update started.
    mirrorBranchRegex string
    Regular expression for branches to mirror. Requires GitLab Premium or Ultimate. Cannot be used with only_mirror_protected_branches.
    mirrorId number
    The ID of the pull mirror. This ID is set by GitLab.
    mirrorOverwritesDivergedBranches boolean
    Overwrite diverged branches on the target project.
    mirrorTriggerBuilds boolean
    Trigger CI/CD pipelines when the mirror updates.
    onlyMirrorProtectedBranches boolean
    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.
    updateStatus 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_user and auth_password instead.
    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_update_at str
    Timestamp of the last successful mirror update.
    last_update_at str
    Timestamp of the last mirror update attempt.
    last_update_started_at str
    Timestamp when the last mirror update started.
    mirror_branch_regex str
    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_diverged_branches bool
    Overwrite diverged branches on the target project.
    mirror_trigger_builds bool
    Trigger CI/CD pipelines when the mirror updates.
    only_mirror_protected_branches bool
    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_user and auth_password instead.
    authPassword String
    Authentication password or token for the remote repository.
    authUser String
    Authentication username for the remote repository.
    enabled Boolean
    Enable or disable the pull mirror. Defaults to true.
    lastError String
    Last error message from the mirror operation.
    lastSuccessfulUpdateAt String
    Timestamp of the last successful mirror update.
    lastUpdateAt String
    Timestamp of the last mirror update attempt.
    lastUpdateStartedAt String
    Timestamp when the last mirror update started.
    mirrorBranchRegex String
    Regular expression for branches to mirror. Requires GitLab Premium or Ultimate. Cannot be used with only_mirror_protected_branches.
    mirrorId Number
    The ID of the pull mirror. This ID is set by GitLab.
    mirrorOverwritesDivergedBranches Boolean
    Overwrite diverged branches on the target project.
    mirrorTriggerBuilds Boolean
    Trigger CI/CD pipelines when the mirror updates.
    onlyMirrorProtectedBranches Boolean
    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.
    updateStatus 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_user and auth_password instead.

    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 gitlab Terraform Provider.
    gitlab logo
    GitLab v9.8.0 published on Friday, Jan 16, 2026 by Pulumi
      Meet Neo: Your AI Platform Teammate