back
terraform {
required_providers {
aws = ">= 3.35.0"
}
}
top
module "aws_kms_alias" {
source = "./modules/aws/r/aws_kms_alias"
# name - (optional) is a type of string
name = null
# name_prefix - (optional) is a type of string
name_prefix = null
# target_key_id - (required) is a type of string
target_key_id = null
}
top
variable "name" {
description = "(optional)"
type = string
default = null
}
variable "name_prefix" {
description = "(optional)"
type = string
default = null
}
variable "target_key_id" {
description = "(required)"
type = string
}
top
resource "aws_kms_alias" "this" {
# name - (optional) is a type of string
name = var.name
# name_prefix - (optional) is a type of string
name_prefix = var.name_prefix
# target_key_id - (required) is a type of string
target_key_id = var.target_key_id
}
top
output "arn" {
description = "returns a string"
value = aws_kms_alias.this.arn
}
output "id" {
description = "returns a string"
value = aws_kms_alias.this.id
}
output "target_key_arn" {
description = "returns a string"
value = aws_kms_alias.this.target_key_arn
}
output "this" {
value = aws_kms_alias.this
}
top