Skip to content

Commit 6f350a9

Browse files
committed
component change based on template testing
1 parent a021e55 commit 6f350a9

File tree

7 files changed

+32
-35
lines changed

7 files changed

+32
-35
lines changed

modules/gke-autopilot-cluster/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ For a module with a complete configuration of a Google Cloud Platform Kubernetes
4141
| logging\_config | The GKE components exposing logs. Supported values include: SYSTEM\_COMPONENTS, APISERVER, CONTROLLER\_MANAGER, SCHEDULER, and WORKLOADS. | <pre>object({<br> enable_components = optional(list(string))<br> })</pre> | `null` | no |
4242
| maintenance\_policy | The maintenance policy to use for the cluster. | <pre>object({<br> daily_maintenance_window = optional(object({<br> start_time = optional(string)<br> }))<br> recurring_window = optional(object({<br> start_time = optional(string)<br> end_time = optional(string)<br> recurrence = optional(string)<br> }))<br> maintenance_exclusion = optional(list(object({<br> exclusion_name = optional(string)<br> start_time = optional(string)<br> end_time = optional(string)<br> exclusion_options = optional(object({<br> scope = optional(string)<br> }))<br> })))<br> })</pre> | <pre>{<br> "daily_maintenance_window": {<br> "start_time": "05:00"<br> }<br>}</pre> | no |
4343
| master\_auth | The authentication information for accessing the Kubernetes master. | <pre>object({<br> client_certificate_config = optional(object({<br> issue_client_certificate = optional(bool)<br> }))<br> })</pre> | `null` | no |
44-
| master\_authorized\_networks\_config | The desired configuration options for master authorized networks. | <pre>object({<br> cidr_blocks = optional(list(object({<br> display_name = optional(string)<br> cidr_block = optional(string)<br> })))<br> gcp_public_cidrs_access_enabled = optional(bool)<br> private_endpoint_enforcement_enabled = optional(bool)<br> })</pre> | `null` | no |
44+
| master\_authorized\_networks\_config | The desired configuration options for master authorized networks. | <pre>object({<br> cidr_blocks = list(object({<br> display_name = string<br> cidr_block = string<br> }))<br> gcp_public_cidrs_access_enabled = optional(bool)<br> private_endpoint_enforcement_enabled = optional(bool)<br> })</pre> | n/a | yes |
4545
| mesh\_certificates | Configuration for the provisioning of managed mesh certificates. | <pre>object({<br> enable_certificates = optional(bool)<br> })</pre> | `null` | no |
4646
| min\_master\_version | The minimum version of the master. GKE will auto-update the master to new versions, so this does not guarantee the master version--use the read-only master\_version field to obtain a current version. If unset, the server's default version will be used. | `string` | `null` | no |
4747
| monitoring\_config | (Optional) The GKE components exposing metrics. Supported values include: SYSTEM\_COMPONENTS, APISERVER, SCHEDULER, CONTROLLER\_MANAGER, STORAGE, HPA, POD, DAEMONSET, DEPLOYMENT, STATEFULSET, KUBELET, CADVISOR, DCGM and JOBSET. | <pre>object({<br> enable_components = optional(list(string))<br> })</pre> | `null` | no |
@@ -66,7 +66,7 @@ For a module with a complete configuration of a Google Cloud Platform Kubernetes
6666
| timeouts | Timeout for cluster operations. | <pre>object({<br> create = optional(string)<br> update = optional(string)<br> delete = optional(string)<br> })</pre> | <pre>{<br> "create": "45m",<br> "delete": "45m",<br> "update": "45m"<br>}</pre> | no |
6767
| vertical\_pod\_autoscaling | Vertical Pod Autoscaling automatically adjusts the resources of pods controlled by it. | <pre>object({<br> enabled = optional(bool)<br> })</pre> | <pre>{<br> "enabled": true<br>}</pre> | no |
6868
| workload\_alts\_config | Workload ALTS configuration for the cluster. Whether the alts handshaker should be enabled or not for direct-path. Requires Workload Identity (workloadPool) must be non-empty | <pre>object({<br> enable_alts = bool<br> })</pre> | `null` | no |
69-
| workload\_identity\_config | Configuration for the use of Kubernetes Service Accounts in GCP IAM policies. | <pre>object({<br> workload_pool = optional(string)<br> })</pre> | `null` | no |
69+
| workload\_identity\_config | Configuration for the use of Kubernetes Service Accounts in GCP IAM policies. | <pre>object({<br> workload_pool = string<br> })</pre> | n/a | yes |
7070

