Skip to content

Commit

Permalink
fix: Update IMDsv2 policy name and format (#59)
Browse files Browse the repository at this point in the history
* fix: Formating policy name

---------

Co-authored-by: Zachary Blasczyk <zb@Zachary-Blasczyk-TW7P70V256.local>
  • Loading branch information
zacharyblasczyk and Zachary Blasczyk authored Feb 24, 2023
1 parent 05c5d5e commit b1db83f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/app_eks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ data "aws_iam_policy_document" "node" {
resource "aws_eks_addon" "eks" {
cluster_name = var.namespace
addon_name = "aws-ebs-csi-driver"
depends_on = [
module.eks
depends_on = [
module.eks
]
}

Expand Down Expand Up @@ -120,7 +120,7 @@ resource "aws_iam_role" "node" {

# Enable IMDsv2
inline_policy {
name = "IMDsv2-policy"
name = "${var.namespace}-node-IMDsv2-policy"
policy = jsonencode({
Version = "2012-10-17"
Statement = [
Expand Down Expand Up @@ -179,7 +179,7 @@ module "eks" {
disk_kms_key_id = var.kms_key_arn,
force_update_version = local.encrypt_ebs_volume,
# IMDsv2
metadata_http_tokens = "required",
metadata_http_tokens = "required",
metadata_http_put_response_hop_limit = 2
}
}
Expand Down

0 comments on commit b1db83f

Please sign in to comment.