diff --git a/products/container/api.yaml b/products/container/api.yaml index de2926b672cf..5daab3e206b8 100644 --- a/products/container/api.yaml +++ b/products/container/api.yaml @@ -162,6 +162,13 @@ objects: The IP address range of the container pods in this cluster, in CIDR notation (e.g. 10.96.0.0/14). Leave blank to have one automatically chosen or specify a /14 block in 10.0.0.0/8. + - !ruby/object:Api::Type::String + name: 'tpuIpv4CidrBlock' + output: true + description: | + The IP address range of the Cloud TPUs in this cluster, in + [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + notation (e.g. `1.2.3.4/29`). - !ruby/object:Api::Type::NestedObject name: 'addonsConfig' description: | diff --git a/third_party/terraform/resources/resource_container_cluster.go.erb b/third_party/terraform/resources/resource_container_cluster.go.erb index c8c519282d33..1db176c53779 100644 --- a/third_party/terraform/resources/resource_container_cluster.go.erb +++ b/third_party/terraform/resources/resource_container_cluster.go.erb @@ -612,6 +612,13 @@ func resourceContainerCluster() *schema.Resource { Optional: true, Elem: &schema.Schema{Type: schema.TypeString}, }, + +<% unless version == 'ga' -%> + "tpu_ipv4_cidr_block": { + Computed: true, + Type: schema.TypeString, + }, +<% end -%> }, } } @@ -841,6 +848,7 @@ func resourceContainerClusterRead(d *schema.ResourceData, meta interface{}) erro <% unless version == 'ga' -%> d.Set("enable_binary_authorization", cluster.BinaryAuthorization != nil && cluster.BinaryAuthorization.Enabled) d.Set("enable_tpu", cluster.EnableTpu) + d.Set("tpu_ipv4_cidr_block", cluster.TpuIpv4CidrBlock) if err := d.Set("cluster_autoscaling", flattenClusterAutoscaling(cluster.Autoscaling)); err != nil { return err } diff --git a/third_party/terraform/website/docs/r/container_cluster.html.markdown b/third_party/terraform/website/docs/r/container_cluster.html.markdown index 07bd79efc32a..ed9cc1093ebc 100644 --- a/third_party/terraform/website/docs/r/container_cluster.html.markdown +++ b/third_party/terraform/website/docs/r/container_cluster.html.markdown @@ -461,6 +461,10 @@ exported: be different than the `min_master_version` set in the config if the master has been updated by GKE. +* `tpu_ipv4_cidr_block` - The IP address range of the Cloud TPUs in this cluster, in + [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + notation (e.g. `1.2.3.4/29`). + ## Timeouts