Skip to content

Commit

Permalink
remove comments
Browse files Browse the repository at this point in the history
extract ip ranges to variables
remove psc subnet
  • Loading branch information
dudizimber committed Feb 11, 2025
1 parent 19a064c commit ef9ab56
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 36 deletions.
16 changes: 1 addition & 15 deletions tofu/aws/3-application_plane/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,4 @@ module "aws-s3-bucket-access-logs" {
providers = {
aws = aws.app-plane-account
}
}

# module "cloudtrail" {
# source = "trussworks/cloudtrail/aws"
# version = "5.2.0"

# s3_bucket_name = module.aws-s3-bucket.id
# log_retention_days = var.cloudtrail_retention_days

# providers = {
# aws = aws.app-plane-account
# }

# depends_on = [module.aws-s3-bucket, data.aws_iam_policy_document.cloudtrail_bucket_policy]
# }
}
24 changes: 3 additions & 21 deletions tofu/gcp/observability_stack/control_plane/infra/main.tf
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
locals {
// TODO: Change range to /24
ip_range_subnet = "172.16.0.0/20"
ip_range_pods = "172.16.16.0/20"
ip_range_services = "172.16.32.0/20"

ip_range_service_attachment = "172.16.48.0/24"
}

provider "google" {
project = var.project_id
region = var.region
Expand All @@ -25,24 +16,18 @@ module "vpc" {
subnets = [{
subnet_name = "observability-stack-subnet"
subnet_region = var.region
subnet_ip = local.ip_range_subnet
subnet_ip = var.ip_range_subnet
subnet_private_access = true
},
{
subnet_name = "observability-stack-service-attachment"
subnet_region = var.region
subnet_ip = local.ip_range_service_attachment
purpose = "PRIVATE_SERVICE_CONNECT"
}]

secondary_ranges = {
"observability-stack-subnet" = [{
range_name = "pods"
ip_cidr_range = local.ip_range_pods
ip_cidr_range = var.ip_range_pods
},
{
range_name = "services"
ip_cidr_range = local.ip_range_services
ip_cidr_range = var.ip_range_services
}],
}

Expand Down Expand Up @@ -125,9 +110,6 @@ module "gke" {
enable_private_nodes = true
http_load_balancing = true

// TODO: Set master_ipv4_cidr_block
# master_ipv4_cidr_block = local.ip_range_subnet

default_max_pods_per_node = 110

monitoring_enabled_components = ["SYSTEM_COMPONENTS"]
Expand Down
12 changes: 12 additions & 0 deletions tofu/gcp/observability_stack/control_plane/infra/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,15 @@ variable "project_id" {
variable "region" {
type = string
}

variable "ip_range_subnet" {
type = string
}

variable "ip_range_pods" {
type = string
}

variable "ip_range_services" {
type = string
}

0 comments on commit ef9ab56

Please sign in to comment.