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

Terraform Platform in Quipper

Shunsuke Suzuki
September 30, 2021

Terraform Platform in Quipper

Shunsuke Suzuki

September 30, 2021
Tweet

More Decks by Shunsuke Suzuki

Other Decks in Programming

Transcript

  1. 4IVOTVLF4V[VLJ
    5FSSBGPSN1MBUGPSNJO2VJQQFS

    View full-size slide

  2. 4FMGJOUSPEVDUJPO
    w 4IVOTVLF4V[VLJ (JU)VCTV[VLJTIVOTVLF

    w 2VJQQFS43&

    View full-size slide

  3. 43&UFBN.JTTJPO
    *NQSPWF%FWFMPQFS&YQFSJFODFPG5FSSBGPSN1MBUGPSN
    &ODPVSBHF*B$XJUI5FSSBGPSN

    "HFOEB

    View full-size slide

  4. 43&UFBN.JTTJPO
    *NQSPWF%FWFMPQFS&YQFSJFODFPG5FSSBGPSN1MBUGPSN
    &ODPVSBHF*B$XJUI5FSSBGPSN

    "HFOEB

    View full-size slide

  5. 2VJQQFST43&UFBN
    w NFNCFST
    w .BJOUBJOUIFQMBUGPSNBDSPTTQSPEVDUT

    View full-size slide

  6. 43&UFBNT.JTTJPO
    $SFBUFBQMBUGPSNBOEDVMUVSFUIBUBMMPXTTFMGDPOUBJOFEUFBNTUP
    DPOUJOVFUPEFMJWFSQSPEVDUTRVJDLMZBOETBGFMZ

    View full-size slide

  7. 5FSSBGPSN1MBUGPSN
    w 'PSUIFNJTTJPO *B$BOE$*$%BSFSFRVJSFE
    w %FWFMPQFSTIBWFUIFPXOFSTIJQPGUIFJSQSPEVDUTJOGSBTUSVDUVSF
    w %FWFMPQFSTDBOEFWFMPQUIFJSQSPEVDUTJOGSBTUSVDUVSFCZUIFNTFMWFT
    RVJDLMZBOETBGFMZ

    View full-size slide

  8. 43&UFBN.JTTJPO
    *NQSPWF%FWFMPQFS&YQFSJFODF
    &ODPVSBHF*B$XJUI5FSSBGPSN

    "HFOEB

    View full-size slide

  9. *NQSPWF%FWFMPQFS&YQFSJFODF
    .POPSFQP
    %ZOBNJDQJQFMJOF
    4QMJU5FSSBGPSN4UBUFT
    "QQMZTBGFMZXJUIQMBO
    fi
    MF
    UGDNUNBLFTQMBOFBTZUPVOEFSTUBOE
    "VUP$PEF'JYJO$*
    UGNJHSBUFJO$*
    $POUJOVPVTVQEBUFCZ3FOPWBUF

    View full-size slide

  10. *NQSPWF%FWFMPQFS&YQFSJFODF
    .POPSFQP
    %ZOBNJDQJQFMJOF
    4QMJU5FSSBGPSN4UBUFT
    "QQMZTBGFMZXJUIQMBO
    fi
    MF
    UGDNUNBLFTQMBOFBTZUPVOEFSTUBOE
    "VUP$PEF'JYJO$*
    UGNJHSBUFJO$*
    $POUJOVPVTVQEBUFCZ3FOPWBUF

    View full-size slide

  11. .POPSFQP
    &WFSZ5FSSBGPSNDPEFJTNBOBHFEJOPOFSFQPTJUPSZ

    RVJQQQFSTBQVSJUFSSBGPSN
    RVJQQFSRVJQQFSUFSSBGPSN
    RVJQQFSEFBENBOTTOJUDI
    RVJQQFSQJOHEPN
    RVJQQFSTMP
    RVJQQFSUFSSBGPSN
    .FSHFJOUP.POPSFQP

    View full-size slide

  12. 8IZ.POPSFQP
    w $PNNPOJ[F$*$%QJQFMJOFBOEEPDVNFOU FUD
    w 3FEVDFUIFNBJOUFOBODFDPTU
    w *NQSPWFUIFRVBMJUZ
    w $POTJTUFOU%FWFMPQFS&YQFSJFODF
    w 4VQQPSUBEEJUJPOBMQSPWJEFSTFBTJMZ

    View full-size slide

  13. *NQSPWF%FWFMPQFS&YQFSJFODF
    .POPSFQP
    %ZOBNJDQJQFMJOF
    4QMJU5FSSBGPSN4UBUFT
    "QQMZTBGFMZXJUIQMBO
    fi
    MF
    UGDNUNBLFTQMBOFBTZUPVOEFSTUBOE
    "VUP$PEF'JYJO$*
    UGNJHSBUFJO$*
    $POUJOVPVTVQEBUFCZ3FOPWBUF

    View full-size slide

  14. %ZOBNJDQJQFMJOFGPS.POPSFQP
    w %ZOBNJDQJQFMJOFJTSFRVJSFEUPSVO$*$%PGPOMZDIBOHFETUBUFTJO13
    w 8FIBWFJNQMFNFOUFEEZOBNJDQJQFMJOFXJUI"84$PEF#VJME

    View full-size slide

  15. %ZOBNJDQJQFMJOFCZ#BUDI#VJME

    (JU)VC #VJME
    8FCIPPL
    (FOFSBUFCVJMETQFD
    #BUDI#VJME
    4UBSU#VJME#BUDI"1*

    View full-size slide

  16. *NQSPWF%FWFMPQFS&YQFSJFODF
    .POPSFQP
    %ZOBNJDQJQFMJOF
    4QMJU5FSSBGPSN4UBUFT
    "QQMZTBGFMZXJUIQMBO
    fi
    MF
    UGDNUNBLFTQMBOFBTZUPVOEFSTUBOE
    "VUP$PEF'JYJO$*
    UGNJHSBUFJO$*
    $POUJOVPVTVQEBUFCZ3FOPWBUF

    View full-size slide

  17. 4QMJU5FSSBGPSN4UBUFT
    1SPCMFN
    w 5IFPXOFSPGDPEFJTBNCJHVPVT
    4PMVUJPO
    w #ZTQMJUTUBUFQFSQSPEVDU JUNBLFTUIFPXOFSTIJQDMFBS

    View full-size slide

  18. 5IFOVNCFSPG4UBUFT
    "CPVUPWFS JOZFBST

    w 5IFQJQFMJOFJTHFOFSBUFEEZOBNJDBMMZ TPXFEPOUIBWFUPNBJOUBJO
    IVHF$*$%DPO
    fi
    HVSBUJPO
    w &WFOJGTUBUFTBSFJODSFBTJOH $*$%JTSVOBHBJOTUPOMZDIBOHFE
    TUBUFT

    View full-size slide

  19. *NQSPWF%FWFMPQFS&YQFSJFODF
    .POPSFQP
    %ZOBNJDQJQFMJOF
    4QMJU5FSSBGPSN4UBUFT
    "QQMZTBGFMZXJUIQMBO
    fi
    MF
    UGDNUNBLFTQMBOFBTZUPVOEFSTUBOE
    "VUP$PEF'JYJO$*
    UGNJHSBUFJO$*
    $POUJOVPVTVQEBUFCZ3FOPWBUF

    View full-size slide

  20. "QQMZTBGFMZXJUIQMBOGJMF
    (JU)VC'MPX3VOQMBOBU13 UIFOSVOBQQMZCZNFSHJOH13

    w .PUJWBUJPO
    w "QQMZUIFFYBDUMZTBNFSFTVMUBT13TQMBO
    w )PX
    w 6QMPBEQMBO
    fi
    MFTBU4
    w "QQMZXJUIQMBO
    fi
    MFTEPXOMPBEFEGSPN4

    View full-size slide

  21. 3FUSZ$*XIFOTUBUFTBSFVQEBUFE

    w 8IFOTUBUFTBSFVQEBUFE QMBO
    fi
    MFTNVTUCFSFDSFBUFE
    w 3FUSZ$*XJUI"84$PEF#VJME"1*BGUFSBQQMZJOH

    View full-size slide


  22. /PUJGZUPSFUSZ$*

    View full-size slide


  23. /PUJGZUPSFUSZ$*
    1MBOJTSFSVO

    View full-size slide

  24. *NQSPWF%FWFMPQFS&YQFSJFODF
    .POPSFQP
    %ZOBNJDQJQFMJOF
    4QMJU5FSSBGPSN4UBUFT
    "QQMZTBGFMZXJUIQMBO
    fi
    MF
    UGDNUNBLFTQMBOFBTZUPVOEFSTUBOE
    "VUP$PEF'JYJO$*
    UGNJHSBUFJO$*
    $POUJOVPVTVQEBUFCZ3FOPWBUF

    View full-size slide

  25. 8IBUTUGDNU
    w 'PSLPGNFSDBSJUGOPUJGZ
    w /PUJGZUIFSFTVMUPGQMBOBOEBQQMZBTQVMMSFRVFTUDPNNFOUT
    w 8FDBOLOPXUIFSFTVMUJOUIFQVMMSFRVFTUQBHF
    w 8FEPOUIBWFUPDIFDL$*EFUBJMQBHFT

    View full-size slide


  26. %FMFUJPO8BSOJOH
    -JTUPGVQEBUFESFTPVSDFBEESFTTFT
    4FUDPMPSFEMBCFM

    View full-size slide

  27. &YDMVEFSFGSFTIJOHTUBUFT'SPNQMBOPVUQVU

    "4*4
    3FGSFTIJOHTUBUF
    50#&

    View full-size slide

  28. 4FQBSBUFPVUTJEFDIBOHF

    View full-size slide

  29. UGDNU5FSSBGPSN8BSOJOHT

    View full-size slide

  30. )JEFTUBMFDPNNFOUTBVUPNBUJDBMMZ

    View full-size slide

  31. )JEFTUBMFDPNNFOUTBVUPNBUJDBMMZ

    )JEFTUBMFDPNNFOUTBVUPNBUJDBMMZ
    MBUFTUDPNNFOU

    View full-size slide

  32. *NQSPWF%FWFMPQFS&YQFSJFODF
    .POPSFQP
    %ZOBNJDQJQFMJOF
    4QMJU5FSSBGPSN4UBUFT
    "QQMZTBGFMZXJUIQMBO
    fi
    MF
    UGDNUNBLFTQMBOFBTZUPVOEFSTUBOE
    "VUP$PEF'JYJO$*
    UGNJHSBUFJO$*
    $POUJOVPVTVQEBUFCZ3FOPWBUF

    View full-size slide

  33. 1SPCMFNTPMWFECZBVUPDPEFGJY
    w 8FTPNFUJNFTGPSHFUUPDPNNJUBMPDL
    fi
    MF
    w 8IFOUFSSBGPSNJOJUJTSVOBUMPDBMIPTU BMPDL
    fi
    MFJTDIBOHFE
    VOFYQFDUFEMZ
    w 5PUSFBUBMPDL
    fi
    MF UIFLOPXMFEHFBCPVUMPDL
    fi
    MFJTSFRVJSFE
    w 8FTPNFUJNFTGPSHFUUPGPSNBUDPEF

    View full-size slide

  34. )PXUPTPMWFCZBVUPDPEFGJY
    w $SFBUFBOEVQEBUFMPDL
    fi
    MFJO$*BVUPNBUJDBMMZ
    w 'PSNBUDPEFJO$*BVUPNBUJDBMMZ
    w 'JYJTDPNNJUUFEBOEQVTIFEUPUIFQVMMSFRVFTUJO$*

    View full-size slide

  35. )PXUPTPMWFCZBVUPDPEFGJY
    w $SFBUFBOEVQEBUFMPDL
    fi
    MFJO$*BVUPNBUJDBMMZ
    w 'PSNBUDPEFJO$*BVUPNBUJDBMMZ
    w 'JYJTDPNNJUUFEBOEQVTIFEUPUIFQVMMSFRVFTUJO$*

    "VUPNBUJPOBMMPXTEFWFMPQFSTUPVTF5FSSBGPSNFBTJMZ

    View full-size slide

  36. *NQSPWF%FWFMPQFS&YQFSJFODF
    .POPSFQP
    %ZOBNJDQJQFMJOF
    4QMJU5FSSBGPSN4UBUFT
    "QQMZTBGFMZXJUIQMBO
    fi
    MF
    UGDNUNBLFTQMBOFBTZUPVOEFSTUBOE
    "VUP$PEF'JYJO$*
    UGNJHSBUFJO$*
    $POUJOVPVTVQEBUFCZ3FOPWBUF

    View full-size slide

  37. UGNJHSBUFJO$*
    w 4UBUFNJHSBUJPOBT$PEF
    w .BOVBMNJHSBUJPOMJLFUFSSBGPSNJNQPSUCFDPNFTVOOFDFTTBSZ
    w 8FDBOSFWJFXUIFNJHSBUJPOBOEUSBDLIJTUPSJFT
    w 1FSNJTTJPOUPXSJUFTUBUFCFDPNFTVOOFDFTTBSZ
    w 0UIFSQVMMSFRVFTUTBSFOUCMPDLFECZUIFTUBUFNJHSBUJPO
    w .JHSBUJPOBDSPTTTUBUFTJTTVQQPSUFE

    View full-size slide

  38. )PXUPVTFUGNJHSBUFJO$*
    w UGNJHSBUFIDMBOENJHSBUJPO
    fi
    MFTBSFNBOBHFEJOFBDIXPSLJOHEJSFDUPSZ
    w 4QFDJGZNJHSBUFETUBUFTXJUI1VMM3FRVFTUMBCFMT
    w NJHSBUFGPPQSPEVDUJPO

    View full-size slide

  39. *NQSPWF%FWFMPQFS&YQFSJFODF
    .POPSFQP
    %ZOBNJDQJQFMJOF
    4QMJU5FSSBGPSN4UBUFT
    "QQMZTBGFMZXJUIQMBO
    fi
    MF
    UGDNUNBLFTQMBOFBTZUPVOEFSTUBOE
    "VUP$PEF'JYJO$*
    UGNJHSBUFJO$*
    $POUJOVPVTVQEBUFCZ3FOPWBUF

    View full-size slide

  40. $POUJOVPVTVQEBUFCZ3FOPWBUF
    w 5FSSBGPSN 5FSSBGPSN1SPWJEFST
    w U
    fl
    JOU UGTFD UGDNU DPOGUFTU PQB FUD
    w &OBCMFBVUPNFSHFCZEFGBVMU

    View full-size slide

  41. 6QEBUFTBGFMZ

    w 13JTNFSHFEPOMZXIFOQMBOJT/P$IBOHF
    w *UQSFWFOUTVOFYQFDUFEDIBOHFT

    View full-size slide

  42. 43&UFBN.JTTJPO
    *NQSPWF%FWFMPQFS&YQFSJFODFPG5FSSBGPSN1MBUGPSN
    &ODPVSBHF*B$XJUI5FSSBGPSN

    "HFOEB

    View full-size slide

  43. .BOBHFOFX4BB4XJUI5FSSBGPSN
    w "84
    w %FBENBOTTOJUDI

    w "84
    w %FBENBOTTOJUDI
    w 1JOHEPN
    w %BUBEPH
    w ($1
    w .POHP%#"UMBT
    "4*4 50#&
    /FX
    ZFBST

    View full-size slide

  44. w.BOBHF($1XJUI5FSSBGPSN
    w3FQMBDFPUIFS*B$UPPMTUP5FSSBGPSN

    View full-size slide

  45. w.BOBHF($1XJUI5FSSBGPSN
    w3FQMBDFPUIFS*B$UPPMTUP5FSSBGPSN

    View full-size slide

  46. .BOBHFNFOUPG($1
    #BDLHSPVOE
    w ($1JTOUNBOBHFECZ*B$
    w .BJOMZXFVTF"84 TPUIFQSJPSJUZPG($1XBTMPX
    w 3FDFOUMZ TPNFQSPEVDUUFBNTTUBSUFEVTJOH($1

    View full-size slide

  47. .BOBHFNFOUPG($1
    #BDLHSPVOE
    w ($1JTOUNBOBHFECZ*B$
    w .BJOMZXFVTF"84 TPUIFQSJPSJUZPG($1XBTMPX
    w 3FDFOUMZ TPNFQSPEVDUUFBNTTUBSUFEVTJOH($1

    8FTUBSUFENBOBHJOH($1XJUI5FSSBGPSN

    View full-size slide

  48. .BOBHF($1XJUI5FSSBGPSN
    w ($1$SFEFOUJBMTBSFSFRVJSFE
    w .BOBHFNFOUPG4FSWJDF"DDPVOULFZTJTSJTLZ

    View full-size slide

  49. (PPHMF$MPVE#VJME
    w 4FSWJDF"DDPVOULFZJTOUOFFEFE
    w *UJTEJ
    ffi
    DVMUUPEPUIFTBNFUIJOHXJUI"84$PEF#VJME
    w 8FXBOUUPSFVTFFYJTUJOH$*$%QJQFMJOF

    View full-size slide

  50. ($18PSLMPBE*EFOUJUZ'FEFSBUJPO
    w "DDFTT($1XJUI"84*".3PMF
    w ($14FSWJDF"DDPVOULFZJTOUOFFEFE
    w 3FVTFFYJTUJOH$*$%QJQFMJOFT

    View full-size slide

  51. *EFOUJUZ'FEFSBUJPOPO$PEF#VJME
    w 5IFSFJTBOP
    ffi
    DJBMEPDVNFOUBCPVU"84($1*EFOUJUZ'FEFSBUJPO
    w #VUJUEPFTOUXPSLXFMMGPS"84$PEF#VJME
    w 'PS"84$PEF#VJME XFIBEUP
    w 'JYUIFDSFEFOUJBMDPO
    fi
    HVSBUJPO
    fi
    MF
    w (FOFSBUFUFNQPSBM"DDFTT,FZBOETFUUIFNBTFOWJSPONFOU
    WBSJBCMFTJO$*

    View full-size slide

  52. 'JYUIFDSFEFOUJBMDPOGJHVSBUJPOGJMF

    View full-size slide

  53. 'JYUIFDSFEFOUJBMDPOGJHVSBUJPOGJMF

    View full-size slide

  54. (FOFSBUFUFNQPSBM"DDFTT,FZ

    View full-size slide

  55. w.BOBHF($1XJUI5FSSBGPSN
    w3FQMBDFPUIFS*B$UPPMTUP5FSSBGPSN

    View full-size slide

  56. 3FQMBDFPUIFSUPPMTUP5FSSBGPSN
    w DPEFOJ[FUPPMTNJBN DPEFOJ[FUPPMTSPBEXPSLFS5FSSBGPSN
    w .JHSBUJPOUPPMT5FSSBGPSNFS UGNJHSBUPS

    View full-size slide

  57. *NQPSUXJUI5FSSBGPSNFS

    View full-size slide

  58. *NQPSUXJUI5FSSBGPSNFS
    w 3FTPVSDFBEESFTTJTEJ
    ffi
    DVMUUPVOEFSTUBOE
    w 4UBUFJTOUTQMJU

    %J
    ffi
    DVMUUPVOEFSTUBOE

    View full-size slide

  59. 3FOBNFBOETQMJUXJUIUGNJHSBUPS

    UGFSGPP%QSPEVDUJPO
    UGFSCBS%QSPEVDUJPO
    GPP@QSPEVDUJPO
    GPPQSPEVDUJPO
    CBS@QSPEVDUJPO
    CBSQSPEVDUJPO

    View full-size slide

  60. $PODMVTJPO
    w *IBWFJOUSPEVDFE5FSSBGPSN1MBUGPSNJO2VJQQFS
    w 43&UFBNNJTTJPO
    w $SFBUFBQMBUGPSNBOEDVMUVSFUIBUBMMPXTTFMGDPOUBJOFEUFBNTUP
    DPOUJOVFUPEFMJWFSQSPEVDUTRVJDLMZBOETBGFMZ
    w 8FIBWFJNQSPWFE%FWFMPQFS&YQFSJFODFPG1MBUGPSNDPOUJOVPVTMZ

    View full-size slide

  61. 3FGFSFODF
    w 5FSSBGPSNͷ$*ʹUGNJHSBUFΛಋೖͨ͠࿩
    w "84*".ͷ؅ཧΛNJBN͔Β5FSSBGPSNʹҠߦͨ͠࿩
    w "84($1ͷ*%࿈ܞΛ࢖͍ɺ"84$PEF#VJMEͰ5FSSBGPSNΛ࢖ͬͯ($1Λ؅ཧ
    w 5FSSBGPSNϦϙδτϦΛϚʔδͯ͠$*$%Λվળͨ͠࿩
    w Ҏ্ͷ5FSSBGPSN؀ڥΛ͍͍ײ͡ʹWʹVQHSBEFͨ͠ํ๏
    w 1VMM3FRVFTUͷUFSSBGPSNQMBOͷ࣮ߦ݁ՌΛ4ʹอଘͯ҆͠શʹBQQMZ
    w 5FSSBGPSNͷ$*$%Λ$PEF#VJMEʹҠߦͨ͠࿩
    w 2VJQQFSʹ͓͚Δ5FSSBGPSNͷӡ༻

    View full-size slide