Skip to content

Migrate cluster modules to map(object)#356

Merged
pst merged 2 commits into
masterfrom
objects
Feb 24, 2026
Merged

Migrate cluster modules to map(object)#356
pst merged 2 commits into
masterfrom
objects

Conversation

@pst

@pst pst commented Feb 12, 2026

Copy link
Copy Markdown
Member

No description provided.

@pst pst force-pushed the objects branch 4 times, most recently from 4463589 to 312b0c5 Compare February 13, 2026 09:28
@pst pst changed the base branch from v1 to master February 13, 2026 09:44
@pst pst marked this pull request as ready for review February 13, 2026 09:44
@pst pst requested a review from Copilot February 13, 2026 09:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Terraform cluster and node-pool modules to use stronger-typed map(object(...)) configurations (moving away from comma-separated strings), and updates quickstarts/tests accordingly. It also removes the KinD starter/module support and its related CI/image build paths.

Changes:

  • Migrate cluster/node-pool module inputs from map(map(string)) + comma-separated strings to map(object(...)) + list(string)/set(string) where appropriate.
  • Update quickstart and test configurations to use list values (e.g., AZs, instance types, node locations).
  • Remove KinD starter/module artifacts and exclude KinD from CI matrices and OCI image variants.

Reviewed changes

Copilot reviewed 68 out of 68 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
tests/gke_zero_cluster.tf Update cluster_node_locations to a list.
tests/eks_zero_node_pools.tf Update instance_types / availability_zones to lists.
tests/eks_zero_cluster.tf Update EKS instance types / AZs to list forms.
quickstart/src/configurations/multi-cloud/gke_zero_cluster.tf Switch example cluster_node_locations to list; remove legacy comments/locals.
quickstart/src/configurations/multi-cloud/eks_zero_cluster.tf Switch instance/AZ inputs to list forms; adjust defaults.
quickstart/src/configurations/multi-cloud/aks_zero_cluster.tf Remove unused loc env stub.
quickstart/src/configurations/kind/versions.tf Removed KinD starter Terraform versions file.
quickstart/src/configurations/kind/kind_zero_providers.tf Removed KinD starter provider wiring.
quickstart/src/configurations/kind/kind_zero_cluster.tf Removed KinD starter cluster module usage.
quickstart/src/configurations/kind/README.md Removed KinD starter README pointer.
quickstart/src/configurations/kind/Dockerfile Removed KinD starter Dockerfile template.
quickstart/src/configurations/kind/.user Removed KinD starter user template link.
quickstart/src/configurations/kind/.gitignore Removed KinD starter gitignore template link.
quickstart/src/configurations/gke/gke_zero_cluster.tf Switch example cluster_node_locations to list; remove loc env.
quickstart/src/configurations/eks/eks_zero_cluster.tf Switch EKS instance/AZ inputs to list; remove loc env.
quickstart/src/configurations/aks/aks_zero_cluster.tf Update commented network params to list examples; remove loc env.
oci/Dockerfile Remove KinD build stages/variant.
kind/cluster/versions.tf Removed KinD cluster wrapper module file.
kind/cluster/variables.tf Removed KinD cluster wrapper module file.
kind/cluster/outputs.tf Removed KinD cluster wrapper module file.
kind/cluster/main.tf Removed KinD cluster wrapper module file.
kind/cluster/configuration.tf Removed KinD cluster wrapper module file.
kind/_modules/kind/versions.tf Removed KinD implementation module file.
kind/_modules/kind/variables.tf Removed KinD implementation module file.
kind/_modules/kind/outputs.tf Removed KinD implementation module file.
kind/_modules/kind/main.tf Removed KinD implementation module file.
google/cluster/variables.tf Change cluster configuration type to map(object(...)) with list-based fields.
google/cluster/node-pool/main.tf Inline configuration merging and use cfg directly for module inputs.
google/cluster/node-pool/configuration.tf Remove separate configuration locals file (logic moved to main.tf).
google/cluster/main.tf Inline configuration merging and use cfg directly for module inputs.
google/cluster/configuration.tf Remove separate configuration locals file (logic moved to main.tf).
google/cluster-local/versions.tf Removed cluster-local wrapper (no longer supported here).
google/cluster-local/variables.tf Removed cluster-local wrapper (no longer supported here).
google/cluster-local/outputs.tf Removed cluster-local wrapper (no longer supported here).
google/cluster-local/main.tf Removed cluster-local wrapper (no longer supported here).
google/cluster-local/configuration.tf Removed cluster-local wrapper (no longer supported here).
google/_modules/gke/variables.tf Update router advertisement config type (map → list) and minor formatting.
google/_modules/gke/network.tf Update router advertisement for_each and modernize splat syntax.
azurerm/cluster/variables.tf Change AKS cluster configuration type to map(object(...)) with list-based fields.
azurerm/cluster/node-pool/variables.tf Tighten types for node pool counts to numbers.
azurerm/cluster/node-pool/main.tf Inline configuration merging and use cfg directly for module inputs.
azurerm/cluster/node-pool/configuration.tf Remove separate configuration locals file (logic moved to main.tf).
azurerm/cluster/main.tf Inline configuration merging and use cfg directly for module inputs.
azurerm/cluster/configuration.tf Remove separate configuration locals file (logic moved to main.tf).
azurerm/cluster-local/versions.tf Removed cluster-local wrapper (no longer supported here).
azurerm/cluster-local/variables.tf Removed cluster-local wrapper (no longer supported here).
azurerm/cluster-local/outputs.tf Removed cluster-local wrapper (no longer supported here).
azurerm/cluster-local/main.tf Removed cluster-local wrapper (no longer supported here).
azurerm/cluster-local/configuration.tf Removed cluster-local wrapper (no longer supported here).
aws/cluster/variables.tf Change EKS cluster configuration type to map(object(...)) with list-based fields.
aws/cluster/node-pool/vpc.tf Switch AZ handling to list-based config access and modernize index math.
aws/cluster/node-pool/variables.tf Change node pool inputs to list-based fields (instance_types, availability_zones, vpc_subnet_ids).
aws/cluster/node-pool/main.tf Inline configuration merging and use cfg directly for module inputs.
aws/cluster/node-pool/data_sources.tf Update AZ handling to list-based config access.
aws/cluster/node-pool/configuration.tf Remove separate configuration locals file (logic moved to main.tf).
aws/cluster/main.tf Inline configuration merging and use cfg directly for module inputs.
aws/cluster/configuration.tf Remove separate configuration locals file (logic moved to main.tf).
aws/cluster-local/versions.tf Removed cluster-local wrapper (no longer supported here).
aws/cluster-local/variables.tf Removed cluster-local wrapper (no longer supported here).
aws/cluster-local/outputs.tf Removed cluster-local wrapper (no longer supported here).
aws/cluster-local/main.tf Removed cluster-local wrapper (no longer supported here).
aws/cluster-local/elb-dns/versions.tf Removed elb-dns wrapper module file.
aws/cluster-local/elb-dns/variables.tf Removed elb-dns wrapper module file.
aws/cluster-local/configuration.tf Removed cluster-local wrapper (no longer supported here).
aws/_modules/eks/node_pool/variables.tf Change subnet_ids type to set(string).
aws/_modules/eks/node_pool.tf Update splat syntax for subnet IDs.
aws/_modules/eks/master.tf Update splat syntax for subnet IDs.
.github/workflows/main.yml Remove kind starter from build/test/publish matrices; update sed replacements for new list syntax.
Comments suppressed due to low confidence (1)