7171
## Outputs
7272

modules/gke-autopilot-cluster/metadata.yaml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -277,13 +277,14 @@ spec:
277277
description: The desired configuration options for master authorized networks.
278278
varType: |-
279279
object({
280-
cidr_blocks = optional(list(object({
281-
display_name = optional(string)
282-
cidr_block = optional(string)
283-
})))
280+
cidr_blocks = list(object({
281+
display_name = string
282+
cidr_block = string
283+
}))
284284
gcp_public_cidrs_access_enabled = optional(bool)
285285
private_endpoint_enforcement_enabled = optional(bool)
286286
})
287+
required: true
287288
- name: min_master_version
288289
description: The minimum version of the master. GKE will auto-update the master to new versions, so this does not guarantee the master version--use the read-only master_version field to obtain a current version. If unset, the server's default version will be used.
289290
varType: string
@@ -426,8 +427,9 @@ spec:
426427
description: Configuration for the use of Kubernetes Service Accounts in GCP IAM policies.
427428
varType: |-
428429
object({
429-
workload_pool = optional(string)
430+
workload_pool = string
430431
})
432+
required: true
431433
- name: identity_service_config
432434
description: Whether to enable the Identity Service component. It is disabled by default. Set enabled=true to enable.
433435
varType: |-
@@ -569,9 +571,9 @@ spec:
569571
roles:
570572
- level: Project
571573
roles:
574+
- roles/compute.admin
572575
- roles/container.admin
573576
- roles/iam.serviceAccountUser
574-
- roles/compute.admin
575577
services:
576578
- compute.googleapis.com
577579
- container.googleapis.com

