Skip to content

Commit

Permalink
feat: Ignore changes to *.aws_iam_role.*.role_last_used (terraform-aw…
Browse files Browse the repository at this point in the history
  • Loading branch information
yurrriq authored May 24, 2023
1 parent fcb4256 commit f8ea3d0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,12 @@ resource "aws_iam_role" "this" {
}

tags = merge(var.tags, var.iam_role_tags)

lifecycle {
ignore_changes = [
role_last_used,
]
}
}

# Policies attached ref https://docs.aws.amazon.com/eks/latest/userguide/service_IAM_role.html
Expand Down
6 changes: 6 additions & 0 deletions modules/eks-managed-node-group/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,12 @@ resource "aws_iam_role" "this" {
force_detach_policies = true

tags = merge(var.tags, var.iam_role_tags)

lifecycle {
ignore_changes = [
role_last_used,
]
}
}

# Policies attached ref https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eks_node_group
Expand Down
6 changes: 6 additions & 0 deletions modules/karpenter/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ resource "aws_iam_role" "irsa" {
force_detach_policies = true

tags = merge(var.tags, var.irsa_tags)

lifecycle {
ignore_changes = [
role_last_used,
]
}
}

locals {
Expand Down

0 comments on commit f8ea3d0

Please sign in to comment.