Add logConfig to subnetwork resource (#3454)

Signed-off-by: Modular Magician <magic-modules@google.com>
This commit is contained in:
The Magician 2019-04-23 09:45:06 -07:00 committed by Riley Karson
parent 7c37b81a08
commit 86caed3c70

View File

@ -78,6 +78,41 @@ resource "google_compute_network" "custom-test" {
auto_create_subnetworks = false
}
```
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=subnetwork_logging_config_beta&cloudshell_image=gcr.io%2Fgraphite-cloud-shell-images%2Fterraform%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
</a>
</div>
## Example Usage - Subnetwork Logging Config Beta
```hcl
resource "google_compute_subnetwork" "subnet-with-logging" {
provider = "google-beta"
name = "log-test-subnetwork"
ip_cidr_range = "10.2.0.0/16"
region = "us-central1"
network = "${google_compute_network.custom-test.self_link}"
enable_flow_logs = true
log_config {
aggregation_interval = "INTERVAL_10_MIN"
flow_sampling = 0.5
metadata = "INCLUDE_ALL_METADATA"
}
}
resource "google_compute_network" "custom-test" {
provider = "google-beta"
name = "log-test-network"
auto_create_subnetworks = false
}
provider "google-beta"{
region = "us-central1"
zone = "us-central1-a"
}
```
## Argument Reference