Skip to content

Commit

Permalink
Add Computed to snat, mark sub-field Required (#3765)
Browse files Browse the repository at this point in the history
  • Loading branch information
rileykarson authored Jul 22, 2020
1 parent 52bfa13 commit 3342f32
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1114,14 +1114,15 @@ func resourceContainerCluster() *schema.Resource {
Type: schema.TypeList,
MaxItems: 1,
Optional: true,
Computed: true,
Description: `Whether the cluster disables default in-node sNAT rules. In-node sNAT rules will be disabled when defaultSnatStatus is disabled.`,
Elem: &schema.Resource {
Schema: map[string]*schema.Schema {
"disabled": {
Type: schema.TypeBool,
Optional: true,
Required: true,
Description: `When disabled is set to false, default IP masquerade rules will be applied to the nodes to prevent sNAT on cluster internal traffic.`,
},
},
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3532,11 +3532,9 @@ resource "google_container_cluster" "with_private_cluster" {
enable_private_endpoint = true
enable_private_nodes = true
}
default_snat_status{
disabled = false
}
master_authorized_networks_config {
}

master_authorized_networks_config {}

ip_allocation_policy {
cluster_secondary_range_name = google_compute_subnetwork.container_subnetwork.secondary_ip_range[0].range_name
services_secondary_range_name = google_compute_subnetwork.container_subnetwork.secondary_ip_range[1].range_name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,8 @@ subnetwork in which the cluster's instances are launched.
[GKE SNAT](https://cloud.google.com/kubernetes-engine/docs/how-to/ip-masquerade-agent#how_ipmasq_works) DefaultSnatStatus contains the desired state of whether default sNAT should be disabled on the cluster, [API doc](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters#networkconfig).

The `default_snat_status` block supports
* `disabled` - Whether the cluster disables default in-node sNAT rules. In-node sNAT rules will be disabled when defaultSnatStatus is disabled.When disabled is set to false, default IP masquerade rules will be applied to the nodes to prevent sNAT on cluster internal traffic

* `disabled` - (Required) Whether the cluster disables default in-node sNAT rules. In-node sNAT rules will be disabled when defaultSnatStatus is disabled.When disabled is set to false, default IP masquerade rules will be applied to the nodes to prevent sNAT on cluster internal traffic

The `cluster_telemetry` block supports
* `type` - Telemetry integration for the cluster. Supported values (`ENABLE, DISABLE, SYSTEM_ONLY`);
Expand Down

0 comments on commit 3342f32

Please sign in to comment.