TFC(Terraform Cloud) drift μλ¦Ό μ€μ
- kkumtree
2023-10-15T00:10:33+09:00
CloudNet@μμμ Terraform μ€ν°λκ° λλκ³ λμ, ν λΌνΌμ μ€μ μ΄μ μν©μ λμ νλ©΄μ λ§μ£Όν μ λ°μ μλ λ리ννΈ(drift) μν©μ λν΄ μ΄ν΄ν΄λ³΄λ μκ°μ κ°μ‘μ΅λλ€. μ°Έκ³ ) TFCμμμ Drift Detection κΈ°λ₯μ νμ¬ TFC Plus μλμ μμ μ§μλ©λλ€. 1. μ©μ΄ μ΄ν΄ν΄λ³΄κΈ° μ¬μ€μ μλ λΆν° ν λΌνΌμ μ νκ³ λμ, IaCλΌλ κ°λ μ κ½νκΈ°λ§ νμ§ μ΄μ μ μ₯μμ λ§μ£Όνμλ μλ§μ μνμ°©μ€λ€μ νν μ μ μλ¬λ‘λ§ μκ°ν΄μμμ΅λλ€. μ€ν°λμ μ°Έμ¬νλ©΄μ μ’ μ’ ‘λ리ννΈ’λΌλ λ¨μ΄λ₯Ό λ£κ³ , μ°Ύμ보λ μλΉλΆλΆμ΄ μ΄μ μνλ μν©μ΄λΌλ κ²μ μ μ μμμ΅λλ€. (1) Drift? κΈ μμ±μ μν΄ μ°Ύμλ³Έ κΈ°μ μ Driftλ λ³Έλ μ£Όνμ μμ΄μμ κ·Έκ²κ³Ό
Understanding terraform module
- kkumtree
2023-10-04T11:24:13+09:00
This week is last week of CloudNet@ group study about terraform. In this study, my personal goal is making AWS architecture only with terraform and one tfstate file. Basic knowledge about AWS resources is required. 1. Terraform without Module Before, I already met terraform for maintaining AWS in production level. But at that time, our team maintain them as folder structure which is used by terraformer # example structure $ tree .
IAM STSλ₯Ό μ΄μ©ν Terraform Cloud κΆν λΆμ¬
- kkumtree
2023-09-13T20:54:28+09:00
μ΄λ²μλ Terraform Cloudκ° μΌλ§λ μ’μμ§ λ μμ보기 μν΄, μ€ν°λμμ μ§μμ μΌλ‘ μ₯μ μ΄ κ°μ‘°λμ΄ μλ Terraform Cloudμ IAM STSλ₯Ό μ΄μ©ν κΆν λΆμ¬ λμ λ° μ μ© μ±κ³΅μ λν΄ μ¨λ³΄λ €κ³ ν©λλ€. Terraformμ μν μ μ₯μ μν΄ λ³΄ν΅ AWS S3λ₯Ό μ¬μ©νλλ°, μλ€μνΌ S3 κΈ°λ‘μ 무λ£μ§λ§, λΆλ¬μ€λ κ²μ μ λ£μ λλ€. (μ κΈ°λ κ΅μ°μ΄μ§λ§, μλ£λ μμ μ λλ€) κ·Έλμ μ€ν°λμ©μΌλ‘λ Terraformμ λΆλ¬μ¬ λλ§λ€, μν κ°μ S3λ§κ³ , λ‘컬μ μ μ₯νμλλ°μ. λ°μμλ λ ΈνΈλΆ, μ§μμλ λ°μ€ν¬νμΌλ‘ νλ €λ μ΄κ±Έ GitHubμ Private Repoμ μ μ₯ν κΉ? νλ€κ° Terraform Cloudλ₯Ό μ¨λ³΄κΈ°λ‘ νμ΅λλ€.
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 λ° λ¦¬μμ€μ λν μ€νκ³Ό λ°λλ‘,
Terraform μμνκΈ° w/Minimal Ubuntu
- kkumtree
2023-08-31T22:21:08+09:00
μ΄λ²μλ CloudNet@μμ μ§ννλ Terraform μ€ν°λ(μ΄ν, T101)μ μ°Έμ¬νμ΅λλ€. Terraformμ μ°λ©΄ μ μ’μμ§λ μμΈνκ³ μ λ¬Έμ μΈ κΈμ΄ μμΌλ―λ‘, μ°Έκ³ νμλ©΄ μ’μ κ² κ°μ΅λλ€. (λ§ν¬: 44bits) μμ μ ν λΌνΌμ μΌλ μ μ΄ μμ§λ§, Moduleνκ° μ΄λ ΅κΈ°λ νκ³ μ΄λ² κΈ°νμ ν λΌνΌ μ κ°μ λ€μ 볡기νλ λ§μμΌλ‘ μ°Έμ¬νμ΅λλ€. μ¬μ©ν κ΅μ¬λ [ν λΌνΌμΌλ‘ μμνλ IaC] μ λλ€. μ΄λ²μλ Terraform μ΄κΈ° μ μ μ λν΄, μ΄ν΄λ³΄κ³ μνμΌμ Canonical 곡μ Minimal Ubuntu(ARM64) AMIλ₯Ό μ€μΉν΄λ³΄κ² μ΅λλ€. Terraform μ€μΉ tfenv μ¬μ©κ³Ό .tf μμ± λ°λΌνκΈ° Hello World in terraform Terraform μ¨λ³΄κΈ° μμΌλ‘ μ§νν©λλ€.