Skip to content

Commit

Permalink
Add top-level services_ipv4_cidr attr to container_cluster. (#1873)
Browse files Browse the repository at this point in the history
Merged PR #1873.
  • Loading branch information
paddycarver authored and modular-magician committed Jun 3, 2019
1 parent 95153df commit 381f22f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build/terraform
2 changes: 1 addition & 1 deletion build/terraform-beta
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,11 @@ func resourceContainerCluster() *schema.Resource {
Computed: true,
},

"services_ipv4_cidr": {
Type: schema.TypeString,
Computed: true,
},

"ip_allocation_policy": {
Type: schema.TypeList,
MaxItems: 1,
Expand Down Expand Up @@ -1034,6 +1039,7 @@ func resourceContainerClusterRead(d *schema.ResourceData, meta interface{}) erro
d.Set("master_version", cluster.CurrentMasterVersion)
d.Set("node_version", cluster.CurrentNodeVersion)
d.Set("cluster_ipv4_cidr", cluster.ClusterIpv4Cidr)
d.Set("services_ipv4_cidr", cluster.ServicesIpv4Cidr)
d.Set("description", cluster.Description)
d.Set("enable_kubernetes_alpha", cluster.EnableKubernetesAlpha)
d.Set("enable_legacy_abac", cluster.LegacyAbac.Enabled)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ func TestAccContainerCluster_basic(t *testing.T) {
Steps: []resource.TestStep{
{
Config: testAccContainerCluster_basic(clusterName),
Check: resource.ComposeAggregateTestCheckFunc(
resource.TestCheckResourceAttrSet("google_container_cluster.primary", "services_ipv4_cidr"),
),
},
{
ResourceName: "google_container_cluster.primary",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,11 @@ exported:
[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
notation (e.g. `1.2.3.4/29`).

* `services_ipv4_cidr` - The IP address range of the Kubernetes services in this
cluster, in [CIDR](http:en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
notation (e.g. `1.2.3.4/29`). Service addresses are typically put in the last
`/16` from the container CIDR.

<a id="timeouts"></a>
## Timeouts

Expand Down

0 comments on commit 381f22f

Please sign in to comment.