inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

172만명의 커뮤니티!! 함께 토론해봐요.

4.alb 오류 (Call to function "element" failed: cannot use element function with an empty list.)

미해결

지금 당장 데브옵스 - 테라폼 X AWS

4.alb apply 할 경우 아래와 같이 오류가 발생 합니다. Call to function "element" failed: cannot use element function with an empty list. 관련해서 아래와 같이 수정 # 대상 등록 # https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group_attachment resource "aws_lb_target_group_attachment" "attachment" { count = length(data.aws_instances.tag.ids) target_group_arn = aws_lb_target_group.tg.arn target_id = element(data.aws_instances.tag.ids, count.index) port = 3000 //선택한 인스턴스를 위한 포트 }

  • aws
  • element
  • alb
Goboo 댓글 1 좋아요 1 조회수 319

인기 태그

인프런 TOP Writers

주간 인기글