Skip to content

Commit 1ba058d

Browse files
committed
updated
1 parent de1c0b8 commit 1ba058d

File tree

1 file changed

+11
-11
lines changed
  • examples/global-network-firewall-policy

1 file changed

+11
-11
lines changed

examples/global-network-firewall-policy/main.tf

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ data "google_project" "project" {
2323
}
2424

2525
resource "random_string" "random_suffix" {
26-
length = 6
26+
length = 4
2727
special = false
2828
lower = true
2929
upper = false
@@ -121,7 +121,7 @@ resource "google_network_security_mirroring_endpoint_group" "mirroring_endpoint_
121121

122122
resource "google_network_security_security_profile" "security_profile" {
123123
provider = google-beta
124-
name = "${local.prefix}-security-profile"
124+
name = "${local.prefix}-mirror-sp-${random_string.random_suffix.result}"
125125
parent = "organizations/${var.org_id}"
126126
type = "CUSTOM_MIRRORING"
127127

@@ -132,7 +132,7 @@ resource "google_network_security_security_profile" "security_profile" {
132132

133133
resource "google_network_security_security_profile_group" "security_profile_group" {
134134
provider = google-beta
135-
name = "${local.prefix}-sec-profile-group"
135+
name = "${local.prefix}-mirror-spg-${random_string.random_suffix.result}"
136136
parent = "organizations/${var.org_id}"
137137
custom_mirroring_profile = google_network_security_security_profile.security_profile.id
138138
}
@@ -141,21 +141,21 @@ resource "google_network_security_security_profile_group" "security_profile_grou
141141
# Threat #
142142
################################
143143

144-
resource "google_network_security_security_profile_group" "security_profile_group_1" {
145-
provider = google-beta
146-
name = "spg"
147-
parent = "organizations/${var.org_id}"
148-
threat_prevention_profile = google_network_security_security_profile.security_profile_1.id
149-
}
150-
151144
resource "google_network_security_security_profile" "security_profile_1" {
152145
provider = google-beta
153-
name = "${local.prefix}-threat-sec-profile-group"
146+
name = "${local.prefix}-threat-sp-${random_string.random_suffix.result}"
154147
type = "THREAT_PREVENTION"
155148
parent = "organizations/${var.org_id}"
156149
location = "global"
157150
}
158151

152+
resource "google_network_security_security_profile_group" "security_profile_group_1" {
153+
provider = google-beta
154+
name = "${local.prefix}-threat-spg-${random_string.random_suffix.result}"
155+
parent = "organizations/${var.org_id}"
156+
threat_prevention_profile = google_network_security_security_profile.security_profile_1.id
157+
}
158+
159159
################################
160160
# Firewall Policy #
161161
################################

0 commit comments

Comments
 (0)