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 .
Troubleshoot when using terraformer with tfenv
- kkumtree
2023-09-24T11:47:51+09:00
Removing & installing packages are some annoying, isn’t it? So, I like using version managers like SDKMAN, nvm, etc.. I also use tfenv for terraform version management. (prev post: KR/‘Terraform μμνκΈ° w/Minimal Ubuntu’) And I recommend neighbors to use terraformer for first learning about terraform. terraformer is a great terraform generator tool for converting existing cloud infrastructure to terraform code. In this post, I write how I use terraformer with tfenv.
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 λ° λ¦¬μμ€μ λν μ€νκ³Ό λ°λλ‘,