Terraform resource μ΄ν΄νκΈ° w/AWS VPC
- kkumtree
2023-09-08T22:41:14+09:00
μ΄λ²μλ CloudNet@λ₯Ό ν΅ν΄ νμ΅ν λ΄μ©μ κΈ°λ°μΌλ‘,
- AZλ₯Ό λμμΌλ‘ ν data μ‘°ν
- AWS VPC μμ± μμ λ‘ μ΄ν΄λ³΄λ output
- resource μ΄λ¦ λ³κ²½
μμΌλ‘ μμ보λλ‘ νκ² μ΅λλ€.
κ΅μ¬λ‘ μ¬μ©ν [ν λΌνΌμΌλ‘ μμνλ IaC] λ μ°Έκ³ νμμ΅λλ€.
κΈ°λ³Έ μ€μ
- aws-cliμ 리μ μ
ap-northeast-2μ μ€μ νμμ΅λλ€.
$ aws configure list
Name Value Type Location
---- ----- ---- --------
profile <not set> None None
access_key ****************2U5J shared-credentials-file
secret_key ****************Z0co shared-credentials-file
region ap-northeast-2 config-file ~/.aws/config
1. data μ‘°ν
dataλ μ¬μ©μκ° μ μνλ resource λ° λ¦¬μμ€μ λν μ€νκ³Ό λ°λλ‘,
provider(μ΄λ² ν¬μ€νΈμμλ aws)μμ μ 곡νλ 리μμ€λ₯Ό μ‘°ννλ κΈ°λ₯μ
λλ€.