UNCLASSIFIED

output "vpc_id" { output "vpc_id" {
description = "The Virtual Private Cloud (VPC) ID" description = "The Virtual Private Cloud (VPC) ID"
value = module.vpc.vpc_id value = module.vpc.vpc_id
} }
output "private_subnet_ids" { output "private_subnet_ids" {
description = "The list of private subnet IDs in the VPC" description = "The list of private subnet IDs in the VPC"
value = module.vpc.private_subnets value = module.vpc.private_subnets
} }
output "public_subnet_ids" { output "public_subnet_ids" {
description = "Thge list of public subnet IDs in the VPC" description = "Thge list of public subnet IDs in the VPC"
value = module.vpc.public_subnets value = module.vpc.public_subnets
} }
\ No newline at end of file
variable "name" { variable "name" {
description = "The name to apply to the VPC and Subnets" description = "The name to apply to the VPC and Subnets"
type = string type = string
default = "bigbang-dev" default = "bigbang-dev"
} }
variable "vpc_cidr" { variable "vpc_cidr" {
...@@ -11,12 +11,12 @@ variable "vpc_cidr" { ...@@ -11,12 +11,12 @@ variable "vpc_cidr" {
variable "aws_region" { variable "aws_region" {
description = "The AWS region to deploy resources" description = "The AWS region to deploy resources"
type = string type = string
default = "us-gov-west-1" default = "us-gov-west-1"
} }
variable "tags" { variable "tags" {
description = "The tags to apply to resources" description = "The tags to apply to resources"
type = map(string) type = map(string)
default = {} default = {}
} }
\ No newline at end of file
resource "aws_kms_key" "this" { resource "aws_kms_key" "this" {
description = "${var.name} key" description = "${var.name} key"
enable_key_rotation = true enable_key_rotation = true
key_usage = "ENCRYPT_DECRYPT" key_usage = "ENCRYPT_DECRYPT"
tags = merge({}, var.tags) tags = merge({}, var.tags)
} }
...@@ -10,11 +10,11 @@ resource "aws_kms_grant" "grants" { ...@@ -10,11 +10,11 @@ resource "aws_kms_grant" "grants" {
count = length(var.principal_grants) count = length(var.principal_grants)
grantee_principal = var.principal_grants[count.index] grantee_principal = var.principal_grants[count.index]
key_id = aws_kms_key.this.key_id key_id = aws_kms_key.this.key_id
operations = ["Decrypt"] operations = ["Decrypt"]
} }
resource "aws_kms_alias" "this" { resource "aws_kms_alias" "this" {
name = "alias/${var.name}" name = "alias/${var.name}"
target_key_id = aws_kms_key.this.key_id target_key_id = aws_kms_key.this.key_id
} }
variable "name" {} variable "name" {}
variable "principal_grants" { variable "principal_grants" {
type = list(string) type = list(string)
description = "principals to grant Decrypt to" description = "principals to grant Decrypt to"
default = [] default = []
} }
variable "tags" { variable "tags" {
type = map(string) type = map(string)
default = {} default = {}
} }
\ No newline at end of file
variable "name" {} variable "name" {}
variable "bucket_force_destroy" { variable "bucket_force_destroy" {
type = bool type = bool
default = true default = true
} }
variable "tags" { variable "tags" {
type = map(string) type = map(string)
default = {} default = {}
} }
\ No newline at end of file
variable "name" {} variable "name" {}
variable "bucket_force_destroy" { variable "bucket_force_destroy" {
type = bool type = bool
default = true default = true
} }
variable "tags" { variable "tags" {
type = map(string) type = map(string)
default = {} default = {}
} }
\ No newline at end of file
variable "name" {} variable "name" {}
variable "bucket_force_destroy" { variable "bucket_force_destroy" {
type = bool type = bool
default = true default = true
} }
variable "tags" { variable "tags" {
type = map(string) type = map(string)
default = {} default = {}
} }
\ No newline at end of file