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

Terraformを使ったAWS環境作成の効率化

 Terraformを使ったAWS環境作成の効率化

Lancers Night 2017/03/07

takayuki.hiratsuka

March 09, 2017
Tweet

More Decks by takayuki.hiratsuka

Other Decks in Programming

Transcript

  1. /BU(BUFXBZBUUBDI&*1 SFTPVSDFBXT@FJQ/"5$\ WQDUSVF ^ /BU(BUFXBZ SFTPVSDFBXT@OBU@HBUFXBZ1SJWBUF$\ BMMPDBUJPO@JE\BXT@FJQ/"5$JE^ TVCOFU@JE\BXT@TVCOFUD1SJWBUF1VCMJDJE^ ^ SFTPVSDFBXT@SPVUF@UBCMFD1SJWBUF/"5\

    WQD@JE\BXT@WQD1SJWBUFJE^ SPVUF\ DJES@CMPDL ^ SPVUF\ DJES@CMPDL OBU@HBUFXBZ@JE\BXT@OBU@HBUFXBZ1SJWBUF$JE^ ^ UBHT\ /BNFD1SJWBUF/"5 ^ ^ &*1֬อ /BU(BUFXBZ࡞੒ 3PVUJOH࡞੒ $SFBUF/BU(BUFXBZBOE3PVUJOH
  2. )$- )BTIJ$PSQ$POpHVSBUJPO-BOHVBHF  ‘’HCL is also fully JSON compatible. That

    is, JSON can be used as completely valid input to a system expecting HCL. This helps makes systems interoperable with other systems.‘’ https://github.com/hashicorp/hcl +40/
  3. "O".* WBSJBCMFBNJ\ EFTDSJQUJPOUIF".*UPVTF ^  "NVMUJ MJOFDPNNFOU  SFTPVSDFBXT@JOTUBODFXFC\ BNJ\WBSBNJ^

    DPVOU TPVSDF@EFTU@DIFDLGBMTF DPOOFDUJPO\ VTFSSPPU ^ ^ ʲίϝϯτʳ γϯάϧϥΠϯ ϚϧνϥΠϯ   ʲLFZWBMVFʳ LFZWBMVF ࢖༻ՄೳͳWBMVF TUSJOH OVNCFS CPPMFBOɺMJTUɺNBQ  ʲจࣈྻิؒʳ \WBSGPP^ͷΑ͏ʹ\^ͰғΜͰ࢖༻͢Δɻ ʲจࣈྻิؒͷ৚݅෼ذʳ \WB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