diff --git a/examples/efs-persistent-volumes/efs-access-points.tf b/examples/efs-persistent-volumes/efs-access-points.tf index ce21e26..e2c95dc 100644 --- a/examples/efs-persistent-volumes/efs-access-points.tf +++ b/examples/efs-persistent-volumes/efs-access-points.tf @@ -1,5 +1,5 @@ resource "aws_efs_access_point" "efs_ap" { - for_each = { for ap in local.efs_access_points : ap.name => ap } + for_each = { for ap in local.efs_access_points : ap.label => ap } file_system_id = module.efs.id root_directory { path = each.value.path @@ -19,7 +19,7 @@ resource "aws_efs_access_point" "efs_ap" { } resource "kubernetes_persistent_volume" "efs_ap" { - for_each = { for ap in local.efs_access_points : ap.name => ap } + for_each = { for ap in local.efs_access_points : ap.label => ap } metadata { name = format("efs-%v-pv", each.key) } @@ -45,7 +45,7 @@ resource "kubernetes_persistent_volume" "efs_ap" { } resource "kubernetes_persistent_volume_claim" "efs_ap" { - for_each = { for ap in local.efs_access_points : ap.name => ap } + for_each = { for ap in local.efs_access_points : ap.label => ap } metadata { name = format("%v-%v-%v-claim", var.cluster_name, each.value.claim_namespace, each.value.claim_name) namespace = format("%v-%v", var.cluster_name, each.value.claim_namespace)