1. Packages
  2. Harbor
  3. API Docs
  4. Project
Harbor v3.10.8 published on Wednesday, Feb 14, 2024 by Pulumiverse

harbor.Project

Explore with Pulumi AI

harbor logo
Harbor v3.10.8 published on Wednesday, Feb 14, 2024 by Pulumiverse

    Example Usage

    resource "harbor_project" "main" {
        name                        = "main"
        public                      = false               # (Optional) Default value is false
        vulnerability_scanning      = true                # (Optional) Default value is true. Automatically scan images on push
        enable_content_trust        = true                # (Optional) Default value is false. Deny unsigned images from being pulled (notary)
        enable_content_trust_cosign = false               # (Optional) Default value is false. Deny unsigned images from being pulled (cosign)
    }
    

    Harbor project example as proxy cache

    resource "harbor_project" "main" {
      name        = "acctest"
      registry_id = harbor_registry.docker.registry_id
    }
    
    resource "harbor_registry" "docker" {
      provider_name = "docker-hub"
      name          = "test"
      endpoint_url  = "https://hub.docker.com"
    }
    

    Create Project Resource

    new Project(name: string, args?: ProjectArgs, opts?: CustomResourceOptions);
    @overload
    def Project(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                cve_allowlists: Optional[Sequence[str]] = None,
                deployment_security: Optional[str] = None,
                enable_content_trust: Optional[bool] = None,
                enable_content_trust_cosign: Optional[bool] = None,
                force_destroy: Optional[bool] = None,
                name: Optional[str] = None,
                public: Optional[bool] = None,
                registry_id: Optional[int] = None,
                storage_quota: Optional[int] = None,
                vulnerability_scanning: Optional[bool] = None)
    @overload
    def Project(resource_name: str,
                args: Optional[ProjectArgs] = None,
                opts: Optional[ResourceOptions] = None)
    func NewProject(ctx *Context, name string, args *ProjectArgs, opts ...ResourceOption) (*Project, error)
    public Project(string name, ProjectArgs? args = null, CustomResourceOptions? opts = null)
    public Project(String name, ProjectArgs args)
    public Project(String name, ProjectArgs args, CustomResourceOptions options)
    
    type: harbor:Project
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ProjectArgs
    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 ProjectArgs
    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 ProjectArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProjectArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProjectArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Project Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Project resource accepts the following input properties:

    CveAllowlists List<string>
    Project allowlist allows vulnerabilities in this list to be ignored in this project when pushing and pulling images. Should be in the format or ["CVE-123", "CVE-145"] or ["CVE-123"]
    DeploymentSecurity string
    Prevent deployment of images with vulnerability severity equal or higher than the specified value. Images must be scanned before this takes effect. Possible values: critical, high, medium, low, none. (Default: "" - empty)
    EnableContentTrust bool
    Enables Content Trust for project. When enabled it queries the embedded docker notary server. Can be set to "true" or "false" (Default: false)
    EnableContentTrustCosign bool
    Enables Content Trust Cosign for project. When enabled it queries Cosign. Can be set to "true" or "false" (Default: false)
    ForceDestroy bool
    A boolean that indicates all repositories should be deleted from the project so that the project can be destroyed without error. These repositories are not recoverable.
    Name string
    The name of the project that will be created in harbor.
    Public bool
    The project will be public accessibility. Can be set to "true" or "false" (Default: false)
    RegistryId int
    To enable project as Proxy Cache
    StorageQuota int
    The storage quota of the project in GB's
    VulnerabilityScanning bool
    Images will be scanned for vulnerabilities when push to harbor. Can be set to "true" or "false" (Default: true)
    CveAllowlists []string
    Project allowlist allows vulnerabilities in this list to be ignored in this project when pushing and pulling images. Should be in the format or ["CVE-123", "CVE-145"] or ["CVE-123"]
    DeploymentSecurity string
    Prevent deployment of images with vulnerability severity equal or higher than the specified value. Images must be scanned before this takes effect. Possible values: critical, high, medium, low, none. (Default: "" - empty)
    EnableContentTrust bool
    Enables Content Trust for project. When enabled it queries the embedded docker notary server. Can be set to "true" or "false" (Default: false)
    EnableContentTrustCosign bool
    Enables Content Trust Cosign for project. When enabled it queries Cosign. Can be set to "true" or "false" (Default: false)
    ForceDestroy bool
    A boolean that indicates all repositories should be deleted from the project so that the project can be destroyed without error. These repositories are not recoverable.
    Name string
    The name of the project that will be created in harbor.
    Public bool
    The project will be public accessibility. Can be set to "true" or "false" (Default: false)
    RegistryId int
    To enable project as Proxy Cache
    StorageQuota int
    The storage quota of the project in GB's
    VulnerabilityScanning bool
    Images will be scanned for vulnerabilities when push to harbor. Can be set to "true" or "false" (Default: true)
    cveAllowlists List<String>
    Project allowlist allows vulnerabilities in this list to be ignored in this project when pushing and pulling images. Should be in the format or ["CVE-123", "CVE-145"] or ["CVE-123"]
    deploymentSecurity String
    Prevent deployment of images with vulnerability severity equal or higher than the specified value. Images must be scanned before this takes effect. Possible values: critical, high, medium, low, none. (Default: "" - empty)
    enableContentTrust Boolean
    Enables Content Trust for project. When enabled it queries the embedded docker notary server. Can be set to "true" or "false" (Default: false)
    enableContentTrustCosign Boolean
    Enables Content Trust Cosign for project. When enabled it queries Cosign. Can be set to "true" or "false" (Default: false)
    forceDestroy Boolean
    A boolean that indicates all repositories should be deleted from the project so that the project can be destroyed without error. These repositories are not recoverable.
    name String
    The name of the project that will be created in harbor.
    public_ Boolean
    The project will be public accessibility. Can be set to "true" or "false" (Default: false)
    registryId Integer
    To enable project as Proxy Cache
    storageQuota Integer
    The storage quota of the project in GB's
    vulnerabilityScanning Boolean
    Images will be scanned for vulnerabilities when push to harbor. Can be set to "true" or "false" (Default: true)
    cveAllowlists string[]
    Project allowlist allows vulnerabilities in this list to be ignored in this project when pushing and pulling images. Should be in the format or ["CVE-123", "CVE-145"] or ["CVE-123"]
    deploymentSecurity string
    Prevent deployment of images with vulnerability severity equal or higher than the specified value. Images must be scanned before this takes effect. Possible values: critical, high, medium, low, none. (Default: "" - empty)
    enableContentTrust boolean
    Enables Content Trust for project. When enabled it queries the embedded docker notary server. Can be set to "true" or "false" (Default: false)
    enableContentTrustCosign boolean
    Enables Content Trust Cosign for project. When enabled it queries Cosign. Can be set to "true" or "false" (Default: false)
    forceDestroy boolean
    A boolean that indicates all repositories should be deleted from the project so that the project can be destroyed without error. These repositories are not recoverable.
    name string
    The name of the project that will be created in harbor.
    public boolean
    The project will be public accessibility. Can be set to "true" or "false" (Default: false)
    registryId number
    To enable project as Proxy Cache
    storageQuota number
    The storage quota of the project in GB's
    vulnerabilityScanning boolean
    Images will be scanned for vulnerabilities when push to harbor. Can be set to "true" or "false" (Default: true)
    cve_allowlists Sequence[str]
    Project allowlist allows vulnerabilities in this list to be ignored in this project when pushing and pulling images. Should be in the format or ["CVE-123", "CVE-145"] or ["CVE-123"]
    deployment_security str
    Prevent deployment of images with vulnerability severity equal or higher than the specified value. Images must be scanned before this takes effect. Possible values: critical, high, medium, low, none. (Default: "" - empty)
    enable_content_trust bool
    Enables Content Trust for project. When enabled it queries the embedded docker notary server. Can be set to "true" or "false" (Default: false)
    enable_content_trust_cosign bool
    Enables Content Trust Cosign for project. When enabled it queries Cosign. Can be set to "true" or "false" (Default: false)
    force_destroy bool
    A boolean that indicates all repositories should be deleted from the project so that the project can be destroyed without error. These repositories are not recoverable.
    name str
    The name of the project that will be created in harbor.
    public bool
    The project will be public accessibility. Can be set to "true" or "false" (Default: false)
    registry_id int
    To enable project as Proxy Cache
    storage_quota int
    The storage quota of the project in GB's
    vulnerability_scanning bool
    Images will be scanned for vulnerabilities when push to harbor. Can be set to "true" or "false" (Default: true)
    cveAllowlists List<String>
    Project allowlist allows vulnerabilities in this list to be ignored in this project when pushing and pulling images. Should be in the format or ["CVE-123", "CVE-145"] or ["CVE-123"]
    deploymentSecurity String
    Prevent deployment of images with vulnerability severity equal or higher than the specified value. Images must be scanned before this takes effect. Possible values: critical, high, medium, low, none. (Default: "" - empty)
    enableContentTrust Boolean
    Enables Content Trust for project. When enabled it queries the embedded docker notary server. Can be set to "true" or "false" (Default: false)
    enableContentTrustCosign Boolean
    Enables Content Trust Cosign for project. When enabled it queries Cosign. Can be set to "true" or "false" (Default: false)
    forceDestroy Boolean
    A boolean that indicates all repositories should be deleted from the project so that the project can be destroyed without error. These repositories are not recoverable.
    name String
    The name of the project that will be created in harbor.
    public Boolean
    The project will be public accessibility. Can be set to "true" or "false" (Default: false)
    registryId Number
    To enable project as Proxy Cache
    storageQuota Number
    The storage quota of the project in GB's
    vulnerabilityScanning Boolean
    Images will be scanned for vulnerabilities when push to harbor. Can be set to "true" or "false" (Default: true)

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    ProjectId int
    The id of the project with harbor.
    Id string
    The provider-assigned unique ID for this managed resource.
    ProjectId int
    The id of the project with harbor.
    id String
    The provider-assigned unique ID for this managed resource.
    projectId Integer
    The id of the project with harbor.
    id string
    The provider-assigned unique ID for this managed resource.
    projectId number
    The id of the project with harbor.
    id str
    The provider-assigned unique ID for this managed resource.
    project_id int
    The id of the project with harbor.
    id String
    The provider-assigned unique ID for this managed resource.
    projectId Number
    The id of the project with harbor.

    Look up Existing Project Resource

    Get an existing Project 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?: ProjectState, opts?: CustomResourceOptions): Project
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cve_allowlists: Optional[Sequence[str]] = None,
            deployment_security: Optional[str] = None,
            enable_content_trust: Optional[bool] = None,
            enable_content_trust_cosign: Optional[bool] = None,
            force_destroy: Optional[bool] = None,
            name: Optional[str] = None,
            project_id: Optional[int] = None,
            public: Optional[bool] = None,
            registry_id: Optional[int] = None,
            storage_quota: Optional[int] = None,
            vulnerability_scanning: Optional[bool] = None) -> Project
    func GetProject(ctx *Context, name string, id IDInput, state *ProjectState, opts ...ResourceOption) (*Project, error)
    public static Project Get(string name, Input<string> id, ProjectState? state, CustomResourceOptions? opts = null)
    public static Project get(String name, Output<String> id, ProjectState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    CveAllowlists List<string>
    Project allowlist allows vulnerabilities in this list to be ignored in this project when pushing and pulling images. Should be in the format or ["CVE-123", "CVE-145"] or ["CVE-123"]
    DeploymentSecurity string
    Prevent deployment of images with vulnerability severity equal or higher than the specified value. Images must be scanned before this takes effect. Possible values: critical, high, medium, low, none. (Default: "" - empty)
    EnableContentTrust bool
    Enables Content Trust for project. When enabled it queries the embedded docker notary server. Can be set to "true" or "false" (Default: false)
    EnableContentTrustCosign bool
    Enables Content Trust Cosign for project. When enabled it queries Cosign. Can be set to "true" or "false" (Default: false)
    ForceDestroy bool
    A boolean that indicates all repositories should be deleted from the project so that the project can be destroyed without error. These repositories are not recoverable.
    Name string
    The name of the project that will be created in harbor.
    ProjectId int
    The id of the project with harbor.
    Public bool
    The project will be public accessibility. Can be set to "true" or "false" (Default: false)
    RegistryId int
    To enable project as Proxy Cache
    StorageQuota int
    The storage quota of the project in GB's
    VulnerabilityScanning bool
    Images will be scanned for vulnerabilities when push to harbor. Can be set to "true" or "false" (Default: true)
    CveAllowlists []string
    Project allowlist allows vulnerabilities in this list to be ignored in this project when pushing and pulling images. Should be in the format or ["CVE-123", "CVE-145"] or ["CVE-123"]
    DeploymentSecurity string
    Prevent deployment of images with vulnerability severity equal or higher than the specified value. Images must be scanned before this takes effect. Possible values: critical, high, medium, low, none. (Default: "" - empty)
    EnableContentTrust bool
    Enables Content Trust for project. When enabled it queries the embedded docker notary server. Can be set to "true" or "false" (Default: false)
    EnableContentTrustCosign bool
    Enables Content Trust Cosign for project. When enabled it queries Cosign. Can be set to "true" or "false" (Default: false)
    ForceDestroy bool
    A boolean that indicates all repositories should be deleted from the project so that the project can be destroyed without error. These repositories are not recoverable.
    Name string
    The name of the project that will be created in harbor.
    ProjectId int
    The id of the project with harbor.
    Public bool
    The project will be public accessibility. Can be set to "true" or "false" (Default: false)
    RegistryId int
    To enable project as Proxy Cache
    StorageQuota int
    The storage quota of the project in GB's
    VulnerabilityScanning bool
    Images will be scanned for vulnerabilities when push to harbor. Can be set to "true" or "false" (Default: true)
    cveAllowlists List<String>
    Project allowlist allows vulnerabilities in this list to be ignored in this project when pushing and pulling images. Should be in the format or ["CVE-123", "CVE-145"] or ["CVE-123"]
    deploymentSecurity String
    Prevent deployment of images with vulnerability severity equal or higher than the specified value. Images must be scanned before this takes effect. Possible values: critical, high, medium, low, none. (Default: "" - empty)
    enableContentTrust Boolean
    Enables Content Trust for project. When enabled it queries the embedded docker notary server. Can be set to "true" or "false" (Default: false)
    enableContentTrustCosign Boolean
    Enables Content Trust Cosign for project. When enabled it queries Cosign. Can be set to "true" or "false" (Default: false)
    forceDestroy Boolean
    A boolean that indicates all repositories should be deleted from the project so that the project can be destroyed without error. These repositories are not recoverable.
    name String
    The name of the project that will be created in harbor.
    projectId Integer
    The id of the project with harbor.
    public_ Boolean
    The project will be public accessibility. Can be set to "true" or "false" (Default: false)
    registryId Integer
    To enable project as Proxy Cache
    storageQuota Integer
    The storage quota of the project in GB's
    vulnerabilityScanning Boolean
    Images will be scanned for vulnerabilities when push to harbor. Can be set to "true" or "false" (Default: true)
    cveAllowlists string[]
    Project allowlist allows vulnerabilities in this list to be ignored in this project when pushing and pulling images. Should be in the format or ["CVE-123", "CVE-145"] or ["CVE-123"]
    deploymentSecurity string
    Prevent deployment of images with vulnerability severity equal or higher than the specified value. Images must be scanned before this takes effect. Possible values: critical, high, medium, low, none. (Default: "" - empty)
    enableContentTrust boolean
    Enables Content Trust for project. When enabled it queries the embedded docker notary server. Can be set to "true" or "false" (Default: false)
    enableContentTrustCosign boolean
    Enables Content Trust Cosign for project. When enabled it queries Cosign. Can be set to "true" or "false" (Default: false)
    forceDestroy boolean
    A boolean that indicates all repositories should be deleted from the project so that the project can be destroyed without error. These repositories are not recoverable.
    name string
    The name of the project that will be created in harbor.
    projectId number
    The id of the project with harbor.
    public boolean
    The project will be public accessibility. Can be set to "true" or "false" (Default: false)
    registryId number
    To enable project as Proxy Cache
    storageQuota number
    The storage quota of the project in GB's
    vulnerabilityScanning boolean
    Images will be scanned for vulnerabilities when push to harbor. Can be set to "true" or "false" (Default: true)
    cve_allowlists Sequence[str]
    Project allowlist allows vulnerabilities in this list to be ignored in this project when pushing and pulling images. Should be in the format or ["CVE-123", "CVE-145"] or ["CVE-123"]
    deployment_security str
    Prevent deployment of images with vulnerability severity equal or higher than the specified value. Images must be scanned before this takes effect. Possible values: critical, high, medium, low, none. (Default: "" - empty)
    enable_content_trust bool
    Enables Content Trust for project. When enabled it queries the embedded docker notary server. Can be set to "true" or "false" (Default: false)
    enable_content_trust_cosign bool
    Enables Content Trust Cosign for project. When enabled it queries Cosign. Can be set to "true" or "false" (Default: false)
    force_destroy bool
    A boolean that indicates all repositories should be deleted from the project so that the project can be destroyed without error. These repositories are not recoverable.
    name str
    The name of the project that will be created in harbor.
    project_id int
    The id of the project with harbor.
    public bool
    The project will be public accessibility. Can be set to "true" or "false" (Default: false)
    registry_id int
    To enable project as Proxy Cache
    storage_quota int
    The storage quota of the project in GB's
    vulnerability_scanning bool
    Images will be scanned for vulnerabilities when push to harbor. Can be set to "true" or "false" (Default: true)
    cveAllowlists List<String>
    Project allowlist allows vulnerabilities in this list to be ignored in this project when pushing and pulling images. Should be in the format or ["CVE-123", "CVE-145"] or ["CVE-123"]
    deploymentSecurity String
    Prevent deployment of images with vulnerability severity equal or higher than the specified value. Images must be scanned before this takes effect. Possible values: critical, high, medium, low, none. (Default: "" - empty)
    enableContentTrust Boolean
    Enables Content Trust for project. When enabled it queries the embedded docker notary server. Can be set to "true" or "false" (Default: false)
    enableContentTrustCosign Boolean
    Enables Content Trust Cosign for project. When enabled it queries Cosign. Can be set to "true" or "false" (Default: false)
    forceDestroy Boolean
    A boolean that indicates all repositories should be deleted from the project so that the project can be destroyed without error. These repositories are not recoverable.
    name String
    The name of the project that will be created in harbor.
    projectId Number
    The id of the project with harbor.
    public Boolean
    The project will be public accessibility. Can be set to "true" or "false" (Default: false)
    registryId Number
    To enable project as Proxy Cache
    storageQuota Number
    The storage quota of the project in GB's
    vulnerabilityScanning Boolean
    Images will be scanned for vulnerabilities when push to harbor. Can be set to "true" or "false" (Default: true)

    Import

    Harbor project can be imported using the project id eg, <break><break> ```sh<break> $ pulumi import harbor:index/project:Project main /projects/1 <break>```<break><break>

    Package Details

    Repository
    harbor pulumiverse/pulumi-harbor
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the harbor Terraform Provider.
    harbor logo
    Harbor v3.10.8 published on Wednesday, Feb 14, 2024 by Pulumiverse