Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add tags on additional IAM resources like IAM policies #1321

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ MIT Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraform-a
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.1 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.22.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.35.0 |
| <a name="requirement_kubernetes"></a> [kubernetes](#requirement\_kubernetes) | >= 1.11.1 |
| <a name="requirement_local"></a> [local](#requirement\_local) | >= 1.4 |
| <a name="requirement_null"></a> [null](#requirement\_null) | >= 2.1 |
Expand All @@ -156,7 +156,7 @@ MIT Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraform-a

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 3.22.0 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 3.35.0 |
| <a name="provider_kubernetes"></a> [kubernetes](#provider\_kubernetes) | >= 1.11.1 |
| <a name="provider_local"></a> [local](#provider\_local) | >= 1.4 |
| <a name="provider_null"></a> [null](#provider\_null) | >= 2.1 |
Expand Down
1 change: 1 addition & 0 deletions cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ resource "aws_iam_policy" "cluster_elb_sl_role_creation" {
description = "Permissions for EKS to create AWSServiceRoleForElasticLoadBalancing service-linked role"
policy = data.aws_iam_policy_document.cluster_elb_sl_role_creation[0].json
path = var.iam_path
tags = var.tags
}

resource "aws_iam_role_policy_attachment" "cluster_elb_sl_role_creation" {
Expand Down
1 change: 1 addition & 0 deletions docs/autoscaling.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ resource "aws_iam_policy" "worker_autoscaling" {
description = "EKS worker node autoscaling policy for cluster ${module.my_cluster.cluster_id}"
policy = data.aws_iam_policy_document.worker_autoscaling.json
path = var.iam_path
tags = var.tags
}

data "aws_iam_policy_document" "worker_autoscaling" {
Expand Down
7 changes: 7 additions & 0 deletions irsa.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,11 @@ resource "aws_iam_openid_connect_provider" "oidc_provider" {
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]

tags = merge(
{
Name = "${var.cluster_name}-eks-irsa"
},
var.tags
)
}
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_version = ">= 0.13.1"

required_providers {
aws = ">= 3.22.0"
aws = ">= 3.35.0"
local = ">= 1.4"
null = ">= 2.1"
template = ">= 2.1"
Expand Down
1 change: 1 addition & 0 deletions workers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ resource "aws_iam_instance_profile" "workers" {
)

path = var.iam_path
tags = var.tags

lifecycle {
create_before_destroy = true
Expand Down
1 change: 1 addition & 0 deletions workers_launch_template.tf
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,7 @@ resource "aws_iam_instance_profile" "workers_launch_template" {
local.default_iam_role_id,
)
path = var.iam_path
tags = var.tags

lifecycle {
create_before_destroy = true
Expand Down