Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 0 additions & 5 deletions network_security/mirroring/basic/consumer/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,20 @@
# [START networksecurity_mirroring_basic_consumer]
# [START networksecurity_mirroring_create_producer_network_tf]
resource "google_compute_network" "producer_network" {
provider = google-beta
name = "producer-network"
auto_create_subnetworks = false
}
# [END networksecurity_mirroring_create_producer_network_tf]

# [START networksecurity_mirroring_create_consumer_network_tf]
resource "google_compute_network" "consumer_network" {
provider = google-beta
name = "consumer-network"
auto_create_subnetworks = false
}
# [END networksecurity_mirroring_create_consumer_network_tf]

# [START networksecurity_mirroring_create_producer_deployment_group_tf]
resource "google_network_security_mirroring_deployment_group" "default" {
provider = google-beta
mirroring_deployment_group_id = "mirroring-deployment-group"
location = "global"
network = google_compute_network.producer_network.id
Expand All @@ -42,7 +39,6 @@ resource "google_network_security_mirroring_deployment_group" "default" {

# [START networksecurity_mirroring_create_endpoint_group_tf]
resource "google_network_security_mirroring_endpoint_group" "default" {
provider = google-beta
mirroring_endpoint_group_id = "mirroring-endpoint-group"
location = "global"
mirroring_deployment_group = google_network_security_mirroring_deployment_group.default.id
Expand All @@ -51,7 +47,6 @@ resource "google_network_security_mirroring_endpoint_group" "default" {

# [START networksecurity_mirroring_create_endpoint_group_association_tf]
resource "google_network_security_mirroring_endpoint_group_association" "default" {
provider = google-beta
mirroring_endpoint_group_association_id = "mirroring-endpoint-group-association"
location = "global"
network = google_compute_network.consumer_network.id
Expand Down
11 changes: 2 additions & 9 deletions network_security/mirroring/basic/producer/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,13 @@
# [START networksecurity_mirroring_basic_producer]
# [START networksecurity_mirroring_create_network_tf]
resource "google_compute_network" "default" {
provider = google-beta
name = "producer-network"
auto_create_subnetworks = false
}
# [END networksecurity_mirroring_create_network_tf]

# [START networksecurity_mirroring_create_subnetwork_tf]
resource "google_compute_subnetwork" "default" {
provider = google-beta
name = "producer-subnet"
region = "us-central1"
ip_cidr_range = "10.1.0.0/16"
Expand All @@ -35,9 +33,8 @@ resource "google_compute_subnetwork" "default" {

# [START networksecurity_mirroring_create_health_check_tf]
resource "google_compute_region_health_check" "default" {
provider = google-beta
name = "deploymnet-hc"
region = "us-central1"
name = "deploymnet-hc"
region = "us-central1"
http_health_check {
port = 80
}
Expand All @@ -46,7 +43,6 @@ resource "google_compute_region_health_check" "default" {

# [START networksecurity_mirroring_create_backend_service_tf]
resource "google_compute_region_backend_service" "default" {
provider = google-beta
name = "deployment-svc"
region = "us-central1"
health_checks = [google_compute_region_health_check.default.id]
Expand All @@ -57,7 +53,6 @@ resource "google_compute_region_backend_service" "default" {

# [START networksecurity_mirroring_create_forwarding_rule_tf]
resource "google_compute_forwarding_rule" "default" {
provider = google-beta
name = "deployment-fr"
region = "us-central1"
network = google_compute_network.default.name
Expand All @@ -72,7 +67,6 @@ resource "google_compute_forwarding_rule" "default" {

# [START networksecurity_mirroring_create_deployment_group_tf]
resource "google_network_security_mirroring_deployment_group" "default" {
provider = google-beta
mirroring_deployment_group_id = "mirroring-deployment-group"
location = "global"
network = google_compute_network.default.id
Expand All @@ -81,7 +75,6 @@ resource "google_network_security_mirroring_deployment_group" "default" {

# [START networksecurity_mirroring_create_deployment_tf]
resource "google_network_security_mirroring_deployment" "default" {
provider = google-beta
mirroring_deployment_id = "mirroring-deployment"
location = "us-central1-a"
forwarding_rule = google_compute_forwarding_rule.default.id
Expand Down