diff --git a/infrastructure/stacks/networking/ssm.tf b/infrastructure/stacks/networking/ssm.tf index 666396b98..8d7b8ed35 100644 --- a/infrastructure/stacks/networking/ssm.tf +++ b/infrastructure/stacks/networking/ssm.tf @@ -1,15 +1,19 @@ -# resource "aws_ssm_parameter" "proxygen_private_key" { -# count = var.environment == "dev" ? 1 : 0 -# name = "/proxygen/private_key" -# type = "SecureString" -# value = var.PROXYGEN_PRIVATE_KEY -# tier = "Advanced" -# -# tags = { -# Stack = local.stack_name -# } -# } -# +resource "aws_ssm_parameter" "proxygen_private_key" { + name = "/${var.environment}/proxygen/private_key" + type = "SecureString" + key_id = aws_kms_key.networking_ssm_key.id + value = var.PROXYGEN_PRIVATE_KEY + tier = "Advanced" + + tags = { + Stack = local.stack_name + } + + lifecycle { + ignore_changes = [value] + } +} + resource "aws_ssm_parameter" "mtls_api_ca_cert" { name = "/${var.environment}/mtls/api_ca_cert" type = "SecureString" diff --git a/infrastructure/stacks/networking/variables.tf b/infrastructure/stacks/networking/variables.tf index 54b28dcef..806508eac 100644 --- a/infrastructure/stacks/networking/variables.tf +++ b/infrastructure/stacks/networking/variables.tf @@ -13,3 +13,8 @@ variable "API_PRIVATE_KEY_CERT" { description = "The private key for the signed Client Certificate" sensitive = true } +variable "PROXYGEN_PRIVATE_KEY" { + type = string + description = "The private key for Proxygen authentication" + sensitive = true +}