output
root module
output "test" {
value = "smiley"
}terraform apply --auto-approve
output์ด ์ ๋์จ๋ค.
child module์์ output
instance ์ ์ด๋ค๊ณ ๊ฐ์ ํ๋ฉด
vi module/instance/main.tf
root module์์๋
module. ํ๊ณ ๋ชจ๋ ์ด๋ฆ์ ์ ๊ณ .์ ์ฐ๊ณ output ์ด๋ฆ์ ์ ๋๋ค.
child module ์์ loop๋ฅผ ์ฌ์ฉํ๊ฒฝ์ฐ
์ด๋ฐ์์ผ๋ก ๋กํ๊ฐ ๋๋ฉด์ ์ฌ๋ฌ๊ฐ์ vm์ ๋ง๋ค๋ฉด
์ด๋ฐ์์ผ๋ก ์ฌ์ฉํด์ผํ๋ค.
todo
๊ทธ๋ฐ๋ฐ ์์ํ์ ์ ์ฐ์ง???
Last updated
Was this helpful?