Commit 1657664
feat: add EKS Auto Mode support (#259)
* feat: add EKS Auto Mode support
Add compute_config, storage_config, and elastic_load_balancing object
variables with enabled flags. Adds dynamic blocks to aws_eks_cluster,
Auto Mode IAM policies (Compute, BlockStorage, LoadBalancing, Networking),
sts:TagSession trust policy, and auto_mode_enabled output. Bumps AWS
provider to >= 5.79.0. All defaults preserve current behavior.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: replace coalesce with ternary for bootstrap_self_managed_addons
coalesce treats false as empty, causing an error when both Auto Mode is
disabled and the user hasn't set bootstrap_self_managed_addons_enabled.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: filter auto mode node role from linux access entries
When EKS Auto Mode is enabled, AWS automatically creates an access entry
for the node role specified in compute_config. Attempting to create it
again via aws_eks_access_entry.linux causes a 409 ResourceInUseException.
Filter out the compute_config.node_role_arn from the linux access entries
when auto mode is enabled.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* revert: remove submodule-level access entry filtering
The ARN-based filtering caused "count depends on resource attributes"
errors because the node_role_arn isn't known at plan time when the IAM
role is being created in the same apply.
The fix is handled at the component level instead — the component simply
does not pass the auto mode node role to access_entries_for_nodes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor: rename Auto Mode variables with auto_mode_ prefix
Rename compute_config -> auto_mode_compute_config,
storage_config -> auto_mode_storage_config,
elastic_load_balancing -> auto_mode_elastic_load_balancing
for clarity. Also add EKS Auto Mode section to README.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add EKS Capabilities support (Argo CD, ACK, KRO)
- Add `capabilities` map variable for independently-enableable managed
platform features
- Create capabilities.tf with aws_eks_capability resources and
auto-created IAM roles per capability
- Add capabilities and capability_role_arns outputs
- Bump AWS provider to >= 6.25.0 for aws_eks_capability resource
- Support ARGOCD configuration (IDC, RBAC, network access)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* chore: remove .terraform.lock.hcl from repo
* feat: update examples/complete with Auto Mode support
Add auto_mode_enabled variable, Auto Mode node IAM role, and pass
auto_mode_compute_config/storage_config/elastic_load_balancing to
the module. Disable node group when Auto Mode is enabled.
Incorporates example patterns from PR #253 using our variable naming.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: use static key sets for capabilities for_each to fix plan-time error
OpenTofu/Terraform requires for_each keys to be known at plan time.
Changed from map-based for_each to toset of keys derived from
var.capabilities, ensuring keys are always static. Resource attributes
now reference var.capabilities[each.value] instead of each.value.X.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: add create_iam_role field to capabilities for plan-time stability
The for_each on capability IAM resources was failing because
role_arn == null is unknown at plan time when the calling module passes
a resource ARN. Added create_iam_role boolean (default true) that callers
set to false when they provide their own roles, ensuring for_each keys
are always deterministic at plan time.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: make aws_idc required for Argo CD capability configuration
The AWS provider requires the aws_idc block to always be present when
configuring an Argo CD capability. Changed from dynamic block (optional)
to static block (required) and updated the variable type accordingly.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: make aws_idc optional for Argo CD -- skip argo_cd block when absent
The AWS provider requires aws_idc when argo_cd configuration is rendered,
but users may not have an IDC instance set up initially. Changed aws_idc
back to optional and only render the argo_cd configuration block when
aws_idc is provided. The capability is still created, just without the
argo_cd configuration block (can be configured later).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: remove unused enabled_capabilities local
TFLint flagged enabled_capabilities as unused after switching to
key-based sets for for_each.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: require aws_idc for ARGOCD capabilities, skip empty config block
The AWS API requires configuration.argo_cd.aws_idc for ARGOCD
capabilities. Previously, when aws_idc was null, the argo_cd block
was skipped but the configuration block still rendered empty, causing
an API error.
Now:
- Skip entire configuration block when aws_idc is not provided
- Add validation to give a clear error if aws_idc is missing
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* chore: remove .terraform.lock.hcl from version control
Lock files should not be committed in reusable modules as they
constrain consumers' provider versions unnecessarily.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* docs: add EKS Auto Mode section to README.yaml
Port the EKS Auto Mode documentation from README.md back to README.yaml
so it persists through readme generation.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: use aws_partition for policy ARNs in examples, rename capabilities to auto mode managed add-ons
- Add data.aws_partition.current to examples/complete for GovCloud/China
partition support instead of hardcoded "arn:aws:" prefixes
- Rename "Capabilities" section to "Auto Mode Managed Add-ons" in docs
to avoid confusion with EKS Capabilities (Argo CD, ACK, KRO)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* update test
* -> local.enabled
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 2049cc8 commit 1657664
11 files changed
Lines changed: 538 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
| 330 | + | |
330 | 331 | | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
331 | 395 | | |
332 | 396 | | |
333 | 397 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
331 | 397 | | |
332 | 398 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
111 | 113 | | |
112 | 114 | | |
113 | 115 | | |
114 | | - | |
| 116 | + | |
115 | 117 | | |
116 | 118 | | |
117 | 119 | | |
118 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
119 | 138 | | |
120 | 139 | | |
121 | 140 | | |
| |||
136 | 155 | | |
137 | 156 | | |
138 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
139 | 195 | | |
140 | 196 | | |
141 | 197 | | |
142 | 198 | | |
| 199 | + | |
| 200 | + | |
143 | 201 | | |
144 | 202 | | |
145 | 203 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
145 | 151 | | |
146 | 152 | | |
147 | 153 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
0 commit comments