Skip to content

Commit

Permalink
Add logConfig to subnetwork resource (#3454)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored and rileykarson committed Apr 23, 2019
1 parent 7c37b81 commit 86caed3
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions website/docs/r/compute_subnetwork.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 86caed3

Please sign in to comment.