Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
Merge pull request #230 from modular-magician/codegen-pr-2448
Browse files Browse the repository at this point in the history
Inspec dataproc firewalls IT fix
  • Loading branch information
slevenick authored Oct 9, 2019
2 parents 307ff3b + c656964 commit b6d584f
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions test/integration/build/gcp-mm.tf
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,29 @@ resource "google_ml_engine_model" "inspec-gcp-model" {
online_prediction_console_logging = var.ml_model["online_prediction_console_logging"]
}

resource "google_compute_firewall" "dataproc" {
name = "dataproc-firewall"
network = "${google_compute_network.dataproc.name}"

source_ranges = ["10.128.0.0/9"]
allow {
protocol = "icmp"
}

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

resource "google_compute_network" "dataproc" {
name = "dataproc-network"
}

resource "google_dataproc_cluster" "mycluster" {
project = var.gcp_project_id
region = var.gcp_location
Expand Down Expand Up @@ -704,6 +727,7 @@ resource "google_dataproc_cluster" "mycluster" {
}

gce_cluster_config {
network = google_compute_network.dataproc.self_link
tags = [var.dataproc_cluster["config"]["gce_cluster_config"]["tag"]]
}
}
Expand Down

0 comments on commit b6d584f

Please sign in to comment.