automated terminal push

This commit is contained in:
lenape
2025-08-03 16:43:29 +00:00
parent a05b729062
commit 4633bd7c36
3 changed files with 17 additions and 17 deletions

View File

@@ -68,7 +68,7 @@ resource "aws_subnet" "private" {
resource "aws_eip" "nat" {
count = var.enable_private_subnets && var.enable_nat_gateway ? (var.single_nat_gateway ? 1 : 2) : 0
domain = "vpc"
domain = "vpc"
depends_on = [aws_internet_gateway.main]
tags = {
@@ -118,7 +118,7 @@ resource "aws_route_table" "private" {
dynamic "route" {
for_each = var.enable_nat_gateway ? [1] : []
content {
cidr_block = "0.0.0.0/0"
cidr_block = "0.0.0.0/0"
# If single NAT gateway, all route tables use index 0, otherwise use the route table's index
nat_gateway_id = aws_nat_gateway.main[var.single_nat_gateway ? 0 : count.index].id
}
@@ -314,9 +314,9 @@ resource "aws_s3_bucket_public_access_block" "terraform_state" {
# DynamoDB Table for Terraform State Locking
resource "aws_dynamodb_table" "terraform_locks" {
name = "${var.project_name}-terraform-locks"
billing_mode = "PAY_PER_REQUEST"
hash_key = "LockID"
name = "${var.project_name}-terraform-locks"
billing_mode = "PAY_PER_REQUEST"
hash_key = "LockID"
attribute {
name = "LockID"

View File

@@ -84,7 +84,7 @@ output "ecs_tasks_security_group_id" {
output "vpc_endpoints_security_group_id" {
description = "ID of the VPC endpoints security group"
value = null # Not created in free tier version to avoid costs
value = null # Not created in free tier version to avoid costs
}
# Route Table Information
@@ -106,17 +106,17 @@ output "s3_vpc_endpoint_id" {
output "ecr_dkr_vpc_endpoint_id" {
description = "ID of the ECR Docker VPC endpoint"
value = null # Disabled in free tier version
value = null # Disabled in free tier version
}
output "ecr_api_vpc_endpoint_id" {
description = "ID of the ECR API VPC endpoint"
value = null # Disabled in free tier version
value = null # Disabled in free tier version
}
output "logs_vpc_endpoint_id" {
description = "ID of the CloudWatch Logs VPC endpoint"
value = null # Disabled in free tier version
value = null # Disabled in free tier version
}
# Terraform Backend Information

View File

@@ -40,25 +40,25 @@ variable "enable_dns_support" {
variable "enable_nat_gateway" {
description = "Enable NAT gateways for private subnets (only relevant if private subnets enabled)"
type = bool
default = false # Default false for free tier
default = false # Default false for free tier
}
variable "single_nat_gateway" {
description = "Use a single NAT gateway instead of one per AZ (cost optimization)"
type = bool
default = true # Default true for cost optimization when NAT is enabled
default = true # Default true for cost optimization when NAT is enabled
}
variable "enable_private_subnets" {
description = "Enable private subnets (requires NAT Gateway for internet access)"
type = bool
default = false # Set to false for free tier to avoid NAT Gateway costs
default = false # Set to false for free tier to avoid NAT Gateway costs
}
variable "enable_vpc_endpoints" {
description = "Enable VPC endpoints for AWS services (costs extra)"
type = bool
default = false # Set to false for free tier to avoid interface endpoint costs
default = false # Set to false for free tier to avoid interface endpoint costs
}
variable "cost_optimization_mode" {
@@ -71,9 +71,9 @@ variable "common_tags" {
description = "Common tags to apply to all resources"
type = map(string)
default = {
Terraform = "true"
Project = "enterprise-cicd"
Owner = "devops-team"
CostCenter = "engineering"
Terraform = "true"
Project = "enterprise-cicd"
Owner = "devops-team"
CostCenter = "engineering"
}
}