Goal of this repo is to provide an example of using the Harbor Terraform Provider to keep two Harbor instances in sync (settings and artifacts).
This repo is managing the configuration of the following
- Generic instance configuration
- Authentication
- System Settings
- Garbage Collection
- Interrogation Services
- Bi-Directional, Event Based Replication Configuration
- Registry object in each instance
- Robot Account in each instance to allow the replication of artifacts
- Event Based replication rules to the configured instances
- ./harbor/configuration.tf
- configure your
auth
details to match how your user's will be managed- don't forget to adjust the
configure_auth
variable totrue
- don't forget to adjust the
- adjust any other settings in here to match your desired end state configuration
- configure your
Configuration you want to keep in sync between the two instances, such as:
- projects
- retention policies
- immutable tag rule
# primary instance info
primary_harbor_username = ""
primary_harbor_password = ""
primary_harbor_url = ""
# secondary instance info
secondary_harbor_username = ""
secondary_harbor_password = ""
secondary_harbor_url = ""
# robots - change this to generate a new password for the robots
robot_password_keeper_value = 1
# auth
config_auth = false
# email
config_email = false
email_host = " "
email_username = " "
email_password = " "