Immutable

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)μ—μ„œ μ œκ³΅ν•˜λŠ” λ¦¬μ†ŒμŠ€λ₯Ό μ‘°νšŒν•˜λŠ” κΈ°λŠ₯μž…λ‹ˆλ‹€.

kkumtree

Source code on GitHub

Β© 2025 kkumtree and contributors All rights reserved.
Licensed under
CC BY-NC-ND 4.0