Skip to content

Commit

Permalink
tf(harbor-standalone): add docker_daemon_options variable
Browse files Browse the repository at this point in the history
  • Loading branch information
giovannibaratta committed Apr 12, 2024
1 parent a01fd24 commit 6db6a86
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions terraform/modules/harbor-standalone/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ The module deploys Harbor registry in a VM in a vSphere environment.
| fqdn | Fully qualified domain name of the VM | `string` | n/a | yes |
| vm\_authorized\_key | Public key authorized to ssh into the VM | `string` | n/a | yes |
| vsphere | vSphere related references to deploy the VM | <pre>object({<br> resource_pool_id = string<br> datastore_id = string<br> network_id = string<br> template_id = string<br> })</pre> | n/a | yes |
| docker\_daemon\_options | n/a | `map` | `null` | no |
| tls | TLS configuration to use. Private key and certificate must be base64 encoded | <pre>object({<br> private_key = string<br> certificate = string<br> ca_chain = optional(string, null)<br> })</pre> | `null` | no |

## Outputs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ harbor_base64_tls_cert: ${harbor_base64_tls_cert}
%{ if harbor_base64_tls_ca_chain != null ~}
harbor_base64_tls_ca_chain: ${harbor_base64_tls_ca_chain}
%{ endif ~}

%{ if docker_daemon_options != null ~}
docker_daemon_options:
${indent(2, docker_daemon_options)}
%{ endif ~}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
connection: local
become: true

vars_files:
- ./vars.yaml

roles:
- geerlingguy.docker

Expand Down
6 changes: 6 additions & 0 deletions terraform/modules/harbor-standalone/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,10 @@ variable "tls" {
nullable = true
default = null
description = "TLS configuration to use. Private key and certificate must be base64 encoded"
}

variable "docker_daemon_options" {
type = map
nullable = true
default = null
}
2 changes: 1 addition & 1 deletion terraform/modules/harbor-standalone/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.1
2.1.0
1 change: 1 addition & 0 deletions terraform/modules/harbor-standalone/vm.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ locals {
harbor_base64_tls_key = try(var.tls.private_key, null)
harbor_base64_tls_cert = try(var.tls.certificate, null)
harbor_base64_tls_ca_chain = try(var.tls.ca_chain, null)
docker_daemon_options = var.docker_daemon_options != null ? yamlencode(var.docker_daemon_options) : null
})
}

Expand Down

0 comments on commit 6db6a86

Please sign in to comment.