Skip to content

Drift as a result of incorrect ARN lookup #64

Open
@srlynch1

Description

@srlynch1

This current code is causing continual drift as a result of using ephemeral ARN not the issuer_arn

aws_account_arn = var.aws_account_arn == null ? data.aws_caller_identity.current[0].arn : var.aws_account_arn

This is using a value that is ephemeral or session based not the actual arn

aws_account_arn = var.aws_account_arn == null ? data.aws_caller_identity.current[0].arn : var.aws_account_arn

instead should use, this is example where this is handled correctly in the AWS EKS modules

data.aws_iam_session_context.current[0].issuer_arn
data "aws_iam_session_context" "current" {
  count = local.create ? 1 : 0
  arn = try(data.aws_caller_identity.current[0].arn, "")
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions