Skip to content

Commit

Permalink
fix: EFS index vs subnet for_each (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyblasczyk authored Jan 9, 2024
1 parent 5851b09 commit 1e47177
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/public-dns-external/main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
provider "aws" {
region = "us-west-2"
region = "us-west-2"

default_tags {
tags = {
Expand Down Expand Up @@ -36,7 +36,7 @@ module "wandb_infra" {
zone_id = var.zone_id
subdomain = var.subdomain

# license = var.wandb_license
license = var.wandb_license

bucket_name = var.bucket_name
bucket_kms_key_arn = var.bucket_kms_key_arn
Expand Down
3 changes: 2 additions & 1 deletion modules/app_eks/efs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ resource "aws_security_group_rule" "nfs_ingress" {
}

resource "aws_efs_mount_target" "storage_class" {
for_each = { for subnet in var.network_private_subnets : subnet => subnet }
for_each = { for index, subnet in var.network_private_subnets : index => subnet }

file_system_id = aws_efs_file_system.storage_class.id
subnet_id = each.value
security_groups = [aws_security_group.storage_class_nfs.id]
Expand Down

0 comments on commit 1e47177

Please sign in to comment.