Skip to content

Commit

Permalink
Add output descriptions for outputs used in Server 4.x Helm values (#167
Browse files Browse the repository at this point in the history
)

* docs: update output descriptions for GCP re: Helm values

* feat: add description to TF outputs
  • Loading branch information
kelvintaywl authored May 10, 2023
1 parent b889e55 commit 2798ae6
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 14 deletions.
8 changes: 4 additions & 4 deletions nomad-aws/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ There are more examples in the [examples](./examples/) directory.

| Name | Description |
|------|-------------|
| mtls\_enabled | n/a |
| mtls\_enabled | set this value for the `nomad.server.rpc.mTLS.enabled` key in the [CircleCI Server's Helm values.yaml](https://circleci.com/docs/server/installation/installation-reference/#all-values-yaml-options) |
| nomad\_server\_cert | n/a |
| nomad\_server\_key | n/a |
| nomad\_tls\_ca | n/a |
| nomad\_server\_cert\_base64 | n/a |
| nomad\_server\_key\_base64 | n/a |
| nomad\_tls\_ca\_base64 | n/a |
| nomad\_server\_cert\_base64 | set this value for the `nomad.server.rpc.mTLS.certificate` key in the [CircleCI Server's Helm values.yaml](https://circleci.com/docs/server/installation/installation-reference/#all-values-yaml-options) |
| nomad\_server\_key\_base64 | set this value for the `nomad.server.rpc.mTLS.privateKey` key in the [CircleCI Server's Helm values.yaml](https://circleci.com/docs/server/installation/installation-reference/#all-values-yaml-options) |
| nomad\_tls\_ca\_base64 | set this value for the `nomad.server.rpc.mTLS.CACertificate` key in the [CircleCI Server's Helm values.yaml](https://circleci.com/docs/server/installation/installation-reference/#all-values-yaml-options) |
12 changes: 8 additions & 4 deletions nomad-aws/output.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
output "mtls_enabled" {
value = var.enable_mtls
description = "set this value for the `nomad.server.rpc.mTLS.enabled` key in the CircleCI Server's Helm values.yaml"
value = var.enable_mtls
}

output "nomad_server_cert" {
Expand All @@ -15,15 +16,18 @@ output "nomad_tls_ca" {
}

output "nomad_server_cert_base64" {
value = var.enable_mtls ? base64encode(module.nomad_tls[0].nomad_server_cert) : ""
description = "set this value for the `nomad.server.rpc.mTLS.certificate` key in the CircleCI Server's Helm values.yaml"
value = var.enable_mtls ? base64encode(module.nomad_tls[0].nomad_server_cert) : ""
}

output "nomad_server_key_base64" {
value = var.enable_mtls ? nonsensitive(base64encode(module.nomad_tls[0].nomad_server_key)) : ""
description = "set this value for the `nomad.server.rpc.mTLS.privateKey` key in the CircleCI Server's Helm values.yaml"
value = var.enable_mtls ? nonsensitive(base64encode(module.nomad_tls[0].nomad_server_key)) : ""
}

output "nomad_tls_ca_base64" {
value = var.enable_mtls ? base64encode(module.nomad_tls[0].nomad_tls_ca) : ""
description = "set this value for the `nomad.server.rpc.mTLS.CACertificate` key in the CircleCI Server's Helm values.yaml"
value = var.enable_mtls ? base64encode(module.nomad_tls[0].nomad_tls_ca) : ""
}

output "nomad_sg_id" {
Expand Down
6 changes: 3 additions & 3 deletions nomad-gcp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,6 @@ There are more examples in the [examples](./examples/) directory.
| nomad\_server\_cert | n/a |
| nomad\_server\_key | n/a |
| nomad\_tls\_ca | n/a |
| nomad\_server\_cert\_base64 | n/a |
| nomad\_server\_key\_base64 | n/a |
| nomad\_tls\_ca\_base64 | n/a |
| nomad\_server\_cert\_base64 | set this value for the `nomad.server.rpc.mTLS.certificate` key in the [CircleCI Server's Helm values.yaml](https://circleci.com/docs/server/installation/installation-reference/#all-values-yaml-options) |
| nomad\_server\_key\_base64 | set this value for the `nomad.server.rpc.mTLS.privateKey` key in the [CircleCI Server's Helm values.yaml](https://circleci.com/docs/server/installation/installation-reference/#all-values-yaml-options) |
| nomad\_tls\_ca\_base64 | set this value for the `nomad.server.rpc.mTLS.CACertificate` key in the [CircleCI Server's Helm values.yaml](https://circleci.com/docs/server/installation/installation-reference/#all-values-yaml-options) |
9 changes: 6 additions & 3 deletions nomad-gcp/output.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,18 @@ output "nomad_tls_ca" {
}

output "nomad_server_cert_base64" {
value = var.unsafe_disable_mtls ? "" : base64encode(module.tls[0].nomad_server_cert)
description = "set this value for the `nomad.server.rpc.mTLS.certificate` key in the CircleCI Server's Helm values.yaml"
value = var.unsafe_disable_mtls ? "" : base64encode(module.tls[0].nomad_server_cert)
}

output "nomad_server_key_base64" {
value = var.unsafe_disable_mtls ? "" : nonsensitive(base64encode(module.tls[0].nomad_server_key))
description = "set this value for the `nomad.server.rpc.mTLS.privateKey` key in the CircleCI Server's Helm values.yaml"
value = var.unsafe_disable_mtls ? "" : nonsensitive(base64encode(module.tls[0].nomad_server_key))
}

output "nomad_tls_ca_base64" {
value = var.unsafe_disable_mtls ? "" : base64encode(module.tls[0].nomad_tls_ca)
description = "set this value for the `nomad.server.rpc.mTLS.CACertificate` key in the CircleCI Server's Helm values.yaml"
value = var.unsafe_disable_mtls ? "" : base64encode(module.tls[0].nomad_tls_ca)
}

output "managed_instance_group_name" {
Expand Down

0 comments on commit 2798ae6

Please sign in to comment.