Skip to content

Instantly share code, notes, and snippets.

@tico24
tico24 / karpenter-irsa.tf
Last active December 6, 2021 08:25
(Bad, but working) terraform for Karpenter
# This is VERY quick and dirty. Find and replace 'my-eks-name' with the name of your eks cluster.
# This also assumes you created your cluster using this module: https://registry.terraform.io/modules/terraform-aws-modules/eks/aws/17.1.0 You'll probably have to fudge some of the vars if you didn't. Shouldn't be too hard.
resource "aws_iam_instance_profile" "KarpenterNodeInstanceProfile-my-eks-name" {
name = "KarpenterNodeInstanceProfile-my-eks-name"
role = aws_iam_role.KarpenterNodeRole-my-eks-name.name
}
resource "aws_iam_role" "KarpenterNodeRole-my-eks-name" {
name = "KarpenterNodeRole-my-eks-name"