Skip to content

Commit 9f114c1

Browse files
Updated test configurations to use confidential instances (#11376) (#19028)
[upstream:f42a18f6e393189141e3aaece50615ed25d0bf67] Signed-off-by: Modular Magician <magic-modules@google.com>
1 parent ccb72ec commit 9f114c1

File tree

5 files changed

+33
-20
lines changed

5 files changed

+33
-20
lines changed

.changelog/11376.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:none
2+
3+
```

google/services/container/resource_container_cluster_test.go

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8967,23 +8967,26 @@ func testAccContainerCluster_withConfidentialBootDisk(clusterName, npName, kmsKe
89678967
resource "google_container_cluster" "with_confidential_boot_disk" {
89688968
name = "%s"
89698969
location = "us-central1-a"
8970+
confidential_nodes {
8971+
enabled = true
8972+
}
89708973
release_channel {
8971-
channel = "RAPID"
8972-
}
8974+
channel = "RAPID"
8975+
}
89738976
node_pool {
89748977
name = "%s"
89758978
initial_node_count = 1
89768979
node_config {
8977-
oauth_scopes = [
8978-
"https://www.googleapis.com/auth/cloud-platform",
8979-
]
8980-
image_type = "COS_CONTAINERD"
8981-
boot_disk_kms_key = "%s"
8982-
machine_type = "n2-standard-2"
8983-
enable_confidential_storage = true
8984-
disk_type = "hyperdisk-balanced"
8980+
oauth_scopes = [
8981+
"https://www.googleapis.com/auth/cloud-platform",
8982+
]
8983+
image_type = "COS_CONTAINERD"
8984+
boot_disk_kms_key = "%s"
8985+
machine_type = "n2d-standard-2"
8986+
enable_confidential_storage = true
8987+
disk_type = "hyperdisk-balanced"
8988+
}
89858989
}
8986-
}
89878990
deletion_protection = false
89888991
network = "%s"
89898992
subnetwork = "%s"
@@ -9026,6 +9029,9 @@ func testAccContainerCluster_withConfidentialBootDiskNodeConfig(clusterName, kms
90269029
resource "google_container_cluster" "with_confidential_boot_disk_node_config" {
90279030
name = "%s"
90289031
location = "us-central1-a"
9032+
confidential_nodes {
9033+
enabled = true
9034+
}
90299035
initial_node_count = 1
90309036
release_channel {
90319037
channel = "RAPID"
@@ -9036,7 +9042,7 @@ resource "google_container_cluster" "with_confidential_boot_disk_node_config" {
90369042
]
90379043
image_type = "COS_CONTAINERD"
90389044
boot_disk_kms_key = "%s"
9039-
machine_type = "n2-standard-2"
9045+
machine_type = "n2d-standard-2"
90409046
enable_confidential_storage = true
90419047
disk_type = "hyperdisk-balanced"
90429048
}

google/services/container/resource_container_node_pool_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4053,14 +4053,17 @@ resource "google_container_node_pool" "with_confidential_boot_disk" {
40534053
cluster = google_container_cluster.cluster.name
40544054
40554055
node_config {
4056+
confidential_nodes {
4057+
enabled = true
4058+
}
40564059
image_type = "COS_CONTAINERD"
40574060
boot_disk_kms_key = "%s"
40584061
oauth_scopes = [
40594062
"https://www.googleapis.com/auth/logging.write",
40604063
"https://www.googleapis.com/auth/monitoring",
40614064
]
40624065
enable_confidential_storage = true
4063-
machine_type = "n2-standard-2"
4066+
machine_type = "n2d-standard-2"
40644067
disk_type = "hyperdisk-balanced"
40654068
}
40664069
}

website/docs/r/container_cluster.html.markdown

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,8 @@ The `master_authorized_networks_config.cidr_blocks` block supports:
812812

813813
<a name="nested_node_config"></a>The `node_config` block supports:
814814

815+
* `confidential_nodes` - (Optional) Configuration for Confidential Nodes feature. Structure is [documented below](#nested_confidential_nodes).
816+
815817
* `disk_size_gb` - (Optional) Size of the disk attached to each node, specified
816818
in GB. The smallest allowed disk size is 10GB. Defaults to 100GB.
817819

@@ -981,6 +983,12 @@ sole_tenant_config {
981983
* `advanced_machine_features` - (Optional) Specifies options for controlling
982984
advanced machine features. Structure is [documented below](#nested_advanced_machine_features).
983985

986+
987+
<a name="nested_confidential_nodes"></a> The `confidential_nodes` block supports:
988+
989+
* `enabled` (Required) - Enable Confidential GKE Nodes for this node pool, to
990+
enforce encryption of data in-use.
991+
984992
<a name="nested_node_affinity"></a>The `node_affinity` block supports:
985993

986994
* `key` (Required) - The default or custom node affinity label key name.

website/docs/r/container_node_pool.html.markdown

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,6 @@ resource "google_container_cluster" "primary" {
111111
* `autoscaling` - (Optional) Configuration required by cluster autoscaler to adjust
112112
the size of the node pool to the current cluster usage. Structure is [documented below](#nested_autoscaling).
113113

114-
* `confidential_nodes` - (Optional) Configuration for Confidential Nodes feature. Structure is [documented below](#nested_confidential_nodes).
115-
116114
* `initial_node_count` - (Optional) The initial number of nodes for the pool. In
117115
regional or multi-zonal clusters, this is the number of nodes per zone. Changing
118116
this will force recreation of the resource. WARNING: Resizing your node pool manually
@@ -200,11 +198,6 @@ cluster.
200198
* "ANY" - Instructs the cluster autoscaler to prioritize utilization of unused reservations,
201199
and reduce preemption risk for Spot VMs.
202200

203-
<a name="nested_confidential_nodes"></a> The `confidential_nodes` block supports:
204-
205-
* `enabled` (Required) - Enable Confidential GKE Nodes for this cluster, to
206-
enforce encryption of data in-use.
207-
208201
<a name="nested_management"></a>The `management` block supports:
209202

210203
* `auto_repair` - (Optional) Whether the nodes will be automatically repaired. Enabled by default.

0 commit comments

Comments
 (0)