-
Notifications
You must be signed in to change notification settings - Fork 0
/
ssm.tf
21 lines (16 loc) · 767 Bytes
/
ssm.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
resource "aws_ssm_parameter" "certificate" {
count = local.ssm_enabled ? 1 : 0
name = format(var.secret_path_format, module.this.id, var.secret_extensions.certificate)
type = "SecureString"
key_id = local.certificate_backend_kms_key_id
value = var.certificate_backends_base64_enabled ? base64encode(local.tls_certificate) : local.tls_certificate
tags = module.this.tags
}
resource "aws_ssm_parameter" "private_key" {
count = local.ssm_enabled ? 1 : 0
name = format(var.secret_path_format, module.this.id, var.secret_extensions.private_key)
type = "SecureString"
key_id = local.certificate_backend_kms_key_id
value = var.certificate_backends_base64_enabled ? base64encode(local.tls_key) : local.tls_key
tags = module.this.tags
}