Upgrade to Pro — share decks privately, control downloads, hide ads and more …

突撃!隣の Terraform / Visit the next terraform

Takeshi Kondo
December 02, 2019

突撃!隣の Terraform / Visit the next terraform

Takeshi Kondo

December 02, 2019
Tweet

More Decks by Takeshi Kondo

Other Decks in Technology

Transcript

  1. Background • https://gist.github.com/suzuki-shunsuke/ 0f6f602571920e95be279044c2f44ea8 • 2 repositories, 3 states •

    Japan / Global • Production / Staging / Manage • ୭Ͱ΋ PR Λ౤͛ΒΕΔঢ়گͰ͸͋Δɺ͕ɺɺɺ • Өڹൣғ͕େ͖͍ • Release branch ӡ༻ʹݶք͕ݟ͖͑ͯͨ • SRE Λհͣ͞ Devs ͕ࣗ༝ʹ merge & release ͯ͠΄͍͠ • Splitting State • Delegation to devs
  2. Kyash • @lamanotrama ͞Μʢݩฐࣾ Senior SREʣ • workspace Λ࢖༻ •

    ։ൃɾຊ൪͕Ұக͍ͯ͠Δ͜ͱΛώΞϦϯάͰ֬ೝ • remote stateͷ key check ࣗಈԽ • moduleԽͷࡍͷTips • module ͷ಺෦͕͋·ΓมΘΒͳ͍ͱ֬৴Ͱ͖Δ΋ͷ • ෳࡶͳ࢓༷Λ module ʹ͠ͳ͍ • State ࣗମΛ෼͚͍ͯΔͷͰ module Խ͢Δ͜ͱͰ DRY ʹ͸ͳΒͳ͍
  3. mercari • @deeeet ͞Μ / @dtan4 ͞Μ • https://gist.github.com/tcnksm/ 7b430f7955beac1ebb5b4d2fb26b40f7

    • GitHub flow • ಉ࣌ʹ1 service ͔͠มߋͰ͖ͳ੍͍໿ • Master branch Ͱͷ CI ͸ඞͣ 1 service ͷΈ͕ Apply • ৽αʔϏε࡞੒࣌ʹ͸ bootstrap Λ༻ҙ • microservices starter kit module • template_dir Λ༻͍࣭ͯ໰ʹ౴͑Δͱࣗಈੜ੒ • Stein ʹΑΔ lint
  4. Future work By @suzuki-shunsuke • Conftest ʹΑΔ state ͷ Lint

    • Remote state ͷ key ͷ Lint • Kubernetes ͷ manifest ΋ςετͰ͖Δ • Service domain ୯ҐͰͷ෼ׂத • ڞ௨ɾωοτϫʔΫϦιʔε΁ͷґଘ͸ϋʔυίʔυ • Application in monorepo ͷ໊લͱҰகͤ͞Δ • Service ͱͦΕΒ͕ར༻͢Δ Infrastructure ͸Կ͔͠Β ͷن໿ͰҰகͤ͞Δඞཁ͕͋Δͱ൑அ