1. Packages
  2. Gitlab Provider
  3. API Docs
  4. ProjectIntegrationHarbor
GitLab v9.2.0 published on Friday, Jul 18, 2025 by Pulumi

gitlab.ProjectIntegrationHarbor

Explore with Pulumi AI

gitlab logo
GitLab v9.2.0 published on Friday, Jul 18, 2025 by Pulumi

    The gitlab.ProjectIntegrationHarbor resource manages the lifecycle of a project integration with Harbor.

    Upstream API: GitLab REST API docs

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gitlab from "@pulumi/gitlab";
    
    const awesomeProject = new gitlab.Project("awesome_project", {
        name: "awesome_project",
        description: "My awesome project.",
        visibilityLevel: "public",
    });
    const harbor = new gitlab.ProjectIntegrationHarbor("harbor", {
        project: awesomeProject.id,
        url: "http://harbor.example.com",
        projectName: "my_project_name",
    });
    
    import pulumi
    import pulumi_gitlab as gitlab
    
    awesome_project = gitlab.Project("awesome_project",
        name="awesome_project",
        description="My awesome project.",
        visibility_level="public")
    harbor = gitlab.ProjectIntegrationHarbor("harbor",
        project=awesome_project.id,
        url="http://harbor.example.com",
        project_name="my_project_name")
    
    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 {
    		awesomeProject, err := gitlab.NewProject(ctx, "awesome_project", &gitlab.ProjectArgs{
    			Name:            pulumi.String("awesome_project"),
    			Description:     pulumi.String("My awesome project."),
    			VisibilityLevel: pulumi.String("public"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = gitlab.NewProjectIntegrationHarbor(ctx, "harbor", &gitlab.ProjectIntegrationHarborArgs{
    			Project:     awesomeProject.ID(),
    			Url:         pulumi.String("http://harbor.example.com"),
    			ProjectName: pulumi.String("my_project_name"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using GitLab = Pulumi.GitLab;
    
    return await Deployment.RunAsync(() => 
    {
        var awesomeProject = new GitLab.Project("awesome_project", new()
        {
            Name = "awesome_project",
            Description = "My awesome project.",
            VisibilityLevel = "public",
        });
    
        var harbor = new GitLab.ProjectIntegrationHarbor("harbor", new()
        {
            Project = awesomeProject.Id,
            Url = "http://harbor.example.com",
            ProjectName = "my_project_name",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gitlab.Project;
    import com.pulumi.gitlab.ProjectArgs;
    import com.pulumi.gitlab.ProjectIntegrationHarbor;
    import com.pulumi.gitlab.ProjectIntegrationHarborArgs;
    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) {
            var awesomeProject = new Project("awesomeProject", ProjectArgs.builder()
                .name("awesome_project")
                .description("My awesome project.")
                .visibilityLevel("public")
                .build());
    
            var harbor = new ProjectIntegrationHarbor("harbor", ProjectIntegrationHarborArgs.builder()
                .project(awesomeProject.id())
                .url("http://harbor.example.com")
                .projectName("my_project_name")
                .build());
    
        }
    }
    
    resources:
      awesomeProject:
        type: gitlab:Project
        name: awesome_project
        properties:
          name: awesome_project
          description: My awesome project.
          visibilityLevel: public
      harbor:
        type: gitlab:ProjectIntegrationHarbor
        properties:
          project: ${awesomeProject.id}
          url: http://harbor.example.com
          projectName: my_project_name
    

    Create ProjectIntegrationHarbor Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ProjectIntegrationHarbor(name: string, args: ProjectIntegrationHarborArgs, opts?: CustomResourceOptions);
    @overload
    def ProjectIntegrationHarbor(resource_name: str,
                                 args: ProjectIntegrationHarborArgs,
                                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def ProjectIntegrationHarbor(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 password: Optional[str] = None,
                                 project: Optional[str] = None,
                                 project_name: Optional[str] = None,
                                 url: Optional[str] = None,
                                 username: Optional[str] = None,
                                 use_inherited_settings: Optional[bool] = None)
    func NewProjectIntegrationHarbor(ctx *Context, name string, args ProjectIntegrationHarborArgs, opts ...ResourceOption) (*ProjectIntegrationHarbor, error)
    public ProjectIntegrationHarbor(string name, ProjectIntegrationHarborArgs args, CustomResourceOptions? opts = null)
    public ProjectIntegrationHarbor(String name, ProjectIntegrationHarborArgs args)
    public ProjectIntegrationHarbor(String name, ProjectIntegrationHarborArgs args, CustomResourceOptions options)
    
    type: gitlab:ProjectIntegrationHarbor
    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 ProjectIntegrationHarborArgs
    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 ProjectIntegrationHarborArgs
    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 ProjectIntegrationHarborArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProjectIntegrationHarborArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProjectIntegrationHarborArgs
    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 projectIntegrationHarborResource = new GitLab.ProjectIntegrationHarbor("projectIntegrationHarborResource", new()
    {
        Password = "string",
        Project = "string",
        ProjectName = "string",
        Url = "string",
        Username = "string",
        UseInheritedSettings = false,
    });
    
    example, err := gitlab.NewProjectIntegrationHarbor(ctx, "projectIntegrationHarborResource", &gitlab.ProjectIntegrationHarborArgs{
    	Password:             pulumi.String("string"),
    	Project:              pulumi.String("string"),
    	ProjectName:          pulumi.String("string"),
    	Url:                  pulumi.String("string"),
    	Username:             pulumi.String("string"),
    	UseInheritedSettings: pulumi.Bool(false),
    })
    
    var projectIntegrationHarborResource = new ProjectIntegrationHarbor("projectIntegrationHarborResource", ProjectIntegrationHarborArgs.builder()
        .password("string")
        .project("string")
        .projectName("string")
        .url("string")
        .username("string")
        .useInheritedSettings(false)
        .build());
    
    project_integration_harbor_resource = gitlab.ProjectIntegrationHarbor("projectIntegrationHarborResource",
        password="string",
        project="string",
        project_name="string",
        url="string",
        username="string",
        use_inherited_settings=False)
    
    const projectIntegrationHarborResource = new gitlab.ProjectIntegrationHarbor("projectIntegrationHarborResource", {
        password: "string",
        project: "string",
        projectName: "string",
        url: "string",
        username: "string",
        useInheritedSettings: false,
    });
    
    type: gitlab:ProjectIntegrationHarbor
    properties:
        password: string
        project: string
        projectName: string
        url: string
        useInheritedSettings: false
        username: string
    

    ProjectIntegrationHarbor 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 ProjectIntegrationHarbor resource accepts the following input properties:

    Password string
    Password for authentication with the Harbor server, if authentication is required by the server.
    Project string
    ID of the GitLab project you want to activate integration on.
    ProjectName string
    The URL-friendly Harbor project name. This project needs to already exist in Harbor. Example: my_project_name.
    Url string
    Harbor URL. Example: http://harbor.example.com
    Username string
    Username for authentication with the Harbor server, if authentication is required by the server.
    UseInheritedSettings bool
    Indicates whether or not to inherit default settings. Defaults to false.
    Password string
    Password for authentication with the Harbor server, if authentication is required by the server.
    Project string
    ID of the GitLab project you want to activate integration on.
    ProjectName string
    The URL-friendly Harbor project name. This project needs to already exist in Harbor. Example: my_project_name.
    Url string
    Harbor URL. Example: http://harbor.example.com
    Username string
    Username for authentication with the Harbor server, if authentication is required by the server.
    UseInheritedSettings bool
    Indicates whether or not to inherit default settings. Defaults to false.
    password String
    Password for authentication with the Harbor server, if authentication is required by the server.
    project String
    ID of the GitLab project you want to activate integration on.
    projectName String
    The URL-friendly Harbor project name. This project needs to already exist in Harbor. Example: my_project_name.
    url String
    Harbor URL. Example: http://harbor.example.com
    username String
    Username for authentication with the Harbor server, if authentication is required by the server.
    useInheritedSettings Boolean
    Indicates whether or not to inherit default settings. Defaults to false.
    password string
    Password for authentication with the Harbor server, if authentication is required by the server.
    project string
    ID of the GitLab project you want to activate integration on.
    projectName string
    The URL-friendly Harbor project name. This project needs to already exist in Harbor. Example: my_project_name.
    url string
    Harbor URL. Example: http://harbor.example.com
    username string
    Username for authentication with the Harbor server, if authentication is required by the server.
    useInheritedSettings boolean
    Indicates whether or not to inherit default settings. Defaults to false.
    password str
    Password for authentication with the Harbor server, if authentication is required by the server.
    project str
    ID of the GitLab project you want to activate integration on.
    project_name str
    The URL-friendly Harbor project name. This project needs to already exist in Harbor. Example: my_project_name.
    url str
    Harbor URL. Example: http://harbor.example.com
    username str
    Username for authentication with the Harbor server, if authentication is required by the server.
    use_inherited_settings bool
    Indicates whether or not to inherit default settings. Defaults to false.
    password String
    Password for authentication with the Harbor server, if authentication is required by the server.
    project String
    ID of the GitLab project you want to activate integration on.
    projectName String
    The URL-friendly Harbor project name. This project needs to already exist in Harbor. Example: my_project_name.
    url String
    Harbor URL. Example: http://harbor.example.com
    username String
    Username for authentication with the Harbor server, if authentication is required by the server.
    useInheritedSettings Boolean
    Indicates whether or not to inherit default settings. Defaults to false.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ProjectIntegrationHarbor resource produces the following output properties:

    Active bool
    Whether the integration is active.
    Id string
    The provider-assigned unique ID for this managed resource.
    Active bool
    Whether the integration is active.
    Id string
    The provider-assigned unique ID for this managed resource.
    active Boolean
    Whether the integration is active.
    id String
    The provider-assigned unique ID for this managed resource.
    active boolean
    Whether the integration is active.
    id string
    The provider-assigned unique ID for this managed resource.
    active bool
    Whether the integration is active.
    id str
    The provider-assigned unique ID for this managed resource.
    active Boolean
    Whether the integration is active.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ProjectIntegrationHarbor Resource

    Get an existing ProjectIntegrationHarbor 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?: ProjectIntegrationHarborState, opts?: CustomResourceOptions): ProjectIntegrationHarbor
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            active: Optional[bool] = None,
            password: Optional[str] = None,
            project: Optional[str] = None,
            project_name: Optional[str] = None,
            url: Optional[str] = None,
            use_inherited_settings: Optional[bool] = None,
            username: Optional[str] = None) -> ProjectIntegrationHarbor
    func GetProjectIntegrationHarbor(ctx *Context, name string, id IDInput, state *ProjectIntegrationHarborState, opts ...ResourceOption) (*ProjectIntegrationHarbor, error)
    public static ProjectIntegrationHarbor Get(string name, Input<string> id, ProjectIntegrationHarborState? state, CustomResourceOptions? opts = null)
    public static ProjectIntegrationHarbor get(String name, Output<String> id, ProjectIntegrationHarborState state, CustomResourceOptions options)
    resources:  _:    type: gitlab:ProjectIntegrationHarbor    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:
    Active bool
    Whether the integration is active.
    Password string
    Password for authentication with the Harbor server, if authentication is required by the server.
    Project string
    ID of the GitLab project you want to activate integration on.
    ProjectName string
    The URL-friendly Harbor project name. This project needs to already exist in Harbor. Example: my_project_name.
    Url string
    Harbor URL. Example: http://harbor.example.com
    UseInheritedSettings bool
    Indicates whether or not to inherit default settings. Defaults to false.
    Username string
    Username for authentication with the Harbor server, if authentication is required by the server.
    Active bool
    Whether the integration is active.
    Password string
    Password for authentication with the Harbor server, if authentication is required by the server.
    Project string
    ID of the GitLab project you want to activate integration on.
    ProjectName string
    The URL-friendly Harbor project name. This project needs to already exist in Harbor. Example: my_project_name.
    Url string
    Harbor URL. Example: http://harbor.example.com
    UseInheritedSettings bool
    Indicates whether or not to inherit default settings. Defaults to false.
    Username string
    Username for authentication with the Harbor server, if authentication is required by the server.
    active Boolean
    Whether the integration is active.
    password String
    Password for authentication with the Harbor server, if authentication is required by the server.
    project String
    ID of the GitLab project you want to activate integration on.
    projectName String
    The URL-friendly Harbor project name. This project needs to already exist in Harbor. Example: my_project_name.
    url String
    Harbor URL. Example: http://harbor.example.com
    useInheritedSettings Boolean
    Indicates whether or not to inherit default settings. Defaults to false.
    username String
    Username for authentication with the Harbor server, if authentication is required by the server.
    active boolean
    Whether the integration is active.
    password string
    Password for authentication with the Harbor server, if authentication is required by the server.
    project string
    ID of the GitLab project you want to activate integration on.
    projectName string
    The URL-friendly Harbor project name. This project needs to already exist in Harbor. Example: my_project_name.
    url string
    Harbor URL. Example: http://harbor.example.com
    useInheritedSettings boolean
    Indicates whether or not to inherit default settings. Defaults to false.
    username string
    Username for authentication with the Harbor server, if authentication is required by the server.
    active bool
    Whether the integration is active.
    password str
    Password for authentication with the Harbor server, if authentication is required by the server.
    project str
    ID of the GitLab project you want to activate integration on.
    project_name str
    The URL-friendly Harbor project name. This project needs to already exist in Harbor. Example: my_project_name.
    url str
    Harbor URL. Example: http://harbor.example.com
    use_inherited_settings bool
    Indicates whether or not to inherit default settings. Defaults to false.
    username str
    Username for authentication with the Harbor server, if authentication is required by the server.
    active Boolean
    Whether the integration is active.
    password String
    Password for authentication with the Harbor server, if authentication is required by the server.
    project String
    ID of the GitLab project you want to activate integration on.
    projectName String
    The URL-friendly Harbor project name. This project needs to already exist in Harbor. Example: my_project_name.
    url String
    Harbor URL. Example: http://harbor.example.com
    useInheritedSettings Boolean
    Indicates whether or not to inherit default settings. Defaults to false.
    username String
    Username for authentication with the Harbor server, if authentication is required by the server.

    Import

    Starting in Terraform v1.5.0, you can use an import block to import gitlab_project_integration_harbor. For example:

    terraform

    import {

    to = gitlab_project_integration_harbor.example

    id = “see CLI command below for ID”

    }

    Importing using the CLI is supported with the following syntax:

    $ pulumi import gitlab:index/projectIntegrationHarbor:ProjectIntegrationHarbor You can import a gitlab_project_integration_harbor state using `<resource> <project_id>`:
    
    $ pulumi import gitlab:index/projectIntegrationHarbor:ProjectIntegrationHarbor harbor 1
    

    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.2.0 published on Friday, Jul 18, 2025 by Pulumi