Skip to content

Commit

Permalink
feat: Add optional path variable for the platform_team_eks_access aws…
Browse files Browse the repository at this point in the history
…_iam_policy (aws-ia#1431)

Co-authored-by: nada.jankovic <[email protected]>
  • Loading branch information
2 people authored and Gumar Minibaev committed Mar 17, 2023
1 parent 2ba6449 commit e100791
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions modules/aws-eks-teams/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ No modules.
| <a name="input_application_teams"></a> [application\_teams](#input\_application\_teams) | Map of maps of teams to create | `any` | `{}` | no |
| <a name="input_eks_cluster_id"></a> [eks\_cluster\_id](#input\_eks\_cluster\_id) | EKS Cluster name | `string` | n/a | yes |
| <a name="input_iam_role_permissions_boundary"></a> [iam\_role\_permissions\_boundary](#input\_iam\_role\_permissions\_boundary) | ARN of the policy that is used to set the permissions boundary for the IAM role | `string` | `null` | no |
| <a name="input_path"></a> [path](#input\_path) | Path in which to create the platform\_team\_eks\_access policy | `string` | `"/"` | no |
| <a name="input_platform_teams"></a> [platform\_teams](#input\_platform\_teams) | Map of maps of teams to create | `any` | `{}` | no |
| <a name="input_tags"></a> [tags](#input\_tags) | A map of tags to add to all resources | `map(string)` | `{}` | no |

Expand Down
2 changes: 1 addition & 1 deletion modules/aws-eks-teams/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ resource "aws_iam_role" "platform_team" {
resource "aws_iam_policy" "platform_team_eks_access" {
count = length(var.platform_teams) > 0 ? 1 : 0
name = "${var.eks_cluster_id}-PlatformTeamEKSAccess"
path = "/"
path = var.path
description = "Platform Team EKS Console Access"
policy = data.aws_iam_policy_document.platform_team_eks_access[0].json
tags = var.tags
Expand Down
6 changes: 6 additions & 0 deletions modules/aws-eks-teams/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,9 @@ variable "iam_role_permissions_boundary" {
type = string
default = null
}

variable "path" {
description = "Path in which to create the platform_team_eks_access policy"
type = string
default = "/"
}

0 comments on commit e100791

Please sign in to comment.