mirror of
https://github.com/terraform-aws-modules/terraform-aws-eks.git
synced 2025-09-09 19:32:58 +08:00
feat!: Upgrade min AWS provider and Terraform versions to 6.0 and 1.5.7 respectively (#3412)
* feat!: Upgrade min AWS provider and Terraform versions to `6.0` and `1.5.7` respectively * fix: Remove deprecated arguments in AWS v6.0 provider, upgrade Helm provider to v3.0, bump VPC module to v6.0 * fix: Remove `aws-auth` sub-module * fix: Remove `platform` and `cluster_service_ipv4_cidr` variables from `user-data` sub-module * fix: Resolve all marked `todos` that have been accumulated * fix: Set default `http_put_response_hop_limit` to `1` * fix: Remove IRSA support from Karpenter sub-module * fix: Avoid making GET requests from data sources unless absolutely necessary * feat: Add variable optional attribute definitions * feat: Bump KMS key module version to latest, add remaining variable attribute definitions * fix: Remove `cluster_` prefix from variable names to better match the underlying API * fix: Move all EFA logic to the nodegroup itself * fix: Remove arguments that do not make sense in EKS * fix: Updates from plan validation * fix: Remove more self-managed node group attributes that are commonly not used in EKS clusters * fix: Remove data plane compute `*_defaults` variables that do not work with variable optional attributes * fix: Ignore changes to `bootstrap_self_managed_addons` to aid in upgrade * feat: Add support for `region` argument on relevant resources * feat: Initial pass on upgrade guide * fix: Updates from testing and validating EKS managed node group * fix: Updates from testing and validating self-managed node group * docs: Ensure addon ussage documented is aligned * feat: Switch to dualstack OIDC issuer URL * feat: Allow sourcing over overriding the Karpenter assume role policy * fix: Use `Bool` instead of `StringEquals` for DenyHTTP queue policy * fix: Correct use of `nullable` and default value propagation
This commit is contained in:
@@ -74,14 +74,14 @@ module "eks_hybrid_node_role" {
|
||||
|
||||
| Name | Version |
|
||||
|------|---------|
|
||||
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.2 |
|
||||
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.95, < 6.0.0 |
|
||||
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
|
||||
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.0 |
|
||||
|
||||
## Providers
|
||||
|
||||
| Name | Version |
|
||||
|------|---------|
|
||||
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.95, < 6.0.0 |
|
||||
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.0 |
|
||||
|
||||
## Modules
|
||||
|
||||
@@ -115,7 +115,7 @@ No modules.
|
||||
| <a name="input_enable_ira"></a> [enable\_ira](#input\_enable\_ira) | Enables IAM Roles Anywhere based IAM permissions on the node | `bool` | `false` | no |
|
||||
| <a name="input_enable_pod_identity"></a> [enable\_pod\_identity](#input\_enable\_pod\_identity) | Enables EKS Pod Identity based IAM permissions on the node | `bool` | `true` | no |
|
||||
| <a name="input_intermediate_policy_name"></a> [intermediate\_policy\_name](#input\_intermediate\_policy\_name) | Name of the IAM policy | `string` | `null` | no |
|
||||
| <a name="input_intermediate_policy_statements"></a> [intermediate\_policy\_statements](#input\_intermediate\_policy\_statements) | A list of IAM policy [statements](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document#statement) - used for adding specific IAM permissions as needed | `any` | `[]` | no |
|
||||
| <a name="input_intermediate_policy_statements"></a> [intermediate\_policy\_statements](#input\_intermediate\_policy\_statements) | A list of IAM policy [statements](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document#statement) - used for adding specific IAM permissions as needed | <pre>list(object({<br/> sid = optional(string)<br/> actions = optional(list(string))<br/> not_actions = optional(list(string))<br/> effect = optional(string)<br/> resources = optional(list(string))<br/> not_resources = optional(list(string))<br/> principals = optional(list(object({<br/> type = string<br/> identifiers = list(string)<br/> })))<br/> not_principals = optional(list(object({<br/> type = string<br/> identifiers = list(string)<br/> })))<br/> condition = optional(list(object({<br/> test = string<br/> values = list(string)<br/> variable = string<br/> })))<br/> }))</pre> | `null` | no |
|
||||
| <a name="input_intermediate_policy_use_name_prefix"></a> [intermediate\_policy\_use\_name\_prefix](#input\_intermediate\_policy\_use\_name\_prefix) | Determines whether the name of the IAM policy (`intermediate_policy_name`) is used as a prefix | `bool` | `true` | no |
|
||||
| <a name="input_intermediate_role_description"></a> [intermediate\_role\_description](#input\_intermediate\_role\_description) | IAM role description | `string` | `"EKS Hybrid Node IAM Roles Anywhere intermediate IAM role"` | no |
|
||||
| <a name="input_intermediate_role_name"></a> [intermediate\_role\_name](#input\_intermediate\_role\_name) | Name of the IAM role | `string` | `null` | no |
|
||||
@@ -129,7 +129,7 @@ No modules.
|
||||
| <a name="input_ira_profile_session_policy"></a> [ira\_profile\_session\_policy](#input\_ira\_profile\_session\_policy) | A session policy that applies to the trust boundary of the vended session credentials | `string` | `null` | no |
|
||||
| <a name="input_ira_trust_anchor_acm_pca_arn"></a> [ira\_trust\_anchor\_acm\_pca\_arn](#input\_ira\_trust\_anchor\_acm\_pca\_arn) | The ARN of the ACM PCA that issued the trust anchor certificate | `string` | `null` | no |
|
||||
| <a name="input_ira_trust_anchor_name"></a> [ira\_trust\_anchor\_name](#input\_ira\_trust\_anchor\_name) | Name of the Roles Anywhere trust anchor | `string` | `null` | no |
|
||||
| <a name="input_ira_trust_anchor_notification_settings"></a> [ira\_trust\_anchor\_notification\_settings](#input\_ira\_trust\_anchor\_notification\_settings) | Notification settings for the trust anchor | `any` | `[]` | no |
|
||||
| <a name="input_ira_trust_anchor_notification_settings"></a> [ira\_trust\_anchor\_notification\_settings](#input\_ira\_trust\_anchor\_notification\_settings) | Notification settings for the trust anchor | <pre>list(object({<br/> channel = optional(string)<br/> enabled = optional(bool)<br/> event = optional(string)<br/> threshold = optional(number)<br/> }))</pre> | `null` | no |
|
||||
| <a name="input_ira_trust_anchor_source_type"></a> [ira\_trust\_anchor\_source\_type](#input\_ira\_trust\_anchor\_source\_type) | The source type of the trust anchor | `string` | `null` | no |
|
||||
| <a name="input_ira_trust_anchor_x509_certificate_data"></a> [ira\_trust\_anchor\_x509\_certificate\_data](#input\_ira\_trust\_anchor\_x509\_certificate\_data) | The X.509 certificate data of the trust anchor | `string` | `null` | no |
|
||||
| <a name="input_max_session_duration"></a> [max\_session\_duration](#input\_max\_session\_duration) | Maximum API session duration in seconds between 3600 and 43200 | `number` | `null` | no |
|
||||
@@ -140,9 +140,9 @@ No modules.
|
||||
| <a name="input_policy_description"></a> [policy\_description](#input\_policy\_description) | IAM policy description | `string` | `"EKS Hybrid Node IAM role policy"` | no |
|
||||
| <a name="input_policy_name"></a> [policy\_name](#input\_policy\_name) | Name of the IAM policy | `string` | `"EKSHybridNode"` | no |
|
||||
| <a name="input_policy_path"></a> [policy\_path](#input\_policy\_path) | Path of the IAM policy | `string` | `"/"` | no |
|
||||
| <a name="input_policy_statements"></a> [policy\_statements](#input\_policy\_statements) | A list of IAM policy [statements](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document#statement) - used for adding specific IAM permissions as needed | `any` | `[]` | no |
|
||||
| <a name="input_policy_statements"></a> [policy\_statements](#input\_policy\_statements) | A list of IAM policy [statements](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document#statement) - used for adding specific IAM permissions as needed | <pre>list(object({<br/> sid = optional(string)<br/> actions = optional(list(string))<br/> not_actions = optional(list(string))<br/> effect = optional(string)<br/> resources = optional(list(string))<br/> not_resources = optional(list(string))<br/> principals = optional(list(object({<br/> type = string<br/> identifiers = list(string)<br/> })))<br/> not_principals = optional(list(object({<br/> type = string<br/> identifiers = list(string)<br/> })))<br/> condition = optional(list(object({<br/> test = string<br/> values = list(string)<br/> variable = string<br/> })))<br/> }))</pre> | `null` | no |
|
||||
| <a name="input_policy_use_name_prefix"></a> [policy\_use\_name\_prefix](#input\_policy\_use\_name\_prefix) | Determines whether the name of the IAM policy (`policy_name`) is used as a prefix | `bool` | `true` | no |
|
||||
| <a name="input_tags"></a> [tags](#input\_tags) | A map of additional tags to add the the IAM role | `map(any)` | `{}` | no |
|
||||
| <a name="input_tags"></a> [tags](#input\_tags) | A map of additional tags to add the the IAM role | `map(string)` | `{}` | no |
|
||||
| <a name="input_trust_anchor_arns"></a> [trust\_anchor\_arns](#input\_trust\_anchor\_arns) | List of IAM Roles Anywhere trust anchor ARNs. Required if `enable_ira` is set to `true` | `list(string)` | `[]` | no |
|
||||
| <a name="input_use_name_prefix"></a> [use\_name\_prefix](#input\_use\_name\_prefix) | Determines whether the name of the IAM role (`name`) is used as a prefix | `bool` | `true` | no |
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ data "aws_partition" "current" {
|
||||
}
|
||||
|
||||
locals {
|
||||
partition = try(data.aws_partition.current[0].partition, "aws")
|
||||
partition = try(data.aws_partition.current[0].partition, "")
|
||||
}
|
||||
|
||||
################################################################################
|
||||
@@ -117,18 +117,18 @@ data "aws_iam_policy_document" "this" {
|
||||
}
|
||||
|
||||
dynamic "statement" {
|
||||
for_each = var.policy_statements
|
||||
for_each = var.policy_statements != null ? var.policy_statements : []
|
||||
|
||||
content {
|
||||
sid = try(statement.value.sid, null)
|
||||
actions = try(statement.value.actions, null)
|
||||
not_actions = try(statement.value.not_actions, null)
|
||||
effect = try(statement.value.effect, null)
|
||||
resources = try(statement.value.resources, null)
|
||||
not_resources = try(statement.value.not_resources, null)
|
||||
sid = statement.value.sid
|
||||
actions = statement.value.actions
|
||||
not_actions = statement.value.not_actions
|
||||
effect = statement.value.effect
|
||||
resources = statement.value.resources
|
||||
not_resources = statement.value.not_resources
|
||||
|
||||
dynamic "principals" {
|
||||
for_each = try(statement.value.principals, [])
|
||||
for_each = statement.value.principals != null ? statement.value.principals : []
|
||||
|
||||
content {
|
||||
type = principals.value.type
|
||||
@@ -137,7 +137,7 @@ data "aws_iam_policy_document" "this" {
|
||||
}
|
||||
|
||||
dynamic "not_principals" {
|
||||
for_each = try(statement.value.not_principals, [])
|
||||
for_each = statement.value.not_principals != null ? statement.value.not_principals : []
|
||||
|
||||
content {
|
||||
type = not_principals.value.type
|
||||
@@ -146,7 +146,7 @@ data "aws_iam_policy_document" "this" {
|
||||
}
|
||||
|
||||
dynamic "condition" {
|
||||
for_each = try(statement.value.conditions, [])
|
||||
for_each = statement.value.condition != null ? statement.value.condition : []
|
||||
|
||||
content {
|
||||
test = condition.value.test
|
||||
@@ -215,7 +215,7 @@ resource "aws_rolesanywhere_trust_anchor" "this" {
|
||||
name = try(coalesce(var.ira_trust_anchor_name, var.name), null)
|
||||
|
||||
dynamic "notification_settings" {
|
||||
for_each = var.ira_trust_anchor_notification_settings
|
||||
for_each = var.ira_trust_anchor_notification_settings != null ? var.ira_trust_anchor_notification_settings : []
|
||||
|
||||
content {
|
||||
channel = try(notification_settings.value.channel, null)
|
||||
@@ -297,18 +297,18 @@ data "aws_iam_policy_document" "intermediate" {
|
||||
}
|
||||
|
||||
dynamic "statement" {
|
||||
for_each = var.intermediate_policy_statements
|
||||
for_each = var.intermediate_policy_statements != null ? var.intermediate_policy_statements : []
|
||||
|
||||
content {
|
||||
sid = try(statement.value.sid, null)
|
||||
actions = try(statement.value.actions, null)
|
||||
not_actions = try(statement.value.not_actions, null)
|
||||
effect = try(statement.value.effect, null)
|
||||
resources = try(statement.value.resources, null)
|
||||
not_resources = try(statement.value.not_resources, null)
|
||||
sid = statement.value.sid
|
||||
actions = statement.value.actions
|
||||
not_actions = statement.value.not_actions
|
||||
effect = statement.value.effect
|
||||
resources = statement.value.resources
|
||||
not_resources = statement.value.not_resources
|
||||
|
||||
dynamic "principals" {
|
||||
for_each = try(statement.value.principals, [])
|
||||
for_each = statement.value.principals != null ? statement.value.principals : []
|
||||
|
||||
content {
|
||||
type = principals.value.type
|
||||
@@ -317,7 +317,7 @@ data "aws_iam_policy_document" "intermediate" {
|
||||
}
|
||||
|
||||
dynamic "not_principals" {
|
||||
for_each = try(statement.value.not_principals, [])
|
||||
for_each = statement.value.not_principals != null ? statement.value.not_principals : []
|
||||
|
||||
content {
|
||||
type = not_principals.value.type
|
||||
@@ -326,7 +326,7 @@ data "aws_iam_policy_document" "intermediate" {
|
||||
}
|
||||
|
||||
dynamic "condition" {
|
||||
for_each = try(statement.value.conditions, [])
|
||||
for_each = statement.value.condition != null ? statement.value.condition : []
|
||||
|
||||
content {
|
||||
test = condition.value.test
|
||||
|
||||
@@ -46,7 +46,7 @@ variable "permissions_boundary_arn" {
|
||||
|
||||
variable "tags" {
|
||||
description = "A map of additional tags to add the the IAM role"
|
||||
type = map(any)
|
||||
type = map(string)
|
||||
default = {}
|
||||
}
|
||||
|
||||
@@ -92,8 +92,28 @@ variable "policy_description" {
|
||||
|
||||
variable "policy_statements" {
|
||||
description = "A list of IAM policy [statements](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document#statement) - used for adding specific IAM permissions as needed"
|
||||
type = any
|
||||
default = []
|
||||
type = list(object({
|
||||
sid = optional(string)
|
||||
actions = optional(list(string))
|
||||
not_actions = optional(list(string))
|
||||
effect = optional(string)
|
||||
resources = optional(list(string))
|
||||
not_resources = optional(list(string))
|
||||
principals = optional(list(object({
|
||||
type = string
|
||||
identifiers = list(string)
|
||||
})))
|
||||
not_principals = optional(list(object({
|
||||
type = string
|
||||
identifiers = list(string)
|
||||
})))
|
||||
condition = optional(list(object({
|
||||
test = string
|
||||
values = list(string)
|
||||
variable = string
|
||||
})))
|
||||
}))
|
||||
default = null
|
||||
}
|
||||
|
||||
variable "policies" {
|
||||
@@ -160,8 +180,13 @@ variable "ira_trust_anchor_name" {
|
||||
|
||||
variable "ira_trust_anchor_notification_settings" {
|
||||
description = "Notification settings for the trust anchor"
|
||||
type = any
|
||||
default = []
|
||||
type = list(object({
|
||||
channel = optional(string)
|
||||
enabled = optional(bool)
|
||||
event = optional(string)
|
||||
threshold = optional(number)
|
||||
}))
|
||||
default = null
|
||||
}
|
||||
|
||||
variable "ira_trust_anchor_acm_pca_arn" {
|
||||
@@ -228,8 +253,28 @@ variable "intermediate_policy_use_name_prefix" {
|
||||
|
||||
variable "intermediate_policy_statements" {
|
||||
description = "A list of IAM policy [statements](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document#statement) - used for adding specific IAM permissions as needed"
|
||||
type = any
|
||||
default = []
|
||||
type = list(object({
|
||||
sid = optional(string)
|
||||
actions = optional(list(string))
|
||||
not_actions = optional(list(string))
|
||||
effect = optional(string)
|
||||
resources = optional(list(string))
|
||||
not_resources = optional(list(string))
|
||||
principals = optional(list(object({
|
||||
type = string
|
||||
identifiers = list(string)
|
||||
})))
|
||||
not_principals = optional(list(object({
|
||||
type = string
|
||||
identifiers = list(string)
|
||||
})))
|
||||
condition = optional(list(object({
|
||||
test = string
|
||||
values = list(string)
|
||||
variable = string
|
||||
})))
|
||||
}))
|
||||
default = null
|
||||
}
|
||||
|
||||
variable "intermediate_role_policies" {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
terraform {
|
||||
required_version = ">= 1.3.2"
|
||||
required_version = ">= 1.5.7"
|
||||
|
||||
required_providers {
|
||||
aws = {
|
||||
source = "hashicorp/aws"
|
||||
version = ">= 5.95, < 6.0.0"
|
||||
version = ">= 6.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user