Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

# [START vpcflowlogs_create_basic_vpc_flow_logs_config_over_interconnect_attachment]
# google_network_management_vpc_flow_logs_config.vpc_fl_config will be created
resource "google_network_management_vpc_flow_logs_config" "vpc_fl_config" {
interconnect_attachment = "projects/example_project/regions/us-central1/interconnectAttachments/example_interconnect"
location = "global"
project = "example_project"
provider = google-beta
vpc_flow_logs_config_id = "example-config-id"
}
# [END vpcflowlogs_create_basic_vpc_flow_logs_config_over_interconnect_attachment]
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

# [START vpcflowlogs_create_vpc_flow_logs_config_over_interconnect_attachment_with_parameters]
# google_network_management_vpc_flow_logs_config.vpc_fl_config will be created
resource "google_network_management_vpc_flow_logs_config" "vpc_fl_config" {
aggregation_interval = "INTERVAL_10_MIN"
description = "VPC Flow Logs over an Interconnect Attachment."
flow_sampling = 0.7
interconnect_attachment = "projects/example_project/regions/us-central1/interconnectAttachments/example_interconnect"
location = "global"
metadata = "INCLUDE_ALL_METADATA"
project = "example_project"
provider = google-beta
state = "ENABLED"
vpc_flow_logs_config_id = "example-config-id"
}
# [END vpcflowlogs_create_vpc_flow_logs_config_over_interconnect_attachment_with_parameters]
27 changes: 27 additions & 0 deletions network_management/vpc_flow_logs_config/vpn_tunnel_basic/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/**
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

# [START vpcflowlogs_create_basic_vpc_flow_logs_config_over_vpn_tunnel]

# google_network_management_vpc_flow_logs_config.vpc_fl_config will be created
resource "google_network_management_vpc_flow_logs_config" "vpc_fl_config" {
location = "global"
project = "example_project"
provider = google-beta
vpc_flow_logs_config_id = "example-config-id"
vpn_tunnel = "projects/example_project/regions/us-central1/vpnTunnels/example_vpn_tunnel"
}
# [END vpcflowlogs_create_basic_vpc_flow_logs_config_over_vpn_tunnel]
32 changes: 32 additions & 0 deletions network_management/vpc_flow_logs_config/vpn_tunnel_full/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/**
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

# [START vpcflowlogs_create_vpc_flow_logs_config_over_vpn_tunnel_with_parameters]

# google_network_management_vpc_flow_logs_config.vpc_fl_config will be created
resource "google_network_management_vpc_flow_logs_config" "vpc_fl_config" {
aggregation_interval = "INTERVAL_10_MIN"
description = "VPC Flow Logs over a VPN Gateway."
flow_sampling = 0.7
location = "global"
metadata = "INCLUDE_ALL_METADATA"
project = "example_project"
provider = google-beta
state = "ENABLED"
vpc_flow_logs_config_id = "example-config-id"
vpn_tunnel = "projects/example_project/regions/us-central1/vpnTunnels/example_vpn_tunnel"
}
# [END vpcflowlogs_create_vpc_flow_logs_config_over_vpn_tunnel_with_parameters]