1. Packages
  2. Harbor
Viewing docs for Harbor v3.10.21
published on Monday, Jun 30, 2025 by Pulumiverse

Harbor

harbor logo
Viewing docs for Harbor v3.10.21
published on Monday, Jun 30, 2025 by Pulumiverse
    Try Pulumi Cloud free. Your team will thank you.

    The Harbor provider for Pulumi can be used to provision any of the resources available with Harbor.

    Example

    import * as harbor from '@pulumiverse/harbor';
    
    let registry = new harbor.Registry('registry', {
        providerName: "docker-hub",
        endpointUrl: "https://hub.docker.com",
        name: "pulumi-harbor"
    });
    
    let project = new harbor.Project('project', {
        name: "pulumi-harbor",
        registryId: registry.registryId,
        public: "true",
    });
    
    import pulumiverse_harbor as harbor
    import pulumi
    
    registry = harbor.Registry("registry", name="pulumi-harbor",
                               endpoint_url="https://harbor.pulumi.com",
                               provider_name="docker-hub")
    
    project = harbor.Project("project", name="pulumi-harbor",
                             registry_id=registry.registry_id,
                             public="true")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-harbor/sdk/v3/go/harbor"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    
    		registry, err := harbor.NewRegistry(ctx, "registry", &harbor.RegistryArgs{
    			ProviderName: pulumi.String("docker-hub"),
    			EndpointUrl:  pulumi.String("https://hub.docker.com"),
    			Name:         pulumi.String("pulumi-harbor"),
    		})
    		if err != nil {
    			return err
    		}
    
    		_, err = harbor.NewProject(ctx, "project", &harbor.ProjectArgs{
    			Name:       pulumi.String("pulumi-harbor"),
    			Public:     pulumi.String("true"),
    			RegistryId: registry.RegistryId,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using Pulumi;
    using Pulumiverse.Harbor;
    
    return await Deployment.RunAsync(() =>
    {
       var registry = new Registry("registry", new RegistryArgs
       {
          ProviderName= "docker-hub",
          EndpointUrl="https://hub.docker.com",
          Name= "pulumi-harbor",
       });
       var project = new Project("project", new ProjectArgs
       {
          RegistryId= registry.RegistryId,
          Name= "pulumi-harbor",
          Public= "true" 
       });
    });
    
    harbor logo
    Viewing docs for Harbor v3.10.21
    published on Monday, Jun 30, 2025 by Pulumiverse
      Try Pulumi Cloud free. Your team will thank you.