-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.tf
56 lines (52 loc) · 1.88 KB
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
terraform {
required_providers {
harbor = {
source = "goharbor/harbor"
version = "3.8.4"
}
}
}
provider "harbor" {
alias = "primary"
url = var.primary_harbor_url
username = var.primary_harbor_username
password = var.primary_harbor_password
}
provider "harbor" {
alias = "secondary"
url = var.secondary_harbor_url
username = var.secondary_harbor_username
password = var.secondary_harbor_password
}
module "primary" {
source = "./harbor"
providers = {
harbor = harbor.primary
}
harbor_url = var.primary_harbor_url
email_host = var.email_host
email_username = var.email_username
email_password = var.email_password
replication_registry_access_id = module.secondary.replication_robot_name
replication_registry_access_secret = module.secondary.replication_robot_secret
replication_registry_url = var.secondary_harbor_url
config_auth = var.config_auth
config_email = var.config_email
robot_password_keeper_value = var.robot_password_keeper_value
}
module "secondary" {
source = "./harbor"
providers = {
harbor = harbor.secondary
}
harbor_url = var.secondary_harbor_url
email_host = var.email_host
email_username = var.email_username
email_password = var.email_password
replication_registry_access_id = module.primary.replication_robot_name
replication_registry_access_secret = module.primary.replication_robot_secret
replication_registry_url = var.primary_harbor_url
config_auth = var.config_auth
config_email = var.config_email
robot_password_keeper_value = var.robot_password_keeper_value
}