Skip to content

Commit

Permalink
Add tpuIpv4CidrBlock for container clusters (#1020)
Browse files Browse the repository at this point in the history
Merged PR #1020.
  • Loading branch information
chrisst authored and modular-magician committed Dec 11, 2018
1 parent 28738b9 commit a02063a
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build/terraform-beta
18 changes: 18 additions & 0 deletions products/container/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ prefix: gcontainer
versions:
- !ruby/object:Api::Product::Version
name: ga
default: true
base_url: https://container.googleapis.com/v1/
- !ruby/object:Api::Product::Version
name: beta
base_url: https://container.googleapis.com/v1beta1/
scopes:
- https://www.googleapis.com/auth/cloud-platform
objects:
Expand Down Expand Up @@ -162,6 +166,20 @@ 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: 'enableTpu'
min_version: beta
description: |
(Optional) Whether to enable Cloud TPU resources in this cluster.
See the official documentation - https://cloud.google.com/tpu/docs/kubernetes-engine-setup
- !ruby/object:Api::Type::String
name: 'tpuIpv4CidrBlock'
output: true
min_version: beta
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: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 -%>
},
}
}
Expand Down Expand Up @@ -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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`).

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

Expand Down

0 comments on commit a02063a

Please sign in to comment.