<commit_before>variable network_name {}

variable ingress_tcp_ports {
  default = ["22", "80", "443"]
}

# Network
resource "google_compute_network" "kn-network" {
  name                    = "${var.network_name}"
  auto_create_subnetworks = "true"
}

# Firewall external rules
resource "google_compute_firewall" "kn-firewall-external" {
  name          = "${var.network_name}-firewall-external"
  network       = "${google_compute_network.kn-network.name}"
  source_ranges = ["0.0.0.0/0"]

  allow {
    protocol = "icmp"
  }

  allow {
    protocol = "tcp"
    ports = "${var.ingress_tcp_ports}"
  }
}

# Firewall internal rules
resource "google_compute_firewall" "kn-firewall-internal" {
  name          = "${var.network_name}-firewall-internal"
  network       = "${google_compute_network.kn-network.name}"
  source_ranges = ["10.128.0.0/9"]

  allow {
    protocol = "icmp"
  }

  allow {
    protocol = "tcp"
    ports    = ["0-65535"]
  }

  allow {
    protocol = "udp"
    ports    = ["0-65535"]
  }
}

output "network_name" {
  value = "${google_compute_network.kn-network.name}"
}
<commit_msg>terraform format<commit_after>variable network_name {}

variable ingress_tcp_ports {
  default = ["22", "80", "443"]
}

# Network
resource "google_compute_network" "kn-network" {
  name                    = "${var.network_name}"
  auto_create_subnetworks = "true"
}

# Firewall external rules
resource "google_compute_firewall" "kn-firewall-external" {
  name          = "${var.network_name}-firewall-external"
  network       = "${google_compute_network.kn-network.name}"
  source_ranges = ["0.0.0.0/0"]

  allow {
    protocol = "icmp"
  }

  allow {
    protocol = "tcp"
    ports    = "${var.ingress_tcp_ports}"
  }
}

# Firewall internal rules
resource "google_compute_firewall" "kn-firewall-internal" {
  name          = "${var.network_name}-firewall-internal"
  network       = "${google_compute_network.kn-network.name}"
  source_ranges = ["10.128.0.0/9"]

  allow {
    protocol = "icmp"
  }

  allow {
    protocol = "tcp"
    ports    = ["0-65535"]
  }

  allow {
    protocol = "udp"
    ports    = ["0-65535"]
  }
}

output "network_name" {
  value = "${google_compute_network.kn-network.name}"
}

{'fraction_non_alphanumeric': 0.14905149051490515, 'fraction_numerical': 0.028906955736224028, 'mean_word_length': 2.976660682226212, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1635193', 'n_tokens_mistral': 810, 'n_tokens_neox': 772, 'n_words': 131}