<commit_before># Create the apigeenet network
resource "google_compute_network" "apigeenet" {
  name                    = "apigeenet"
  auto_create_subnetworks = "true"
}

# Create apigeenet-subnet-router
resource "google_compute_router" "apigeenet-subnet-router" {
  name    = "apigeenet-subnet-router"
  region  = "us-central1"
  network = "${google_compute_network.apigeenet.self_link}"

  bgp {
    asn = 64514
  }
}

# Create the gateway nat for the apigeenet-subnet-router
resource "google_compute_router_nat" "apigeenet-subnet-nat" {
  name                               = "apigeenet-subnet-nat"
  router                             = "${google_compute_router.apigeenet-subnet-router.name}"
  region                             = "us-central1"
  nat_ip_allocate_option             = "AUTO_ONLY"
  source_subnetwork_ip_ranges_to_nat = "ALL_SUBNETWORKS_ALL_IP_RANGES"
}

//# Reserve an external address
//resource "google_compute_global_address" "apigeenet-ms-global-address" {
//  name = "apigeenet-ms-global-address"
//}

//output "ms_global_address" {
//  value = "${google_compute_global_address.apigeenet-ms-global-address.address}"
//}

//# Create the global forwarding rule for Apigee MS
//resource "google_compute_global_forwarding_rule" "apigeenet-ms-forwarding-rule" {
//  name       = "apigeenet-ms-forwarding-rule"
//  port_range = "80"
//  ip_address = "${google_compute_global_address.apigeenet-ms-global-address.address}"
//  target     = "${google_compute_target_http_proxy.apigeenet-ms-http-proxy.self_link}"
//}

//resource "google_compute_target_http_proxy" "apigeenet-ms-http-proxy" {
//  name    = "apigeenet-ms-http-proxy"
//  url_map = "${google_compute_url_map.apigeenet-ms-url-map.self_link}"
//}

//resource "google_compute_url_map" "apigeenet-ms-url-map" {
//  name            = "apigeenet-ms-url-map"
//  default_service = "${google_compute_backend_service.apigeenet-ms-backend-service.self_link}"
//}

//resource "google_compute_backend_service" "apigeenet-ms-backend-service" {
//  name             = "apigeenet-ms-backend-service"
//  protocol         = "HTTP"
//  port_name        = "apigeenet-ms-ui-port"
//  timeout_sec      = 10
//  session_affinity = "NONE"
//
//  backend {
//    group = "${google_compute_region_instance_group_manager.apigeenet-ms-group-instance.instance_group}"
//  }
//
//  health_checks = [
//    "${google_compute_http_health_check.apigeenet-ms-http-health-check.self_link}",
//  ]
//}

//resource "google_compute_http_health_check" "apigeenet-ms-http-health-check" {
//  name               = "apigeenet-ms-http-health-check"
//  request_path       = "/v1/servers/self/up"
//  timeout_sec        = 1
//  check_interval_sec = 1
//}

module "configure_apigeenet_firewalls_icmp" {
  source                 = "./apigeenet-firewalls"
  firewall_name          = "apigeenet-allow-icmp-tcp"
  firewall_network       = "${google_compute_network.apigeenet.self_link}"
  firewall_protocol      = "icmp"
  firewall_source_ranges = ["10.0.0.0/8"]
}

module "configure_apigeenet_firewalls_ssh" {
  source                 = "./apigeenet-firewalls"
  firewall_name          = "apigeenet-allow-ssh"
  firewall_network       = "${google_compute_network.apigeenet.self_link}"
  firewall_protocol      = "tcp"
  firewall_ports         = ["22"]<commit_msg>Updated ephermeral ip definition<commit_after># Create the apigeenet network
resource "google_compute_network" "apigeenet" {
  name                    = "apigeenet"
  auto_create_subnetworks = "true"
}

# Create apigeenet-subnet-router
resource "google_compute_router" "apigeenet-subnet-router" {
  name    = "apigeenet-subnet-router"
  region  = "us-central1"
  network = "${google_compute_network.apigeenet.self_link}"

  bgp {
    asn = 64514
  }
}

# Create the gateway nat for the apigeenet-subnet-router
resource "google_compute_router_nat" "apigeenet-subnet-nat" {
  name                               = "apigeenet-subnet-nat"
  router                             = "${google_compute_router.apigeenet-subnet-router.name}"
  region                             = "us-central1"
  nat_ip_allocate_option             = "AUTO_ONLY"
  source_subnetwork_ip_ranges_to_nat = "ALL_SUBNETWORKS_ALL_IP_RANGES"
}

//# Reserve an external address
//resource "google_compute_global_address" "apigeenet-ms-global-address" {
//  name = "apigeenet-ms-global-address"
//}

//output "ms_global_address" {
//  value = "${google_compute_global_address.apigeenet-ms-global-address.address}"
//}

//# Create the global forwarding rule for Apigee MS
//resource "google_compute_global_forwarding_rule" "apigeenet-ms-forwarding-rule" {
//  name       = "apigeenet-ms-forwarding-rule"
//  port_range = "80"
//  ip_address = "${google_compute_global_address.apigeenet-ms-global-address.address}"
//  target     = "${google_compute_target_http_proxy.apigeenet-ms-http-proxy.self_link}"
//}

//resource "google_compute_target_http_proxy" "apigeenet-ms-http-proxy" {
//  name    = "apigeenet-ms-http-proxy"
//  url_map = "${google_compute_url_map.apigeenet-ms-url-map.self_link}"
//}

//resource "google_compute_url_map" "apigeenet-ms-url-map" {
//  name            = "apigeenet-ms-url-map"
//  default_service = "${google_compute_backend_service.apigeenet-ms-backend-service.self_link}"
//}

//resource "google_compute_backend_service" "apigeenet-ms-backend-service" {
//  name             = "apigeenet-ms-backend-service"
//  protocol         = "HTTP"
//  port_name        = "apigeenet-ms-ui-port"
//  timeout_sec      = 10
//  session_affinity = "NONE"
//
//  backend {
//    group = "${google_compute_region_instance_group_manager.apigeenet-ms-group-instance.instance_group}"
//  }
//
//  health_checks = [
//    "${google_compute_http_health_check.apigeenet-ms-http-health-check.self_link}",
//  ]
//}

//resource "google_compute_http_health_check" "apigeenet-ms-http-health-check" {
//  name               = "apigeenet-ms-http-health-check"
//  request_path       = "/v1/servers/self/up"
//  timeout_sec        = 1
//  check_interval_sec = 1
//}

module "configure_apigeenet_firewalls_icmp" {
  source                 = "./apigeenet-firewalls"
  firewall_name          = "apigeenet-allow-icmp"
  firewall_network       = "${google_compute_network.apigeenet.self_link}"
  firewall_protocol      = "icmp"
  firewall_source_ranges = ["10.0.0.0/8"]
}

module "configure_apigeenet_firewalls_ssh" {
  source                 = "./apigeenet-firewalls"
  firewall_name          = "apigeenet-allow-ssh"
  firewall_network       = "${google_compute_network.apigeenet.self_link}"
  firewall_protocol      = "tcp"
  firewall_ports         = ["22"]
{'fraction_non_alphanumeric': 0.13322244064721003, 'fraction_numerical': 0.00665356116739755, 'mean_word_length': 3.001209921355112, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '367375', 'n_tokens_mistral': 2401, 'n_tokens_neox': 2354, 'n_words': 292}