突撃!隣の Terraform / Visit the next terraform

93c80c388fe9d8f9df7d030549a0ff0b?s=47 Takeshi Kondo
December 02, 2019

突撃!隣の Terraform / Visit the next terraform

93c80c388fe9d8f9df7d030549a0ff0b?s=128

Takeshi Kondo

December 02, 2019
Tweet

Transcript

  1. 3.

    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. 7.

  3. 8.

  4. 9.
  5. 11.

    Kyash • @lamanotrama ͞Μʢݩฐࣾ Senior SREʣ • workspace Λ࢖༻ •

    ։ൃɾຊ൪͕Ұக͍ͯ͠Δ͜ͱΛώΞϦϯάͰ֬ೝ • remote stateͷ key check ࣗಈԽ • moduleԽͷࡍͷTips • module ͷ಺෦͕͋·ΓมΘΒͳ͍ͱ֬৴Ͱ͖Δ΋ͷ • ෳࡶͳ࢓༷Λ module ʹ͠ͳ͍ • State ࣗମΛ෼͚͍ͯΔͷͰ module Խ͢Δ͜ͱͰ DRY ʹ͸ͳΒͳ͍
  6. 13.

    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
  7. 14.

    Future work By @suzuki-shunsuke • Conftest ʹΑΔ state ͷ Lint

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