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

やはりタグ。タグは全てを解決する

Kengo Suzuki
November 04, 2021

 やはりタグ。タグは全てを解決する

Kengo Suzuki

November 04, 2021
Tweet

More Decks by Kengo Suzuki

Other Decks in Technology

Transcript

  1. ΍͸Γλάɹλά͸શͯΛղܾ͢Δ

    1
    BXTEFWEBZ

    View full-size slide

  2. ໊લླ໦ݚޗ !LFOTDBM

    ॴଐ
    -BZFS9גࣜձࣾ$50ࣨ
    ࡾҪ෺࢈σδλϧΞηοτɾϚωδϝϯτग़޲
    དྷྺ
    ূ݊޲͚.BOBHFE4FDVSJUZ4FSWJDFɺՈܭ฽ɾΫϥ΢υձܭɺূ݊ձࣾ
    ݸਓͷ׆ಈ
    ಉਓʮ4FDVSFཱྀஂʯʹͯ1PEDBTUʮ4FDVSF-JBJTPOʯ΍ಉਓࢽ࡞੒
    िץʮ๩͍͠ਓͷͨΊͷηΩϡϦςΟɾΠϯςϦδΣϯεʯൃߦ
    1PE$BTUʮ4FDVSF-JBJTPOʯΛʢ΄΅ʣ8FFLMZͰϦϦʔε
    ॻ੶
    0`3FJMMZʮ;FSP5SVTU/FUXPSLʯ؂༁
    ΠϯϓϨε3%ʮΞΠσϯςΟςΟ͸ͩΕͷ΋ͷʁ)ZQFSMFEHFS*OEZ"SJFTͰ࣮ݱ͢Δ෼ࢄΞΠσϯςΟςΟʯஶ࡞
    ॴଐઌ঺հࣗݾ঺հ
    2

    View full-size slide

  3. Ϧετ
    Ϧετ
    Ϧετ
    Ϧετͷڧௐจࣈ
    Ϧετ
    ݟग़͠
    3

    View full-size slide

  4. ϒϩοΫνΣʔϯͷձࣾ
    Ͱ͸ͳ͍Ͱ͢
    4
    IUUQTOPUFDPNGVLLZZOOGFECD

    View full-size slide

  5. ॴଐઌͦͷᶃ
    5

    View full-size slide

  6. Ϧετ
    Ϧετ
    Ϧετ
    Ϧετͷڧௐจࣈ
    Ϧετ
    ݟग़͠
    6

    View full-size slide

  7. Ϧετ
    Ϧετ
    Ϧετ
    Ϧετͷڧௐจࣈ
    Ϧετ
    ݟग़͠
    7

    View full-size slide

  8. ॴଐઌͦͷᶄ
    8

    View full-size slide

  9. ॴଐઌͦͷᶄ
    9

    View full-size slide

  10. ॴଐઌͦͷᶄ
    10

    View full-size slide

  11. ॴଐઌͦͷᶄ
    11

    View full-size slide

  12. ຊ೔ͷ͓࿩
    12
    $50ࣨ԰୆ࠎΤϯδχΞ

    View full-size slide

  13. ຊ೔ͷ͓࿩
    13
    $50ࣨ԰୆ࠎΤϯδχΞ
    ࢿ࢈؅ཧ

    View full-size slide

  14. ຊ೔ͷ͓࿩
    14
    $50ࣨ԰୆ࠎΤϯδχΞ
    ࢿ࢈؅ཧ
    "84

    View full-size slide

  15. ຊ೔ͷ͓࿩
    15
    $50ࣨ԰୆ࠎΤϯδχΞ
    ࢿ࢈؅ཧ
    "84
    λά

    View full-size slide

  16. ຊ೔ͷ͓࿩
    16
    $50ࣨ԰୆ࠎΤϯδχΞ
    ࢿ࢈؅ཧ
    "84
    λά

    View full-size slide

  17. ຊ೔ͷ͓࿩
    17
    $50ࣨ԰୆ࠎΤϯδχΞ
    ࢿ࢈؅ཧ
    "84
    λά

    View full-size slide

  18. ࿩͢͜ͱ
    ౰ࣾͷλά؅ཧͷมભ
    ࿩͞ͳ͍͜ͱ
    ౰ࣾͷλάΛ׆༻ͨ͠ӡ༻
    ࿩͞ͳ͍͜ͱ
    18

    View full-size slide

  19. 8IZλά؅ཧ
    ౰ࣾͷλά؅ཧ
    5BHWFS
    5BHWFS
    5BHWFS
    5BHWFS ະདྷͷ࿩ʣ
    ΞδΣϯμ
    19

    View full-size slide

  20. 8IZλά؅ཧ
    20

    View full-size slide

  21. ʢ͍͖ͳΓ୤ઢʣθϩτϥετ
    21

    View full-size slide

  22. ୈࡾͷࢦ਑͸ɺθϩτϥετͷ֓೦
    ͸ɺอޢର৅ͷγεςϜͱσʔλͷ૊
    ৫తՁ஋ʹ͋Θͤͯద༻͢Δඞཁ͕͋
    Δͱ͍͏͜ͱͰ͢
    22
    θϩτϥετΞʔΩςΫνϟ"84ͷࢹ఺

    View full-size slide

  23. ୈࡾͷࢦ਑͸ɺθϩτϥετͷ֓೦
    ͸ɺอޢର৅ͷγεςϜͱσʔλͷ૊
    ৫తՁ஋ʹ͋Θͤͯద༻͢Δඞཁ͕͋
    Δͱ͍͏͜ͱͰ͢
    23
    θϩτϥετΞʔΩςΫνϟ"84ͷࢹ఺
    อޢର৅ͷ
    γεςϜͱσʔλʹ͍ͭͯ
    Կ΋Θ͔ΒΜ৔߹͸ʁ

    View full-size slide

  24. ࢿ࢈؅ཧ
    ༧࣮؅ཧ
    ΞΫηε؅ཧ
    ʢฏ࣌ͷʣϦεΫ؅ཧ
    ΠϯγσϯτରԠ
    ࣗಈԽ
    ର৅͕ط஌Ͱͳ͍ͱͰ͖ͳ͍͜ͱ
    24

    View full-size slide

  25. UPNPWFUP;5" BOFOUFSQSJTFNVTUIBWFB
    TZTUFNUPEJTDPWFSBOESFDPSEQIZTJDBMBOE
    WJSUVBMBTTFUTUPDSFBUFBVTBCMFJOWFOUPSZ
    /*4541ʮθϩτϥετɾΞʔΩςΫνϟʯ
    25

    View full-size slide

  26. ֤Ϧιʔεʹ෇༩͞Εͨϝλσʔ
    λ
    ֤छӡ༻ʹ͓͚ΔඞཁෆՄܽͳࢀ
    রઌσʔλ
    ૊৫ಛ༗ͷϦιʔε*EFOUJUZΛߏ
    ங͢Δ$MBJN
    "84ͷλάͱ͸ʁ
    26
    ๻͸͜ͷ
    ؀ڥͰ࢖ΘΕ·͢
    ๻ͷ؅ཧऀ͸
    43&νʔϜͰ͢
    ܦӦ؅ཧ෦ͷ
    ͓ࡒ෍͔͍ͭ·͢
    ػີ৘ใ
    ͔͍͋ͭ·͢
    %9αʔϏεͰ
    ࢖ΘΕ·͢
    EFWEYFDͱਃ͠·͢

    View full-size slide

  27. ֤Ϧιʔεʹ෇༩͞Εͨϝλσʔ
    λ
    ֤छӡ༻ʹ͓͚ΔඞཁෆՄܽͳࢀ
    রઌσʔλ
    ૊৫ಛ༗ͷϦιʔε*EFOUJUZΛߏ
    ங͢Δ$MBJN
    "84ͷλάͱ͸ʁ
    27
    ๻͸͜ͷ
    ؀ڥͰ࢖ΘΕ·͢
    ๻ͷ؅ཧऀ͸
    43&νʔϜͰ͢
    ܦӦ؅ཧ෦ͷ
    ͓ࡒ෍͔͍ͭ·͢
    ػີ৘ใ
    ͔͍͋ͭ·͢
    %9αʔϏεͰ
    ࢖ΘΕ·͢
    EFWEYFDͱਃ͠·͢

    View full-size slide

  28. αʔόʔʹՍۭͷσʔλΛ෇༩Ͱ͖ΔΑ͏ʹͳͬͨ
    ʮໝ૝ͱ͍͏໊ͷ૝૾ྗ͕ϗϞɾαϐΤϯεΛਐԽͤͨ͞ʯ
    ͨ͘͞Μ͚ͭΒΕΔʢd

    Ωʔɾ஋ͷࣗ༝౓͕ߴ͍ʢʙ VOJDPEFจࣈɺDBTFTFOTJUJWF ه߸ར༻Խʣ
    ϫʔΫϩʔυͷಈ࡞ʹ௚઀తͳӨڹΛ༩͑Δ͜ͱͳ͘ӡ༻Ͱ͖Δ
    71$ͷ/BNFλάʜ ஌Γ·ͤΜͶʜ
    "1*؅ཧͰ͖Δ
    σʔλΛ࣮ࡍͷϦιʔεʹࣄલຒΊࠐΜ্ͩͰɺࢿ࢈؅ཧ%#΍ΤΫηϧΛิ׬Ͱ͖Δ
    ٯํ޲΋Մ
    ؅ཧऀʹΑΔ౷੍΋Ͱ͖Δ
    λά͸͍͢͝
    28

    View full-size slide

  29. λά͔͠উͨΜ
    29

    View full-size slide

  30. ౰ࣾͷ࿩
    30

    View full-size slide

  31. #$ίϯαϧࣄۀ͕ϝΠϯͩͬͨͨΊɺ۩ମతͳظؒݶఆతͳϫʔ
    Ϋϩʔυ͔͠ͳ͔ͬͨ
    1P$ϓϩδΣΫτʹ൐͏୹ظతͳ৘ใࢿ࢈͔͠ͳ͔ͬͨʢ"84্
    Ͱ͸ʣ
    Πϯϑϥత੔උΛ̎ਓͰ࣮ࢪ
    ΏΔʙ͘ᯂΑΓ࢝ΊΑ
    ʢӨڹ΋ͳ͍͠ʣΨϯΨϯ͍͜͏ͥ
    5BHWFS

    32

    View full-size slide

  32. ମ੍ ੲ

    33

    View full-size slide

  33. ϕεϓϥ
    $BTFTFOTJUJWF
    Ϧιʔε΁ͷΞΫηείϯτϩʔϧ
    λά؅ཧͷࣗಈԽ
    λά͸গͳ͍ΑΓɺଟ͍ํ͕ϕλʔ
    ओʹλάΧςΰϦΛࢀর
    "845BHHJOH4USBUFHJFT
    35
    IUUQTEBXTTUBUJDDPNBXTBOTXFST"84@5BHHJOH@4USBUFHJFTQEG

    View full-size slide

  34. 5BHHJOH#FTU1SBDUJDFT
    "845BHHJOH4USBUFHJFTΛΑ
    ΓৄࡉԽ
    IUUQTEPDTBXTBNB[PODPNXIJUFQBQFSTMBUFTUUBHHJOHCFTUQSBDUJDFTJOUSPEVDUJPOUBHHJOHVTFDBTFTIUNM

    View full-size slide

  35. Ϧετ
    Ϧετ
    Ϧετ
    Ϧετͷڧௐจࣈ
    Ϧετ
    37
    ͦΜͳʹλάͷ஋ʹͭΊ͜·ΜͰ΋Α͘ͳ͍ʜ

    View full-size slide

  36. ౰ࣾಠࣗΧελϚΠζᶃ
    38
    ݴͬͯΔ͜ͱ͕ҧ͏ͷͰɺ
    ʮେ͸খΛ݉ͶΔʯͱ͍͏͜ͱͰ
    ޙ͔Βม͑Δ͜ͱ্౳Ͱ͚ͭ·͘Δ͜ͱʹͨ͠ɻ
    λάมߋͰ͋Ε͹Өڹ͸ͳ͘ɼ
    ͔ͭɺݱࡏͷ༧࣮؅ཧͰ͸ͦ͜·ͰλάΛ׆༻ͯ͠ͳ͍ͨΊ

    View full-size slide

  37. 5BHHJOH#FTU1SBDUJDFT
    "845BHHJOH4USBUFHJFTΛΑ
    ΓৄࡉԽ
    IUUQTEPDTBXTBNB[PODPNXIJUFQBQFSTMBUFTUUBHHJOHCFTUQSBDUJDFTJOUSPEVDUJPOUBHHJOHVTFDBTFTIUNM
    ϏϛϣʔʹݴͬͯΔ͜ͱ͕ҧ͏ͷͰ
    5BHHJOH#FTU1SBDUJDFTͷߟ͑ํΛجʹɺ
    5BHHJOH4USBUFHJFTͷ࣮૷ํ๏ΛϝΠϯʹ࣮૷

    View full-size slide

  38. λά໋໊نଇέόϒέʔεεωʔΫέʔε
    ΠϯϕϯτϦͬͯ%#ͩ͠ɺ͡Ό͋εωʔΫέʔεͩΑͶ
    5FSSBGPSNͷϕεϓϥ΋Ξϯείͩ͠ɻ
    Ϧιʔε໊نଇ
    \FOWJSPONFOU^\TFSWJDF@JE^\Ϧιʔεಛ༗ͷ஋^
    4΍"-#ʹ͍ͭͯ͸OBNFλάͷΑ͏ͳޠ۟ؒΛ@ͳܗࣜͩ
    ͱͰ͖ͳ͍ͷͰɺͰͭͳ͛Δɻ
    ౰ࣾಠࣗΧελϚΠζᶄ
    40 IUUQTXXXUFSSBGPSNCFTUQSBDUJDFTDPNOBNJOH

    View full-size slide

  39. ౰ࣾಠࣗΧελϚΠζᶅ
    41
    λά؅ཧΛ
    ड͚࣋ͭ

    View full-size slide

  40. ౰ࣾಠࣗΧελϚΠζᶆ

    View full-size slide

  41. 43
    λά໊ ΧςΰϦ ඞਢ ྫ
    name Ϧιʔε໊ ○ ${service_id}.${environment}.${service_role}.$
    {name}
    service_id ΞϓϦɾαʔϏεID ○ dx
    service_role αʔϏε಺ͷ໾ׂ ○ web, db, log_storage
    cluster ecs Ϋϥελʔͱ͔
    environment ؀ڥ ○ dev, stg, prd
    version
    owner ੹೚ઌ ○
    cost_center ○ xxx, yyy, layerx (ސ٬໊)
    project ϓϩδΣΫτ໊ ○
    customer ಛఆͷ͓٬༷޲͚༻ Τϯϓϥϓϥϯʹ͸͓٬༷ઐ༻αʔόΛఏڙ
    ͠·͢...తͳͱ͖
    con
    fi
    dentiality ػີ౓߹͍ ○
    managed_by ͲͷIaC͔ ○ manual(σϑΥϧτ), terraform, cfn
    compliance ن੍ɾίϯϓϥ PII, [pii, iso27002]

    View full-size slide

  42. $PNNFSDJBMEBUBDMBTTJ
    fi
    DBUJPO
    4FOTJUJWF $PO
    fi
    EFOUJBM 1SJWBUF 1VCMJD
    IUUQTEPDTNJDSPTPGUDPNKBKQ
    TFDVSJUZVQEBUFT
    QMBOOJOHBOEJNQMFNFOUBUJPOHVJEF

    $PO
    fi
    EFOUJBMJUZʹؔ͢Δิ଍
    44

    View full-size slide

  43. ࣄۀ෦੍΁
    Ӭଓతͳ৘ใࢿ࢈͕ൃੜͨ͠
    Πϯϑϥత੔උΛ͢Δ̎ਓ͸ࣄۀ෦ʹ೿ݣ΁
    5BHWFS

    46

    View full-size slide

  44. ମ੍ /PX

    47

    View full-size slide

  45. DPTU@DFOUFSͷ஋ʹ֤ࣄۀ෦͕ೖΔΑ͏ʹ
    OBNFλάΛഇࢭ
    λά໊ MBZFSYλά໊
    ͷQSF
    fi
    YΛഇࢭ
    EJGGGSPNWFS
    49

    View full-size slide

  46. 5FSSBGPSNQSPWJEFSW
    $50ަ୅
    *4.4औಘ։࢝
    5BHW

    51

    View full-size slide

  47. ମ੍ /PX

    52

    View full-size slide

  48. 5FSSBGPSN"841SPWJEFSWͷϦϦʔε
    54
    provider "aws"
    {

    region = var.regio
    n

    default_tags { tags = var.default_tags
    }

    }

    resource "aws_kms_key" "cloudtrail"
    {

    description = "key to encrypt/decrypt cloudtrail
    "

    tags =
    {

    service_role = var.service_role.km
    s

    }

    }
    resource "aws_kms_key" "cloudtrail"
    {

    description = "key to encrypt/decrypt cloudtrail
    "

    tags =
    {

    environment = pr
    d

    service_role = var.service_role.km
    s

    project = guardrai
    l

    service_id = guardrai
    l

    cost_center = layer
    X

    Owner = sr
    e

    managed_by = terrafor
    m

    github_repository - guardrai
    l

    }

    }
    EFGBVMU@UBHT͍͜͞ʔ

    View full-size slide

  49. HJUIVC@SFQPTJUPSZ௥Ճ
    ৘ใ۠෼ͷݟ௚͠
    લTFOTJUJWF DPO
    fi
    EFOUJBM QSJWBUF QSPQSJFUBSZ QVCMJD
    ޙDPO
    fi
    EFOUJBM QSJWBUF QVCMJD
    TFSWJDF@SPMFΛ࣮ଶͰ͋ΔϦιʔεͷཻ౓ʹ͋ΘͤΔ
    ྫTFDSFUTNBOBHFSWBVMU
    EJGGGSPNWFS
    55

    View full-size slide

  50. λά౷੍
    λάFWFSZXIFSF
    λά؅ཧͷ؅ཧ
    λά΁ͷΞΫηε؅ཧΛ៛ີԽ
    λάΛ࢖ͬͨ"#"$ʁ
    ਖ਼௚͋·ΓϝϦοτΛײͯ͡ͳ͍ʜ
    5BHW GVUVSF

    57

    View full-size slide

  51. ࠾༻ͯ͠·͢
    ݸਓΧδϡΞϧ໘ஊ͔ΒͰ
    ΋0,
    58

    View full-size slide

  52. 59
    ࠾༻͸ͪ͜Β
    IUUQTIFSQDBSFFSTWMBZFSY
    ΧδϡΞϧ໘ஊ͸ͪ͜Β
    IUUQTNFFUZOFUBSUJDMFTUXXKK

    View full-size slide

  53. 60
    IUUQTNFFUZOFUNBUDIFTK"C
    ff
    [W-RK/B
    IUUQTIFSQDBSFFSTWMBZFSYZSR)(513Y

    View full-size slide