google/_modules/gke/network.tf:50

  • After changing router_advertise_config.ip_ranges to a list/set, the dynamic advertised_ip_ranges block still treats the iterator like a map (range.key/range.value), and sets description to the CIDR. Consider iterating a list of strings and setting range = range.value and description = null (or accept a map again if descriptions are needed).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/main.yml
Comment thread azurerm/cluster/node-pool/main.tf Outdated
Comment thread azurerm/cluster/node-pool/main.tf Outdated
Comment thread google/cluster/main.tf Outdated
Comment thread quickstart/src/configurations/multi-cloud/eks_zero_cluster.tf Outdated
Comment thread aws/cluster/node-pool/data_sources.tf
Comment thread aws/cluster/node-pool/data_sources.tf
Comment thread aws/cluster/node-pool/vpc.tf
Comment thread aws/cluster/node-pool/vpc.tf
Comment thread google/_modules/gke/variables.tf Outdated
@pst pst force-pushed the objects branch 5 times, most recently from a57293e to 6e4f6b0 Compare February 18, 2026 19:15
@pst pst force-pushed the objects branch 4 times, most recently from 16b048f to 960111f Compare February 19, 2026 18:56
@pst pst requested a review from Copilot February 19, 2026 19:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 104 out of 104 changed files in this pull request and generated 14 comments.

Comments suppressed due to low confidence (2)

google/_modules/gke/variables.tf:214

  • Missing default value: The enable_gcs_fuse_csi_driver variable lacks a default value and is not marked as nullable. Since this is an optional feature flag, add default = null or default = false to make it optional.
    azurerm/_modules/aks/variables.tf:159
  • Missing default value: The kubernetes_version variable (lines 156-159) lacks a default value and is not marked as nullable. However, the description says "If not specified, latest version will be used," which implies it should be optional. Add default = null to match the intended behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread google/_modules/gke/network.tf Outdated
Comment thread azurerm/_modules/aks/variables.tf Outdated
Comment thread google/_modules/gke/variables.tf Outdated
Comment thread google/_modules/gke/variables.tf Outdated
Comment thread common/configuration/outputs.tf Outdated
Comment thread azurerm/_modules/aks/vnet.tf Outdated
Comment thread aws/_modules/eks/variables.tf Outdated
Comment thread aws/_modules/eks/node_pool.tf Outdated
Comment thread aws/cluster/variables.tf
Comment thread google/_modules/gke/variables.tf Outdated
Comment thread aws/cluster/node-pool/data_sources.tf Outdated
Comment thread azurerm/_modules/aks/node_pool/main.tf Outdated
Comment thread azurerm/_modules/aks/variables.tf Outdated
Comment thread google/_modules/gke/cluster.tf Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 105 out of 105 changed files in this pull request and generated 6 comments.