modules/gke-autopilot-cluster/variables.tf

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -203,14 +203,13 @@ variable "master_auth" {
203203
variable "master_authorized_networks_config" {
204204
description = "The desired configuration options for master authorized networks."
205205
type = object({
206-
cidr_blocks = optional(list(object({
207-
display_name = optional(string)
208-
cidr_block = optional(string)
209-
})))
206+
cidr_blocks = list(object({
207+
display_name = string
208+
cidr_block = string
209+
}))
210210
gcp_public_cidrs_access_enabled = optional(bool)
211211
private_endpoint_enforcement_enabled = optional(bool)
212212
})
213-
default = null
214213
}
215214

216215
variable "min_master_version" {
@@ -394,9 +393,8 @@ variable "resource_usage_export_config" {
394393
variable "workload_identity_config" {
395394
description = "Configuration for the use of Kubernetes Service Accounts in GCP IAM policies."
396395
type = object({
397-
workload_pool = optional(string)
396+
workload_pool = string
398397
})
399-
default = null
400398
}
401399

402400
variable "identity_service_config" {

modules/gke-standard-cluster/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ For a module with a complete configuration of a Google Cloud Platform Kubernetes
4848
| logging\_service | The logging service that the cluster should write logs to. Available options include `logging.googleapis.com`, `logging.googleapis.com/kubernetes`, and `none`. | `string` | `null` | no |
4949
| maintenance\_policy | The maintenance policy to use for the cluster. | <pre>object({<br> daily_maintenance_window = optional(object({<br> start_time = optional(string)<br> }))<br> recurring_window = optional(object({<br> start_time = optional(string)<br> end_time = optional(string)<br> recurrence = optional(string)<br> }))<br> maintenance_exclusion = optional(list(object({<br> exclusion_name = optional(string)<br> start_time = optional(string)<br> end_time = optional(string)<br> exclusion_options = optional(object({<br> scope = optional(string)<br> }))<br> })))<br> })</pre> | `null` | no |
5050
| master\_auth | The authentication information for accessing the Kubernetes master. | <pre>object({<br> client_certificate_config = optional(object({<br> issue_client_certificate = optional(bool)<br> }))<br> })</pre> | `null` | no |
51-
| master\_authorized\_networks\_config | The desired configuration options for master authorized networks. | <pre>object({<br> cidr_blocks = optional(list(object({<br> display_name = optional(string)<br> cidr_block = optional(string)<br> })))<br> gcp_public_cidrs_access_enabled = optional(bool)<br> private_endpoint_enforcement_enabled = optional(bool)<br> })</pre> | `null` | no |
51+
| master\_authorized\_networks\_config | The desired configuration options for master authorized networks. | <pre>object({<br> cidr_blocks = list(object({<br> display_name = string<br> cidr_block = string<br> }))<br> gcp_public_cidrs_access_enabled = optional(bool)<br> private_endpoint_enforcement_enabled = optional(bool)<br> })</pre> | n/a | yes |
5252
| mesh\_certificates | Configuration for the provisioning of managed mesh certificates. | <pre>object({<br> enable_certificates = optional(bool)<br> })</pre> | `null` | no |
5353
| min\_master\_version | The minimum version of the master. GKE will auto-update the master to new versions, so this does not guarantee the master version--use the read-only master\_version field to obtain a current version. If unset, the server's default version will be used. | `string` | `null` | no |
5454
| monitoring\_config | Monitoring configuration for the cluster. | <pre>object({<br> enable_components = optional(list(string))<br> })</pre> | `null` | no |
@@ -67,7 +67,7 @@ For a module with a complete configuration of a Google Cloud Platform Kubernetes
6767
| pod\_security\_policy\_config | Configuration for the [PodSecurityPolicy](https://cloud.google.com/kubernetes-engine/docs/how-to/pod-security-policies) feature. | <pre>object({<br> enabled = bool<br> })</pre> | `null` | no |
6868
| private\_cluster\_config | Configuration for private clusters, clusters with private nodes. | <pre>object({<br> enable_private_nodes = optional(bool)<br> enable_private_endpoint = optional(bool)<br> master_ipv4_cidr_block = optional(string)<br> private_endpoint_subnetwork = optional(string)<br> master_global_access_config = optional(object({<br> enabled = optional(bool)<br> }))<br> })</pre> | <pre>{<br> "enable_private_endpoint": true,<br> "enable_private_nodes": true,<br> "master_global_access_config": {<br> "enabled": true<br> }<br>}</pre> | no |
6969
| private\_ipv6\_google\_access | The desired state of IPv6 access to Google Services. By default, no private IPv6 access to or from Google Services (all access will be via IPv4). | `string` | `null` | no |
70-
| project\_id | The ID of the project in which the resource belongs. If it is not provided, the provider project id is used. | `string` | `null` | no |
70+
| project\_id | The ID of the project in which the resource belongs. If it is not provided, the provider project id is used. | `string` | n/a | yes |
7171
| protect\_config | Enable GKE Protect workloads for this cluster. | <pre>object({<br> workload_config = object({<br> audit_mode = string<br> })<br> workload_vulnerability_mode = optional(string)<br> })</pre> | `null` | no |
7272
| release\_channel | Configuration for the release channel feature, which provides more control over automatic upgrades of your GKE clusters. | <pre>object({<br> channel = optional(string)<br> })</pre> | `null` | no |
7373
| remove\_default\_node\_pool | If true, deletes the default node pool upon cluster creation. If you're using google\_container\_node\_pool resources with no default node pool, this should be set to true. | `bool` | `true` | no |
@@ -80,7 +80,7 @@ For a module with a complete configuration of a Google Cloud Platform Kubernetes
8080
| timeouts | Timeout for cluster operations. | <pre>object({<br> create = optional(string)<br> update = optional(string)<br> delete = optional(string)<br> })</pre> | <pre>{<br> "create": "45m",<br> "delete": "45m",<br> "update": "45m"<br>}</pre> | no |
8181
| vertical\_pod\_autoscaling | Vertical Pod Autoscaling automatically adjusts the resources of pods controlled by it. | <pre>object({<br> enabled = optional(bool)<br> })</pre> | `null` | no |
8282
| workload\_alts\_config | Workload ALTS configuration for the cluster. Whether the alts handshaker should be enabled or not for direct-path. Requires Workload Identity (workloadPool) must be non-empty | <pre>object({<br> enable_alts = bool<br> })</pre> | `null` | no |
83-
| workload\_identity\_config | Configuration for the use of Kubernetes Service Accounts in GCP IAM policies. | <pre>object({<br> workload_pool = optional(string)<br> })</pre> | `null` | no |
83+
| workload\_identity\_config | Configuration for the use of Kubernetes Service Accounts in GCP IAM policies. | <pre>object({<br> workload_pool = string<br> })</pre> | n/a | yes |
8484

8585
## Outputs
8686

modules/gke-standard-cluster/metadata.display.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -375,10 +375,6 @@ spec:
375375
master_authorized_networks_config:
376376
name: master_authorized_networks_config
377377
title: Master Authorized Networks Config
378-
altDefaults:
379-
- type: ALTERNATE_TYPE_DC
380-
value:
381-
private_endpoint_enforcement_enabled: true
382378
mesh_certificates:
383379
name: mesh_certificates
384380
title: Mesh Certificates
@@ -896,6 +892,7 @@ spec:
896892
project_id:
897893
name: project_id
898894
title: Project Id
895+
level: 1
899896
protect_config:
900897
name: protect_config
901898
title: Protect Config

modules/gke-standard-cluster/metadata.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ spec:
136136
- name: project_id
137137
description: The ID of the project in which the resource belongs. If it is not provided, the provider project id is used.
138138
varType: string
139+
required: true
139140
- name: location
140141
description: The location (region or zone) in which the cluster master will be created, as well as the default node location. If you specify a zone (such as us-central1-a), the cluster will be a zonal cluster with a single cluster master. If you specify a region (such as us-west1), the cluster will be a regional cluster with multiple masters spread across zones in the region, and with default node locations in those zones as well.
141142
varType: string
@@ -359,13 +360,14 @@ spec:
359360
description: The desired configuration options for master authorized networks.
360361
varType: |-
361362
object({
362-
cidr_blocks = optional(list(object({
363-
display_name = optional(string)
364-
cidr_block = optional(string)
365-
})))
363+
cidr_blocks = list(object({
364+
display_name = string
365+
cidr_block = string
366+
}))
366367
gcp_public_cidrs_access_enabled = optional(bool)
367368
private_endpoint_enforcement_enabled = optional(bool)
368369
})
370+
required: true
369371
- name: min_master_version
370372
description: The minimum version of the master. GKE will auto-update the master to new versions, so this does not guarantee the master version--use the read-only master_version field to obtain a current version. If unset, the server's default version will be used.
371373
varType: string
@@ -861,8 +863,9 @@ spec:
861863
description: Configuration for the use of Kubernetes Service Accounts in GCP IAM policies.
862864
varType: |-
863865
object({
864-
workload_pool = optional(string)
866+
workload_pool = string
865867
})
868+
required: true
866869
- name: identity_service_config
867870
description: Whether to enable the Identity Service component. It is disabled by default. Set enabled=true to enable.
868871
varType: |-

modules/gke-standard-cluster/variables.tf

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ variable "description" {
2929
variable "project_id" {
3030
description = "The ID of the project in which the resource belongs. If it is not provided, the provider project id is used."
3131
type = string
32-
default = null
3332
}
3433

3534
variable "location" {
@@ -314,14 +313,13 @@ variable "master_auth" {
314313
variable "master_authorized_networks_config" {
315314
description = "The desired configuration options for master authorized networks."
316315
type = object({
317-
cidr_blocks = optional(list(object({
318-
display_name = optional(string)
319-
cidr_block = optional(string)
320-
})))
316+
cidr_blocks = list(object({
317+
display_name = string
318+
cidr_block = string
319+
}))
321320
gcp_public_cidrs_access_enabled = optional(bool)
322321
private_endpoint_enforcement_enabled = optional(bool)
323322
})
324-
default = null
325323
}
326324

327325
variable "min_master_version" {
@@ -876,9 +874,8 @@ variable "resource_usage_export_config" {
876874
variable "workload_identity_config" {
877875
description = "Configuration for the use of Kubernetes Service Accounts in GCP IAM policies."
878876
type = object({
879-
workload_pool = optional(string)
877+
workload_pool = string
880878
})
881-
default = null
882879
}
883880

884881
variable "identity_service_config" {

0 commit comments

Comments
 (0)