/terraform-provider-harbor

Terraform provider for Harbor

Primary LanguageGo

terraform-provider-harbor

A Terraform plugin for managing Harbor.

Contents

Installation

Download and extract the latest release to your [terraform plugin directory][third-party-plugins] (typically ~/.terraform.d/plugins/)

Provider Configuration

Example

Example provider.

provider "harbor" {
  address  = "harbor.mycompany.com"
  user     = "myuser"
  password = "mypassword"
}
Property Description Type Required Default
address harbor server address String true
user harbor username String true
password harbor password String true

Resources

harbor_project

A resource for managing a project.

Example

resource "harbor_project" "myproject" {
  name                  = "myproject"
  public                = true
  auto_scan             = true
  prevent_vulnerability = true
  severity              = "critical"
}

Arguments

Property Description Type Required Default
name Project name String true
public Set registry to be public Bool false false
auto_scan Set automatic scan on push Bool false false
content_trust Enable content trust Bool false false
prevent_vulnerability Prevent image pull on vulnerability Bool false false
severity Vulnerability severity level String false low

Attributes

Property Description
id Project ID

Requirements

  • Harbor >= 1.10.0