HC-vault-personal/modules/vpc-secrets/secrets/main.tf

21 lines
700 B
HCL

/**
* Copyright © 2014-2022 HashiCorp, Inc.
*
* This Source Code is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this project, you can obtain one at http://mozilla.org/MPL/2.0/.
*
*/
resource "aws_secretsmanager_secret" "tls" {
name = "${var.resource_name_prefix}-tls-secret"
description = "contains TLS certs and private keys"
kms_key_id = var.kms_key_id
recovery_window_in_days = var.recovery_window
tags = var.tags
}
resource "aws_secretsmanager_secret_version" "tls" {
secret_id = aws_secretsmanager_secret.tls.id
secret_string = local.secret
}