module outputs

    [Terraform] 모듈에 있는 자원을 outputs으로 설정하는 방법 (feat. elb module과 asg)

    Intro Terraform에서 제공하는 모듈을 사용하게 되면 해당 경로의 .terraform/modules/모듈이름 으로 생성이 됩니다. 이 모듈안에서 생성한 리소스를 root의 output으로 정의하여 외부에서 사용할 수 있게 하는 방법을 알아 보도록 하겠습니다. Layout 예시 my-workspace ├──elb │ ├──.terraform │ │ └──module │ │ │ └──elb │ │ │ ├──main.tf │ │ │ ├──outputs.tf ### 1. ELB 모듈의 ouptput │ ├──main.tf │ ├──outputs.tf ### 2. ELB 루트의 ouptput └──asg ├──data.tf ### 3. ASG 의 data ├──main.tf ### 4. ASG 의 mai..