Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 0 additions & 87 deletions gcp/modules/tiles_tlog/network.tf
Original file line number Diff line number Diff line change
Expand Up @@ -115,73 +115,6 @@ data "google_compute_network_endpoint_group" "k8s_grpc_neg" {
zone = each.key
}

// TODO: delete this resource
resource "google_compute_security_policy" "k8s_http_grpc_security_policy" {
count = var.freeze_shard ? 0 : 1
name = "${var.shard_name}-k8s-http-grpc-security-policy"
project = var.project_id
type = "CLOUD_ARMOR"

rule {
action = "deny(502)"
priority = "1"

match {
expr {
expression = "int(request.headers['content-length']) > 8388608"
}
}
description = "Block all incoming write requests > 8MB"
}

rule {
action = "throttle"
priority = "10"
match {
versioned_expr = "SRC_IPS_V1"
config {
src_ip_ranges = ["*"]
}
}
rate_limit_options {
enforce_on_key = "IP"
conform_action = "allow"
exceed_action = "deny(429)"
rate_limit_threshold {
count = var.http_grpc_qpm_rate_limit
interval_sec = "60"
}
}
description = "Rate limit all HTTP write traffic by client IP"
}

rule {
action = "allow"
priority = "2147483647"
match {
versioned_expr = "SRC_IPS_V1"
config {
src_ip_ranges = ["*"]
}
}
description = "default rule"
}

advanced_options_config {
json_parsing = "STANDARD"
json_custom_config {
content_types = ["application/json"]
}
}

adaptive_protection_config {
layer_7_ddos_defense_config {
enable = var.enable_adaptive_protection
}
}
}


resource "google_compute_security_policy" "k8s_http_grpc_security_policy_renamed" {
count = var.freeze_shard ? 0 : 1
name = "${var.shard_name}-${var.dns_subdomain_name}-k8s-http-grpc-security-policy"
Expand Down Expand Up @@ -311,26 +244,6 @@ resource "google_compute_backend_service" "k8s_grpc_backend_service" {
}
}

// TODO: delete this resource
resource "google_compute_security_policy" "bucket_security_policy" {
name = "${var.shard_name}-bucket-security-policy"
project = var.project_id
type = "CLOUD_ARMOR_EDGE"

rule {
action = "allow"
priority = "2147483647"
match {
versioned_expr = "SRC_IPS_V1"
config {
src_ip_ranges = ["*"]
}
}
description = "default rule"
}
}


resource "google_compute_backend_bucket" "tessera_backend_bucket" {
name = "${var.shard_name}-${var.bucket_name_suffix}"
project = var.project_id
Expand Down