Comments suppressed due to low confidence (1)

google/_modules/gke/network.tf:50

  • router_advertise_config.ip_ranges has been changed to a set(string), but this dynamic block still treats the iteration element as a key/value pair (range.key + range.value) and assigns description = range.value. For a set, key and value are the same element, so descriptions are lost/misleading. Either keep ip_ranges as a map(string) (range => description) or update the block to use range = range.value and set description = null/omit it.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread google/_modules/gke/variables.tf Outdated
Comment thread .github/workflows/main.yml
Comment thread common/configuration/outputs.tf Outdated
Comment thread google/cluster/node-pool/main.tf Outdated
Comment thread aws/cluster/node-pool/main.tf Outdated
Comment thread google/_modules/gke/node_pool/variables.tf Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 105 out of 105 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (2)

oci/Dockerfile:250

  • This PR removes the KinD image build stages/targets from the main OCI Dockerfile, which changes the published image variants. If this is intended deprecation, please ensure all references (docs, release notes, CI expectations) are updated; otherwise consider keeping the KinD target or splitting this into a separate change from the configuration type migration.
    google/_modules/gke/network.tf:51
  • The for_each conditional mixes list ([]) and set (var.router_advertise_config.ip_ranges), which can trigger an "inconsistent conditional result types" error. Also ip_ranges is now a set(string) but the block still sets description = range.value (no description available with a set). Use a consistent collection type (e.g., toset([]) and toset(var.router_advertise_config.ip_ranges)), or keep ip_ranges as a map if descriptions are required.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread aws/_modules/eks/node_pool.tf Outdated
Comment thread google/cluster/node-pool/main.tf Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 142 out of 151 changed files in this pull request and generated 12 comments.

Comments suppressed due to low confidence (1)

aws/cluster/aws_iam_authenticator.tf:15

  • The interpolated mapRoles snippet is preceded by a leading space (" ${local.aws_auth_map_roles...}"), which will indent the first line of any custom role mappings and can break the YAML structure for aws-auth (role list items must start at column 0). Remove the leading whitespace before the interpolation so inserted - rolearn: lines remain properly aligned.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread google/cluster/moved.tf Outdated
Comment thread google/cluster/moved.tf Outdated
Comment thread google/cluster/moved.tf Outdated
Comment thread aws/cluster/default_node_pool.tf Outdated
Comment thread google/cluster/network.tf
Comment thread google/cluster/cluster.tf Outdated
Comment thread google/cluster/moved.tf Outdated
Comment thread aws/cluster/node-pool/launch_template.tf
Comment thread aws/cluster/main.tf Outdated
Comment thread aws/cluster/default_node_pool.tf Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 142 out of 151 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread aws/cluster/node-pool/vpc.tf Outdated
Comment thread common/configuration/outputs.tf
@pst pst force-pushed the objects branch 2 times, most recently from 5f900ab to 20acd79 Compare February 22, 2026 19:25
Comment thread aws/cluster/node-pool/data_sources.tf Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 144 out of 153 changed files in this pull request and generated 7 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread aws/cluster/variables.tf Outdated
Comment thread quickstart/src/configurations/eks/eks_zero_cluster.tf
Comment thread google/cluster/node-pool/node_pool.tf Outdated
Comment thread aws/cluster/node-pool/data_sources.tf
Comment thread aws/cluster/variables.tf Outdated
Comment thread aws/cluster/variables.tf Outdated
Comment thread aws/cluster/variables.tf Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 140 out of 149 changed files in this pull request and generated 9 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread aws/cluster/main.tf
Comment thread aws/cluster/node-pool/vpc.tf Outdated
Comment thread google/cluster/network.tf
Comment thread aws/cluster/node-pool/data_sources.tf
Comment thread google/cluster/main.tf
Comment thread azurerm/cluster/main.tf
Comment thread azurerm/cluster/node-pool/main.tf
Comment thread aws/cluster/default_node_pool.tf
Comment thread common/configuration/outputs.tf
 * refactor code to not rely on _modules anymore removing
   one level of module nesting for easier maintainability
 * provide move blocks for all affected modules and
   resources
 * introduce mandatory cluster output on cluster modules
   and corresponding input on node pool modulesto reduce
   dependence on data sources causing issues when using
   the node pool module for the clsuter provisioned default
   node pool
 * unify node pool module inputs between providers using
   new cluster module output
 * reduce use of locals to improve DX for contributions and
   maintenance work
 * added support for merging of nested maps and objects to
   inheritance module and updated previous string vars to
   more specific types
@pst pst merged commit 3cb6698 into master Feb 24, 2026
17 checks passed
@pst pst deleted the objects branch February 24, 2026 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants