Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add upgrade guide for subnetwork log_config #2653

Merged
merged 3 commits into from
Nov 12, 2019
Merged
Changes from 2 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
Expand Up @@ -65,6 +65,7 @@ so Terraform knows to manage them.
- [Resource: `google_compute_region_instance_group_manager`](#resource-google_compute_region_instance_group_manager)
- [Resource: `google_compute_router_peer`](#resource-google_compute_router_peer)
- [Resource: `google_compute_snapshot`](#resource-google_compute_snapshot)
- [Resource: `google_compute_subnetwork`](#resource-google_compute_subnetwork)
- [Resource: `google_container_cluster`](#resource-google_container_cluster)
- [Resource: `google_container_node_pool`](#resource-google_container_node_pool)
- [Resource: `google_dataproc_cluster`](#resource-google_dataproc_cluster)
Expand Down Expand Up @@ -397,6 +398,45 @@ required on the `google_compute_router_peer.advertised_ip_ranges` block.
In an attempt to avoid allowing empty blocks in config files, `raw_key` is now
required on the `google_compute_snapshot.source_disk_encryption_key` block.

## Resource: `google_compute_subnetwork`

### `enable_flow_logs` is now removed

`enable_flow_logs` has been removed and should be replaced by the `log_config` block with configurations
Copy link
Member

@rileykarson rileykarson Nov 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably worth saying "Enablement of flow logs is now controlled by whether log_config is defined or not instead of by the enable_flow_logs variable.", as well as noting that users who have enable_flow_logs = false only need to remove it.

for flow logging.

### Old Config

```hcl
resource "google_compute_subnetwork" "subnet-with-logging" {
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
}
```


### New Config

```hcl
resource "google_compute_subnetwork" "subnet-with-logging" {
name = "log-test-subnetwork"
ip_cidr_range = "10.2.0.0/16"
region = "us-central1"
network = "${google_compute_network.custom-test.self_link}"

log_config {
aggregation_interval = "INTERVAL_10_MIN"
flow_sampling = 0.5
metadata = "INCLUDE_ALL_METADATA"
}
}
```


## Resource: `google_container_cluster`


Expand Down