File tree Expand file tree Collapse file tree 5 files changed +17
-9
lines changed
examples/confidential_autopilot_private Expand file tree Collapse file tree 5 files changed +17
-9
lines changed Original file line number Diff line number Diff line change 11# Confidential Autopilot Private Cluster
22
3- This example illustrates how to create a autopilot cluster with beta features,
4- using Confidential Nodes and a Customer Managed Encryption Keys (CMEK).
3+ This example illustrates how to create an Autopilot cluster with beta features,
4+ using Confidential GKE nodes and a Customer Managed Encryption Keys (CMEK).
55
66<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
77## Inputs
@@ -17,7 +17,7 @@ using Confidential Nodes and a Customer Managed Encryption Keys (CMEK).
1717| cluster\_ name | Cluster name |
1818| kms\_ key | CMEK used for disk and database encryption |
1919| kubernetes\_ endpoint | The cluster endpoint |
20- | location | n/a |
20+ | location | Cluster location (region if regional cluster, zone if zonal cluster) |
2121| master\_ kubernetes\_ version | Kubernetes version of the master |
2222| network\_ name | The name of the VPC being created |
2323| region | The region in which the cluster resides |
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ module "kms" {
4040
4141 project_id = var. project_id
4242 key_protection_level = " HSM"
43- location = " us-central1 "
43+ location = var . region
4444 keyring = " keyring-${ random_string . suffix . result } "
4545 keys = [" key" ]
4646 prevent_destroy = false
@@ -59,7 +59,7 @@ module "gke" {
5959 project_id = var. project_id
6060 name = " ${ local . cluster_type } -cluster"
6161 regional = true
62- region = " us-central1 "
62+ region = var . region
6363 network = module. gcp-network . network_name
6464 subnetwork = local. subnet_names [index (module. gcp-network . subnets_names , local. subnet_name )]
6565 ip_range_pods = local. pods_range_name
Original file line number Diff line number Diff line change 1616
1717module "gcp-network" {
1818 source = " terraform-google-modules/network/google"
19- version = " >= 7.5 "
19+ version = " ~= 10.0 "
2020
2121 project_id = var. project_id
2222 network_name = local. network_name
@@ -25,13 +25,13 @@ module "gcp-network" {
2525 {
2626 subnet_name = local.subnet_name
2727 subnet_ip = " 10.0.0.0/17"
28- subnet_region = " us-central1 "
28+ subnet_region = var.region
2929 subnet_private_access = true
3030 },
3131 {
3232 subnet_name = local.master_auth_subnetwork
3333 subnet_ip = " 10.60.0.0/17"
34- subnet_region = " us-central1 "
34+ subnet_region = var.region
3535 },
3636 ]
3737
Original file line number Diff line number Diff line change @@ -26,7 +26,8 @@ output "cluster_name" {
2626}
2727
2828output "location" {
29- value = module. gke . location
29+ description = " Cluster location (region if regional cluster, zone if zonal cluster)"
30+ value = module. gke . location
3031}
3132
3233output "master_kubernetes_version" {
Original file line number Diff line number Diff line change 1616
1717variable "project_id" {
1818 description = " The project ID to host the cluster in"
19+ type = string
20+ }
21+
22+ variable "region" {
23+ description = " The region to host the cluster in"
24+ type = string
25+ default = " us-central1"
1926}
You can’t perform that action at this time.
0 commit comments