generated from terraform-modules/template_aws_submodules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
23 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,24 +1,41 @@ | ||
| output "certificate_key" { | ||
| description = "PEM format RSA Key" | ||
| sensitive = true | ||
| value = tls_private_key.certificate.private_key_pem | ||
| value = module.certificate.certificate_key | ||
| } | ||
|
|
||
| output "certificate_csr" { | ||
| description = "PEM format Certificate Signing Request" | ||
| sensitive = false | ||
| value = tls_cert_request.certificate.cert_request_pem | ||
| value = module.certificate.certificate_csr | ||
| } | ||
|
|
||
| output "certificate" { | ||
| description = "PEM format for signed certificate" | ||
| sensitive = false | ||
| value = aws_acmpca_certificate.certificate.certificate | ||
| value = module.certificate.certificate | ||
| } | ||
|
|
||
| output "certificate_chain" { | ||
| description = "PEM format for certificate chain (issuer through root)" | ||
| sensitive = false | ||
| value = local.certificate_chain | ||
| value = module.certificate.certificate_chain | ||
| } | ||
|
|
||
|
|
||
| locals { | ||
| certificate_tls_key = base64encode(module.certificate.certificate_key) | ||
| certificate_chain = replace(module.certificate.certificate_chain, "/\r/", "") | ||
| certificate_crt = module.certificate.certificate | ||
| certificate_tls_crt = base64encode(join("\n", [local.certificate_crt, local.certificate_chain])) | ||
| } | ||
|
|
||
| output "certificate_tls_key" { | ||
| description = "Base64 encoding of PEM format RSA Key for cert-manager tls.key" | ||
| value = local.certificate_tls_key | ||
| } | ||
|
|
||
| output "certificate_tls_crt" { | ||
| description = "Base64 encoding of PEM format of certificate and chain for cert-manager tls.crt" | ||
| value = local.certificate_tls_crt | ||
| } |