1414* limitations under the License.
1515*/
1616
17- data "google_project" "default" {
18- provider = google- beta
19- }
17+ data "google_project" "default" {}
2018
2119# In case the project is in a folder, extract the organization ID from it.
2220data "google_folder" "default" {
23- provider = google- beta
2421 count = data. google_project . default . folder_id != " " ? 1 : 0
2522 folder = data. google_project . default . folder_id
2623 lookup_organization = true
2724}
2825
2926data "google_organization" "default" {
30- provider = google- beta
3127 organization = data. google_project . default . org_id != " " ? data. google_project . default . org_id : data. google_folder . default [0 ]. organization
3228}
3329
3430# [START networksecurity_intercept_basic_consumer]
3531# [START networksecurity_intercept_create_producer_network_tf]
3632resource "google_compute_network" "producer_network" {
37- provider = google- beta
3833 name = " producer-network"
3934 auto_create_subnetworks = false
4035}
4136# [END networksecurity_intercept_create_producer_network_tf]
4237
4338# [START networksecurity_intercept_create_consumer_network_tf]
4439resource "google_compute_network" "consumer_network" {
45- provider = google- beta
4640 name = " consumer-network"
4741 auto_create_subnetworks = false
4842}
4943# [END networksecurity_intercept_create_consumer_network_tf]
5044
5145# [START networksecurity_intercept_create_consumer_subnetwork_tf]
5246resource "google_compute_subnetwork" "consumer_subnet" {
53- provider = google- beta
5447 name = " consumer-subnet"
5548 region = " us-central1"
5649 ip_cidr_range = " 10.10.0.0/16"
@@ -60,7 +53,6 @@ resource "google_compute_subnetwork" "consumer_subnet" {
6053
6154# [START networksecurity_intercept_create_producer_deployment_group_tf]
6255resource "google_network_security_intercept_deployment_group" "default" {
63- provider = google- beta
6456 intercept_deployment_group_id = " intercept-deployment-group"
6557 location = " global"
6658 network = google_compute_network. producer_network . id
@@ -69,7 +61,6 @@ resource "google_network_security_intercept_deployment_group" "default" {
6961
7062# [START networksecurity_intercept_create_endpoint_group_tf]
7163resource "google_network_security_intercept_endpoint_group" "default" {
72- provider = google- beta
7364 intercept_endpoint_group_id = " intercept-endpoint-group"
7465 location = " global"
7566 intercept_deployment_group = google_network_security_intercept_deployment_group. default . id
@@ -78,7 +69,6 @@ resource "google_network_security_intercept_endpoint_group" "default" {
7869
7970# [START networksecurity_intercept_create_endpoint_group_association_tf]
8071resource "google_network_security_intercept_endpoint_group_association" "default" {
81- provider = google- beta
8272 intercept_endpoint_group_association_id = " intercept-endpoint-group-association"
8373 location = " global"
8474 network = google_compute_network. consumer_network . id
@@ -88,7 +78,6 @@ resource "google_network_security_intercept_endpoint_group_association" "default
8878
8979# [START networksecurity_intercept_create_security_profile_tf]
9080resource "google_network_security_security_profile" "default" {
91- provider = google- beta
9281 name = " security-profile"
9382 type = " CUSTOM_INTERCEPT"
9483 parent = " organizations/${ data . google_organization . default . org_id } "
@@ -102,7 +91,6 @@ resource "google_network_security_security_profile" "default" {
10291
10392# [START networksecurity_intercept_create_security_profile_group_tf]
10493resource "google_network_security_security_profile_group" "default" {
105- provider = google- beta
10694 name = " security-profile-group"
10795 parent = " organizations/${ data . google_organization . default . org_id } "
10896 location = " global"
@@ -112,14 +100,12 @@ resource "google_network_security_security_profile_group" "default" {
112100
113101# [START networksecurity_intercept_create_firewall_policy_tf]
114102resource "google_compute_network_firewall_policy" "default" {
115- provider = google- beta
116103 name = " firewall-policy"
117104}
118105# [END networksecurity_intercept_create_firewall_policy_tf]
119106
120107# [START networksecurity_intercept_create_firewall_policy_rule_tf]
121108resource "google_compute_network_firewall_policy_rule" "default" {
122- provider = google- beta
123109 firewall_policy = google_compute_network_firewall_policy. default . name
124110 priority = 1000
125111 action = " apply_security_profile_group"
@@ -138,7 +124,6 @@ resource "google_compute_network_firewall_policy_rule" "default" {
138124
139125# [START networksecurity_intercept_create_firewall_policy_association_tf]
140126resource "google_compute_network_firewall_policy_association" "default" {
141- provider = google- beta
142127 name = " firewall-policy-assoc"
143128 attachment_target = google_compute_network. consumer_network . id
144129 firewall_policy = google_compute_network_firewall_policy. default . name
0 commit comments