Skip to content

Commit

Permalink
fix: disable confidential nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
hazcod committed Jun 24, 2022
1 parent dc2643a commit 1614ac0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
11 changes: 8 additions & 3 deletions google/gke/gke.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ resource "google_container_cluster" "gke_cluster" {
]

project = var.project_id
name = var.cluster_name
name = "${var.cluster_name}-cluster"
location = var.cluster_location

resource_labels = {
Expand Down Expand Up @@ -55,8 +55,9 @@ resource "google_container_cluster" "gke_cluster" {
}

# use confidential nodes which have memory encryption
# disabled since it requires the N2D machine type
confidential_nodes {
enabled = true
enabled = false
}

node_config {
Expand Down Expand Up @@ -138,7 +139,11 @@ resource "google_container_cluster" "gke_cluster" {

# use stackdriver GKE native system monitoring for everything
monitoring_config {
enable_components = ["SYSTEM_COMPONENTS", "WORKLOADS"]
enable_components = ["SYSTEM_COMPONENTS"]

managed_prometheus {
enabled = true
}
}

# kubernetes addons
Expand Down
4 changes: 2 additions & 2 deletions google/gke/kms.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
resource "google_kms_key_ring" "k8s_key_ring" {
project = var.project_id
name = "gke-etcd-keyring-gke-${var.cluster_name}"
name = "gke-api-keyring-gke-${var.cluster_name}"
location = var.cluster_region
}

resource "google_kms_crypto_key" "k8s_etcd_kms_key" {
name = "gke-etcd-enc-key-gke-${var.cluster_name}"
name = "gke-api-enc-key-gke-${var.cluster_name}"
key_ring = google_kms_key_ring.k8s_key_ring.id
rotation_period = "100000s"
}
2 changes: 1 addition & 1 deletion providers.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
terraform {
required_version = ">= v1.1.4"
required_version = ">= v1.2.3"

backend "gcs" {
bucket = "ironsecurity-terraform-state"
Expand Down

0 comments on commit 1614ac0

Please sign in to comment.