From 1e8035b659a786d060ccb29d86bd1caeac07ce83 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Wed, 24 May 2023 11:45:36 -0500 Subject: [PATCH 1/3] feat: Ignore changes to aws_iam_role.this[0].role_last_used --- main.tf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.tf b/main.tf index 52d36aa201..7fad0019fa 100644 --- a/main.tf +++ b/main.tf @@ -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 From 059d7284f8832fd9fdca47e6900c03c454f3ec76 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Wed, 24 May 2023 11:51:48 -0500 Subject: [PATCH 2/3] feat: Ignore changes to module.eks_managed_node_group[*].aws_iam_role.this[0].role_last_used --- modules/eks-managed-node-group/main.tf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/eks-managed-node-group/main.tf b/modules/eks-managed-node-group/main.tf index 1d3fe81698..3deca4dcea 100644 --- a/modules/eks-managed-node-group/main.tf +++ b/modules/eks-managed-node-group/main.tf @@ -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 From 3af01263aeed46987252f893e16466d55fffb65d Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Wed, 24 May 2023 11:52:03 -0500 Subject: [PATCH 3/3] feat: Ignore changes to module.karpenter.aws_iam_role.irsa[0].role_last_used --- modules/karpenter/main.tf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/karpenter/main.tf b/modules/karpenter/main.tf index 2c809ed621..edfa556e08 100644 --- a/modules/karpenter/main.tf +++ b/modules/karpenter/main.tf @@ -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 {