mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-01-18 09:38:33 +01:00
feat: Allow users to add more Audiences to OpenID Connect (#1451)
This commit is contained in:
@@ -262,6 +262,7 @@ Apache 2 Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraf
|
||||
| <a name="input_map_users"></a> [map\_users](#input\_map\_users) | Additional IAM users to add to the aws-auth configmap. See examples/basic/variables.tf for example format. | <pre>list(object({<br> userarn = string<br> username = string<br> groups = list(string)<br> }))</pre> | `[]` | no |
|
||||
| <a name="input_node_groups"></a> [node\_groups](#input\_node\_groups) | Map of map of node groups to create. See `node_groups` module's documentation for more details | `any` | `{}` | no |
|
||||
| <a name="input_node_groups_defaults"></a> [node\_groups\_defaults](#input\_node\_groups\_defaults) | Map of values to be applied to all node groups. See `node_groups` module's documentation for more details | `any` | `{}` | no |
|
||||
| <a name="input_openid_connect_audiences"></a> [openid\_connect\_audiences](#input\_openid\_connect\_audiences) | List of OpenID Connect audience client IDs to add to the IRSA provider. | `list(string)` | `[]` | no |
|
||||
| <a name="input_permissions_boundary"></a> [permissions\_boundary](#input\_permissions\_boundary) | If provided, all IAM roles will be created with this permissions boundary attached. | `string` | `null` | no |
|
||||
| <a name="input_subnets"></a> [subnets](#input\_subnets) | A list of subnets to place the EKS cluster and workers within. | `list(string)` | n/a | yes |
|
||||
| <a name="input_tags"></a> [tags](#input\_tags) | A map of tags to add to all resources. Tags added to launch configuration or templates override these values for ASG Tags only. | `map(string)` | `{}` | no |
|
||||
|
||||
2
irsa.tf
2
irsa.tf
@@ -9,7 +9,7 @@
|
||||
|
||||
resource "aws_iam_openid_connect_provider" "oidc_provider" {
|
||||
count = var.enable_irsa && var.create_eks ? 1 : 0
|
||||
client_id_list = [local.sts_principal]
|
||||
client_id_list = local.sts_principal
|
||||
thumbprint_list = [var.eks_oidc_root_ca_thumbprint]
|
||||
url = flatten(concat(aws_eks_cluster.this[*].identity[*].oidc.0.issuer, [""]))[0]
|
||||
|
||||
|
||||
2
local.tf
2
local.tf
@@ -44,7 +44,7 @@ locals {
|
||||
)
|
||||
|
||||
ec2_principal = "ec2.${data.aws_partition.current.dns_suffix}"
|
||||
sts_principal = "sts.${data.aws_partition.current.dns_suffix}"
|
||||
sts_principal = compact(concat(["sts.${data.aws_partition.current.dns_suffix}"], var.openid_connect_audiences))
|
||||
|
||||
policy_arn_prefix = "arn:${data.aws_partition.current.partition}:iam::aws:policy"
|
||||
workers_group_defaults_defaults = {
|
||||
|
||||
@@ -393,3 +393,9 @@ variable "wait_for_cluster_timeout" {
|
||||
type = number
|
||||
default = 300
|
||||
}
|
||||
|
||||
variable "openid_connect_audiences" {
|
||||
description = "List of OpenID Connect audience client IDs to add to the IRSA provider."
|
||||
type = list(string)
|
||||
default = []
|
||||
}
|
||||
Reference in New Issue
Block a user