모험가

Terraform ( Application Load Balancer(ALB) - 2 ) 본문

Terraform

Terraform ( Application Load Balancer(ALB) - 2 )

라리음 2022. 6. 23. 16:42

 

이 글은 인프런의 스스로 구축하는 AWS 클라우드 인프라 with 테라폼을 보며 정리합니다.

 

 

 

 

 

 

 

 

참조

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener

 

Terraform Registry

 

registry.terraform.io

 

 

 

 

 

리스너 추가

 

 

 

 

 

 

 

 

 

 

 

 

attatchment 작성

 

 

 

 

 

alb dns이름 출력 추가

 

 

 

 

 

 

 

 

 

 

for each 문

 

인스턴스 수가 늘어남에 따라 계속 attatchment를 쓸 수 없으므로 for each문을  사용

 

 

 

 

기존의 attatch 주석 처리

 

 

 

 

 

 

 

 

attatch 문에 for each문을 포함해서 만듬

 

 

 

 

 

 

 

 

 

 

 

 

 

 

private ip를 count-index 구문으로 attatchment

 

 

 

 

 

 

for each문을 주석 하고

 

다시 count-index문으로 작성

 

 

 

 

 

 

 

'Terraform' 카테고리의 다른 글

Terraform ( VPC )  (0) 2022.07.27
Terraform ( Application Load Balancer(ALB) - 1 )  (0) 2022.06.23
Terraform ( EC2 )  (0) 2022.06.22
Terraform (Key Pair 생성 및 전송)  (0) 2022.06.22
Terraform ( cloud9 환경 구성)  (0) 2022.06.22