Skip to content

feat(google_gke): expose node_pools_metadata for set-once node metadata#477

Merged
bkochendorfer merged 1 commit into
mainfrom
MZCLD-3238-node-pools-metadata
Jun 4, 2026
Merged

feat(google_gke): expose node_pools_metadata for set-once node metadata#477
bkochendorfer merged 1 commit into
mainfrom
MZCLD-3238-node-pools-metadata

Conversation

@bkochendorfer

Copy link
Copy Markdown
Member

Description

Adds a node_pools_metadata variable (per-pool map of key/value strings) that's threaded into google_container_node_pool.pools.node_config.metadata. The module already has node_config[0].metadata in lifecycle.ignore_changes (intentional — GKE auto-populates metadata keys we don't want terraform to fight), so this exposure is create-time-only by design.

Use case: SoC2 hardening settings like serial-port-logging-enable=false that we want to seed at pool creation and never change afterward. Updating the variable on an existing pool will NOT propagate; pool rotation is required to change the value. Variable description warns about this.

Existing consumers see no plan diff — when a pool has no metadata entry, the local projection yields {} and the conditional in cluster.tf sets metadata = null, which terraform treats as "attribute omitted."

Related Tickets & Documents

Adds a `node_pools_metadata` variable (per-pool map of key/value strings)
that's threaded into `google_container_node_pool.pools.node_config.metadata`.
The module already has `node_config[0].metadata` in `lifecycle.ignore_changes`
(intentional — GKE auto-populates metadata keys we don't want terraform to
fight), so this exposure is create-time-only by design.

Use case: SoC2 hardening settings like `serial-port-logging-enable=false`
that we want to seed at pool creation and never change afterward. Updating
the variable on an existing pool will NOT propagate; pool rotation is
required to change the value. Variable description warns about this.

Existing consumers see no plan diff — when a pool has no metadata entry,
the local projection yields `{}` and the conditional in cluster.tf sets
`metadata = null`, which terraform treats as "attribute omitted."

MZCLD-3238.
@github-actions github-actions Bot added the minor This PR will increment a minor version label Jun 4, 2026
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Release plan

Directory Previous version New version
google_gke 0.11.1 0.12.0

@bkochendorfer bkochendorfer merged commit aae9afd into main Jun 4, 2026
10 checks passed
@bkochendorfer bkochendorfer deleted the MZCLD-3238-node-pools-metadata branch June 4, 2026 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor This PR will increment a minor version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants