From c78030785185006c8f940ef4b49ee64dc4fc5bd6 Mon Sep 17 00:00:00 2001 From: Ivan Kornienko Date: Wed, 26 Jun 2019 20:50:11 +0300 Subject: [PATCH] Fixed doc generator --- README.md | 72 ++++++++++- autogen/README.md | 4 +- examples/deploy_service/README.md | 5 +- examples/disable_client_cert/README.md | 5 +- examples/node_pool/README.md | 7 +- examples/shared_vpc/README.md | 5 +- examples/simple_regional/README.md | 5 +- examples/simple_regional_private/README.md | 5 +- examples/simple_zonal/README.md | 7 +- examples/simple_zonal_private/README.md | 7 +- examples/stub_domains/README.md | 5 +- examples/stub_domains_private/README.md | 5 +- helpers/combine_docfiles.py | 58 --------- modules/private-cluster/README.md | 79 +++++++++++- modules/private-cluster/variables.tf | 141 ++++++++++----------- test/make.sh | 11 +- variables.tf | 121 ++++++++---------- 17 files changed, 298 insertions(+), 244 deletions(-) delete mode 100644 helpers/combine_docfiles.py diff --git a/README.md b/README.md index 4f48a96b50..86b79933ed 100644 --- a/README.md +++ b/README.md @@ -108,8 +108,76 @@ Version 1.0.0 of this module introduces a breaking change: adding the `disable-l In either case, upgrading to module version `v1.0.0` will trigger a recreation of all node pools in the cluster. -[^]: (autogen_docs_start) -[^]: (autogen_docs_end) + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|:----:|:-----:|:-----:| +| basic\_auth\_password | The password to be used with Basic Authentication. | string | `""` | no | +| basic\_auth\_username | The username to be used with Basic Authentication. An empty value will disable Basic Authentication, which is the recommended configuration. | string | `""` | no | +| description | The description of the cluster | string | `""` | no | +| disable\_legacy\_metadata\_endpoints | Disable the /0.1/ and /v1beta1/ metadata server endpoints on the node. Changing this value will cause all node pools to be recreated. | bool | `"true"` | no | +| horizontal\_pod\_autoscaling | Enable horizontal pod autoscaling addon | bool | `"true"` | no | +| http\_load\_balancing | Enable httpload balancer addon | bool | `"true"` | no | +| initial\_node\_count | The number of nodes to create in this cluster's default node pool. | number | `"0"` | no | +| ip\_masq\_link\_local | Whether to masquerade traffic to the link-local prefix (169.254.0.0/16). | bool | `"false"` | no | +| ip\_masq\_resync\_interval | The interval at which the agent attempts to sync its ConfigMap file from the disk. | string | `"60s"` | no | +| ip\_range\_pods | The _name_ of the secondary subnet ip range to use for pods | string | n/a | yes | +| ip\_range\_services | The _name_ of the secondary subnet range to use for services | string | n/a | yes | +| issue\_client\_certificate | Issues a client certificate to authenticate to the cluster endpoint. To maximize the security of your cluster, leave this option disabled. Client certificates don't automatically rotate and aren't easily revocable. WARNING: changing this after cluster creation is destructive! | bool | `"false"` | no | +| kubernetes\_dashboard | Enable kubernetes dashboard addon | bool | `"false"` | no | +| kubernetes\_version | The Kubernetes version of the masters. If set to 'latest' it will pull latest available version in the selected region. | string | `"latest"` | no | +| logging\_service | The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none | string | `"logging.googleapis.com"` | no | +| maintenance\_start\_time | Time window specified for daily maintenance operations in RFC3339 format | string | `"05:00"` | no | +| master\_authorized\_networks\_config | The desired configuration options for master authorized networks. Omit the nested cidr_blocks attribute to disallow external access (except the cluster node IPs, which GKE automatically whitelists) | object | `` | no | +| monitoring\_service | The monitoring service that the cluster should write metrics to. Automatically send metrics from pods in the cluster to the Google Cloud Monitoring API. VM metrics will be collected by Google Compute Engine regardless of this setting Available options include monitoring.googleapis.com, monitoring.googleapis.com/kubernetes (beta) and none | string | `"monitoring.googleapis.com"` | no | +| name | The name of the cluster (required) | string | n/a | yes | +| network | The VPC network to host the cluster in (required) | string | n/a | yes | +| network\_policy | Enable network policy addon | bool | `"false"` | no | +| network\_policy\_provider | The network policy provider. | string | `"CALICO"` | no | +| network\_project\_id | The project ID of the shared VPC's host (for shared vpc support) | string | `""` | no | +| node\_pools | List of maps containing node pools | list(map(string)) | `` | no | +| node\_pools\_labels | Map of maps containing node labels by node-pool name | map(map(string)) | `` | no | +| node\_pools\_metadata | Map of maps containing node metadata by node-pool name | map(map(string)) | `` | no | +| node\_pools\_oauth\_scopes | Map of lists containing node oauth scopes by node-pool name | map(list(string)) | `` | no | +| node\_pools\_tags | Map of lists containing node network tags by node-pool name | map(list(string)) | `` | no | +| node\_pools\_taints | Map of lists containing node taints by node-pool name | object | `` | no | +| node\_version | The Kubernetes version of the node pools. Defaults kubernetes_version (master) variable and can be overridden for individual node pools by setting the `version` key on them. Must be empyty or set the same as master at cluster creation. | string | `""` | no | +| non\_masquerade\_cidrs | List of strings in CIDR notation that specify the IP address ranges that do not use IP masquerading. | list(string) | `` | no | +| project\_id | The project ID to host the cluster in (required) | string | n/a | yes | +| region | The region to host the cluster in (required) | string | n/a | yes | +| regional | Whether is a regional cluster (zonal cluster if set false. WARNING: changing this after cluster creation is destructive!) | bool | `"true"` | no | +| remove\_default\_node\_pool | Remove default node pool while setting up the cluster | bool | `"false"` | no | +| service\_account | The service account to run nodes as if not overridden in `node_pools`. The default value will cause a cluster-specific service account to be created. | string | `"create"` | no | +| stub\_domains | Map of stub domains and their resolvers to forward DNS queries for a certain domain to an external DNS server | map(list(string)) | `` | no | +| subnetwork | The subnetwork to host the cluster in (required) | string | n/a | yes | +| zones | The zones to host the cluster in (optional if regional cluster / required if zonal) | list(string) | `` | no | + +## Outputs + +| Name | Description | +|------|-------------| +| ca\_certificate | Cluster ca certificate (base64 encoded) | +| endpoint | Cluster endpoint | +| horizontal\_pod\_autoscaling\_enabled | Whether horizontal pod autoscaling enabled | +| http\_load\_balancing\_enabled | Whether http load balancing enabled | +| kubernetes\_dashboard\_enabled | Whether kubernetes dashboard enabled | +| location | Cluster location (region if regional cluster, zone if zonal cluster) | +| logging\_service | Logging service used | +| master\_authorized\_networks\_config | Networks from which access to master is permitted | +| master\_version | Current master kubernetes version | +| min\_master\_version | Minimum master kubernetes version | +| monitoring\_service | Monitoring service used | +| name | Cluster name | +| network\_policy\_enabled | Whether network policy enabled | +| node\_pools\_names | List of node pools names | +| node\_pools\_versions | List of node pools versions | +| region | Cluster region | +| service\_account | The service account to default running nodes as if not overridden in `node_pools`. | +| type | Cluster type (regional / zonal) | +| zones | List of zones in which the cluster resides | + + ## Requirements diff --git a/autogen/README.md b/autogen/README.md index 1e3b4a44fa..dfe4e4e626 100644 --- a/autogen/README.md +++ b/autogen/README.md @@ -118,8 +118,8 @@ Version 1.0.0 of this module introduces a breaking change: adding the `disable-l In either case, upgrading to module version `v1.0.0` will trigger a recreation of all node pools in the cluster. -[^]: (autogen_docs_start) -[^]: (autogen_docs_end) + + ## Requirements diff --git a/examples/deploy_service/README.md b/examples/deploy_service/README.md index 4b43c09e72..5dcb7ca7a7 100644 --- a/examples/deploy_service/README.md +++ b/examples/deploy_service/README.md @@ -8,8 +8,7 @@ It will: - Create an Nginx Pod - Create an Nginx Service -[^]: (autogen_docs_start) - + ## Inputs | Name | Description | Type | Default | Required | @@ -42,7 +41,7 @@ It will: | subnetwork | | | zones | List of zones in which the cluster resides | -[^]: (autogen_docs_end) + To provision this example, run the following from within this directory: - `terraform init` to get the plugins diff --git a/examples/disable_client_cert/README.md b/examples/disable_client_cert/README.md index 929ba1926e..14dd6545c0 100644 --- a/examples/disable_client_cert/README.md +++ b/examples/disable_client_cert/README.md @@ -5,8 +5,7 @@ This example illustrates how to create a simple cluster and disable deprecated s * basic auth * client certificate -[^]: (autogen_docs_start) - + ## Inputs | Name | Description | Type | Default | Required | @@ -41,7 +40,7 @@ This example illustrates how to create a simple cluster and disable deprecated s | subnetwork | | | zones | List of zones in which the cluster resides | -[^]: (autogen_docs_end) + To provision this example, run the following from within this directory: - `terraform init` to get the plugins diff --git a/examples/node_pool/README.md b/examples/node_pool/README.md index 2146e2c53f..9215f091cb 100644 --- a/examples/node_pool/README.md +++ b/examples/node_pool/README.md @@ -2,8 +2,7 @@ This example illustrates how to create a cluster with multiple custom node-pool configurations with node labels, taints, and network tags. -[^]: (autogen_docs_start) - + ## Inputs | Name | Description | Type | Default | Required | @@ -16,7 +15,7 @@ This example illustrates how to create a cluster with multiple custom node-pool | project\_id | The project ID to host the cluster in | string | n/a | yes | | region | The region to host the cluster in | string | n/a | yes | | subnetwork | The subnetwork to host the cluster in | string | n/a | yes | -| zones | The zone to host the cluster in (required if is a zonal cluster) | list | n/a | yes | +| zones | The zone to host the cluster in (required if is a zonal cluster) | list(string) | n/a | yes | ## Outputs @@ -37,7 +36,7 @@ This example illustrates how to create a cluster with multiple custom node-pool | subnetwork | | | zones | List of zones in which the cluster resides | -[^]: (autogen_docs_end) + To provision this example, run the following from within this directory: - `terraform init` to get the plugins diff --git a/examples/shared_vpc/README.md b/examples/shared_vpc/README.md index d66cdd5fc4..3b0f5a6157 100644 --- a/examples/shared_vpc/README.md +++ b/examples/shared_vpc/README.md @@ -2,8 +2,7 @@ This example illustrates how to create a simple cluster where the host network is not necessarily in the same project as the cluster. -[^]: (autogen_docs_start) - + ## Inputs | Name | Description | Type | Default | Required | @@ -37,7 +36,7 @@ This example illustrates how to create a simple cluster where the host network i | subnetwork | | | zones | List of zones in which the cluster resides | -[^]: (autogen_docs_end) + To provision this example, run the following from within this directory: - `terraform init` to get the plugins diff --git a/examples/simple_regional/README.md b/examples/simple_regional/README.md index 741c40c32b..fb209e47b5 100644 --- a/examples/simple_regional/README.md +++ b/examples/simple_regional/README.md @@ -2,8 +2,7 @@ This example illustrates how to create a simple cluster. -[^]: (autogen_docs_start) - + ## Inputs | Name | Description | Type | Default | Required | @@ -36,7 +35,7 @@ This example illustrates how to create a simple cluster. | subnetwork | | | zones | List of zones in which the cluster resides | -[^]: (autogen_docs_end) + To provision this example, run the following from within this directory: - `terraform init` to get the plugins diff --git a/examples/simple_regional_private/README.md b/examples/simple_regional_private/README.md index 9987f9dad0..8175482731 100644 --- a/examples/simple_regional_private/README.md +++ b/examples/simple_regional_private/README.md @@ -2,8 +2,7 @@ This example illustrates how to create a simple private cluster. -[^]: (autogen_docs_start) - + ## Inputs | Name | Description | Type | Default | Required | @@ -36,7 +35,7 @@ This example illustrates how to create a simple private cluster. | subnetwork | | | zones | List of zones in which the cluster resides | -[^]: (autogen_docs_end) + To provision this example, run the following from within this directory: - `terraform init` to get the plugins diff --git a/examples/simple_zonal/README.md b/examples/simple_zonal/README.md index 229fde7028..691f95c719 100644 --- a/examples/simple_zonal/README.md +++ b/examples/simple_zonal/README.md @@ -2,8 +2,7 @@ This example illustrates how to create a simple cluster. -[^]: (autogen_docs_start) - + ## Inputs | Name | Description | Type | Default | Required | @@ -15,7 +14,7 @@ This example illustrates how to create a simple cluster. | project\_id | The project ID to host the cluster in | string | n/a | yes | | region | The region to host the cluster in | string | n/a | yes | | subnetwork | The subnetwork to host the cluster in | string | n/a | yes | -| zones | The zone to host the cluster in (required if is a zonal cluster) | list | n/a | yes | +| zones | The zone to host the cluster in (required if is a zonal cluster) | list(string) | n/a | yes | ## Outputs @@ -36,7 +35,7 @@ This example illustrates how to create a simple cluster. | subnetwork | | | zones | List of zones in which the cluster resides | -[^]: (autogen_docs_end) + To provision this example, run the following from within this directory: - `terraform init` to get the plugins diff --git a/examples/simple_zonal_private/README.md b/examples/simple_zonal_private/README.md index 0e2c56ff7a..e576800d72 100644 --- a/examples/simple_zonal_private/README.md +++ b/examples/simple_zonal_private/README.md @@ -2,8 +2,7 @@ This example illustrates how to create a simple private cluster. -[^]: (autogen_docs_start) - + ## Inputs | Name | Description | Type | Default | Required | @@ -16,7 +15,7 @@ This example illustrates how to create a simple private cluster. | project\_id | The project ID to host the cluster in | string | n/a | yes | | region | The region to host the cluster in | string | n/a | yes | | subnetwork | The subnetwork to host the cluster in | string | n/a | yes | -| zones | The zone to host the cluster in (required if is a zonal cluster) | list | n/a | yes | +| zones | The zone to host the cluster in (required if is a zonal cluster) | list(string) | n/a | yes | ## Outputs @@ -37,7 +36,7 @@ This example illustrates how to create a simple private cluster. | subnetwork | | | zones | List of zones in which the cluster resides | -[^]: (autogen_docs_end) + To provision this example, run the following from within this directory: - `terraform init` to get the plugins diff --git a/examples/stub_domains/README.md b/examples/stub_domains/README.md index 4c380ada81..126a1cd54c 100644 --- a/examples/stub_domains/README.md +++ b/examples/stub_domains/README.md @@ -7,8 +7,7 @@ It will: - Remove the default kube-dns configmap - Add a new kube-dns configmap with custom stub domains -[^]: (autogen_docs_start) - + ## Inputs | Name | Description | Type | Default | Required | @@ -41,7 +40,7 @@ It will: | subnetwork | | | zones | List of zones in which the cluster resides | -[^]: (autogen_docs_end) + To provision this example, run the following from within this directory: - `terraform init` to get the plugins diff --git a/examples/stub_domains_private/README.md b/examples/stub_domains_private/README.md index 469ae9f259..ee4b89fa7f 100644 --- a/examples/stub_domains_private/README.md +++ b/examples/stub_domains_private/README.md @@ -9,8 +9,7 @@ It will: - Remove the default kube-dns configmap - Add a new kube-dns configmap with custom stub domains -[^]: (autogen_docs_start) - + ## Inputs | Name | Description | Type | Default | Required | @@ -43,7 +42,7 @@ It will: | subnetwork | | | zones | List of zones in which the cluster resides | -[^]: (autogen_docs_end) + To provision this example, run the following from within this directory: diff --git a/helpers/combine_docfiles.py b/helpers/combine_docfiles.py deleted file mode 100644 index 8f13487efc..0000000000 --- a/helpers/combine_docfiles.py +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env python3 - -# Copyright 2018 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -''' Combine file from: - * script argument 1 - with content of file from: - * script argument 2 - using the beginning of line separators - hardcoded using regexes in this file: - - We exclude any text using the separate - regex specified here -''' - -import os -import re -import sys - -insert_separator_regex = r'(.*?\[\^\]\:\ \(autogen_docs_start\))(.*?)(\n\[\^\]\:\ \(autogen_docs_end\).*?$)' # noqa: E501 -exclude_separator_regex = r'(.*?)Copyright 20\d\d Google LLC.*?limitations under the License.(.*?)$' # noqa: E501 - -if len(sys.argv) != 3: - sys.exit(1) - -if not os.path.isfile(sys.argv[1]): - sys.exit(0) - -input = open(sys.argv[1], "r").read() -replace_content = open(sys.argv[2], "r").read() - -# Exclude the specified content from the replacement content -matched = re.match( - exclude_separator_regex, - replace_content, - re.DOTALL -) - -if matched: - groups = matched.groups(0) - replace_content = groups[0] + groups[1] - - # Find where to put the replacement content, overwrite the input file - groups = re.match(insert_separator_regex, input, re.DOTALL).groups(0) - output = groups[0] + replace_content + groups[2] + "\n" - open(sys.argv[1], "w").write(output) diff --git a/modules/private-cluster/README.md b/modules/private-cluster/README.md index 695e79346e..1f7f952c2b 100644 --- a/modules/private-cluster/README.md +++ b/modules/private-cluster/README.md @@ -113,8 +113,83 @@ Version 1.0.0 of this module introduces a breaking change: adding the `disable-l In either case, upgrading to module version `v1.0.0` will trigger a recreation of all node pools in the cluster. -[^]: (autogen_docs_start) -[^]: (autogen_docs_end) + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|:----:|:-----:|:-----:| +| basic\_auth\_password | The password to be used with Basic Authentication. | string | `""` | no | +| basic\_auth\_username | The username to be used with Basic Authentication. An empty value will disable Basic Authentication, which is the recommended configuration. | string | `""` | no | +| deploy\_using\_private\_endpoint | (Beta) A toggle for Terraform and kubectl to connect to the master's internal IP address during deployment. | bool | `"false"` | no | +| description | The description of the cluster | string | `""` | no | +| disable\_legacy\_metadata\_endpoints | Disable the /0.1/ and /v1beta1/ metadata server endpoints on the node. Changing this value will cause all node pools to be recreated. | bool | `"true"` | no | +| enable\_binary\_authorization | Enable BinAuthZ Admission controller | string | `"false"` | no | +| enable\_private\_endpoint | (Beta) Whether the master's internal IP address is used as the cluster endpoint | bool | `"false"` | no | +| enable\_private\_nodes | (Beta) Whether nodes have internal IP addresses only | bool | `"false"` | no | +| horizontal\_pod\_autoscaling | Enable horizontal pod autoscaling addon | bool | `"true"` | no | +| http\_load\_balancing | Enable httpload balancer addon | bool | `"true"` | no | +| initial\_node\_count | The number of nodes to create in this cluster's default node pool. | number | `"0"` | no | +| ip\_masq\_link\_local | Whether to masquerade traffic to the link-local prefix (169.254.0.0/16). | bool | `"false"` | no | +| ip\_masq\_resync\_interval | The interval at which the agent attempts to sync its ConfigMap file from the disk. | string | `"60s"` | no | +| ip\_range\_pods | The _name_ of the secondary subnet ip range to use for pods | string | n/a | yes | +| ip\_range\_services | The _name_ of the secondary subnet range to use for services | string | n/a | yes | +| issue\_client\_certificate | Issues a client certificate to authenticate to the cluster endpoint. To maximize the security of your cluster, leave this option disabled. Client certificates don't automatically rotate and aren't easily revocable. WARNING: changing this after cluster creation is destructive! | bool | `"false"` | no | +| kubernetes\_dashboard | Enable kubernetes dashboard addon | bool | `"false"` | no | +| kubernetes\_version | The Kubernetes version of the masters. If set to 'latest' it will pull latest available version in the selected region. | string | `"latest"` | no | +| logging\_service | The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none | string | `"logging.googleapis.com"` | no | +| maintenance\_start\_time | Time window specified for daily maintenance operations in RFC3339 format | string | `"05:00"` | no | +| master\_authorized\_networks\_config | The desired configuration options for master authorized networks. Omit the nested cidr_blocks attribute to disallow external access (except the cluster node IPs, which GKE automatically whitelists) | object | `` | no | +| master\_ipv4\_cidr\_block | (Beta) The IP range in CIDR notation to use for the hosted master network | string | `"10.0.0.0/28"` | no | +| monitoring\_service | The monitoring service that the cluster should write metrics to. Automatically send metrics from pods in the cluster to the Google Cloud Monitoring API. VM metrics will be collected by Google Compute Engine regardless of this setting Available options include monitoring.googleapis.com, monitoring.googleapis.com/kubernetes (beta) and none | string | `"monitoring.googleapis.com"` | no | +| name | The name of the cluster (required) | string | n/a | yes | +| network | The VPC network to host the cluster in (required) | string | n/a | yes | +| network\_policy | Enable network policy addon | bool | `"false"` | no | +| network\_policy\_provider | The network policy provider. | string | `"CALICO"` | no | +| network\_project\_id | The project ID of the shared VPC's host (for shared vpc support) | string | `""` | no | +| node\_pools | List of maps containing node pools | list(map(string)) | `` | no | +| node\_pools\_labels | Map of maps containing node labels by node-pool name | map(map(string)) | `` | no | +| node\_pools\_metadata | Map of maps containing node metadata by node-pool name | map(map(string)) | `` | no | +| node\_pools\_oauth\_scopes | Map of lists containing node oauth scopes by node-pool name | map(list(string)) | `` | no | +| node\_pools\_tags | Map of lists containing node network tags by node-pool name | map(list(string)) | `` | no | +| node\_pools\_taints | Map of lists containing node taints by node-pool name | object | `` | no | +| node\_version | The Kubernetes version of the node pools. Defaults kubernetes_version (master) variable and can be overridden for individual node pools by setting the `version` key on them. Must be empyty or set the same as master at cluster creation. | string | `""` | no | +| non\_masquerade\_cidrs | List of strings in CIDR notation that specify the IP address ranges that do not use IP masquerading. | list(string) | `` | no | +| pod\_security\_policy\_config | enabled - Enable the PodSecurityPolicy controller for this cluster. If enabled, pods must be valid under a PodSecurityPolicy to be created. | object | `` | no | +| project\_id | The project ID to host the cluster in (required) | string | n/a | yes | +| region | The region to host the cluster in (required) | string | n/a | yes | +| regional | Whether is a regional cluster (zonal cluster if set false. WARNING: changing this after cluster creation is destructive!) | bool | `"true"` | no | +| remove\_default\_node\_pool | Remove default node pool while setting up the cluster | bool | `"false"` | no | +| service\_account | The service account to run nodes as if not overridden in `node_pools`. The default value will cause a cluster-specific service account to be created. | string | `"create"` | no | +| stub\_domains | Map of stub domains and their resolvers to forward DNS queries for a certain domain to an external DNS server | map(list(string)) | `` | no | +| subnetwork | The subnetwork to host the cluster in (required) | string | n/a | yes | +| zones | The zones to host the cluster in (optional if regional cluster / required if zonal) | list(string) | `` | no | + +## Outputs + +| Name | Description | +|------|-------------| +| ca\_certificate | Cluster ca certificate (base64 encoded) | +| endpoint | Cluster endpoint | +| horizontal\_pod\_autoscaling\_enabled | Whether horizontal pod autoscaling enabled | +| http\_load\_balancing\_enabled | Whether http load balancing enabled | +| kubernetes\_dashboard\_enabled | Whether kubernetes dashboard enabled | +| location | Cluster location (region if regional cluster, zone if zonal cluster) | +| logging\_service | Logging service used | +| master\_authorized\_networks\_config | Networks from which access to master is permitted | +| master\_version | Current master kubernetes version | +| min\_master\_version | Minimum master kubernetes version | +| monitoring\_service | Monitoring service used | +| name | Cluster name | +| network\_policy\_enabled | Whether network policy enabled | +| node\_pools\_names | List of node pools names | +| node\_pools\_versions | List of node pools versions | +| pod\_security\_policy\_enabled | Whether pod security policy is enabled | +| region | Cluster region | +| service\_account | The service account to default running nodes as if not overridden in `node_pools`. | +| type | Cluster type (regional / zonal) | +| zones | List of zones in which the cluster resides | + + ## Requirements diff --git a/modules/private-cluster/variables.tf b/modules/private-cluster/variables.tf index 226360d51e..b9f6f17632 100644 --- a/modules/private-cluster/variables.tf +++ b/modules/private-cluster/variables.tf @@ -78,31 +78,18 @@ variable "node_version" { } variable "master_authorized_networks_config" { - type = list(object({ cidr_blocks = list(object({ cidr_block = string, display_name = string })) })) - - description = <"$TMPFILE" - python helpers/combine_docfiles.py "$j"/README.md "$TMPFILE" + if [[ -e "${j}/README.md" ]]; then + # script seem to be designed to work into current directory + cd $j && echo "Working in ${j} ..." + terraform_docs.sh . && echo Success! || echo "Warning! Exit code: ${?}" + cd - >/dev/null + else + echo "Skipping ${j} because README.md does not exist." + fi done - rm -f "$TMPFILE" } function check_generate() { diff --git a/variables.tf b/variables.tf index 087227c0d1..953c95d8ec 100644 --- a/variables.tf +++ b/variables.tf @@ -78,90 +78,77 @@ variable "node_version" { } variable "master_authorized_networks_config" { - type = list(object({ cidr_blocks = list(object({ cidr_block = string, display_name = string })) })) - - description = <