{"id":1145,"date":"2021-02-02T23:51:39","date_gmt":"2021-02-02T14:51:39","guid":{"rendered":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/?p=1145"},"modified":"2021-02-02T23:51:39","modified_gmt":"2021-02-02T14:51:39","slug":"terraform-study-document","status":"publish","type":"post","link":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/blog\/2021\/02\/02\/terraform-study-document\/","title":{"rendered":"Terraform\u306e\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u3092\u5b66\u3076\u306e\u306b\u5f79\u7acb\u3063\u305f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u307e\u3068\u3081"},"content":{"rendered":"
\u571f\u5c45\u3067\u3059\u3002<\/p>\n
\u6700\u8fd1\u306fTerraform\u3092\u7528\u3044\u3066AWS\u57fa\u76e4\u3092\u69cb\u7bc9\u3059\u308b\u6a5f\u4f1a\u306b\u591a\u304f\u6075\u307e\u308c\u3066\u304a\u308a\u3001\u5b66\u7fd2\u3059\u308b\u904e\u7a0b\u3067\u53c2\u8003\u306b\u306a\u3063\u305f\u60c5\u5831\u3092\u3054\u7d39\u4ecb\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n
\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306f\u3084\u3063\u3071\u308a\u5049\u5927\u3067\u3059\u3002\u7279\u306bTerraform\u306f\u3088\u304f\u66f8\u304d\u8fbc\u307e\u308c\u3066\u3044\u308b\u3068\u601d\u3044\u307e\u3057\u305f\u3002Resource\u306e\u4f5c\u6210\u306b\u5fc5\u8981\u306a\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u521d\u3081\u3001\u8a73\u7d30\u306b\u8aac\u660e\u3057\u3066\u304f\u308c\u3066\u3044\u307e\u3059\u3002\u53e4\u3044Resource\u3084\u66f8\u304d\u65b9\u306b\u3064\u3044\u3066\u3082\u3001\u3088\u308a\u65b0\u3057\u3044\u3082\u306e\u3078\u306e\u6ce8\u8a18\u3084\u53c2\u7167\u304c\u4e01\u5be7\u306b\u66f8\u304b\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n
\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a><\/p>\n AWS Provider \u306e\u6700\u65b0\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a><\/p>\n terraform-best-practices.com<\/a> terraform-aws-modules(VPC\u306emodule)<\/a> terraform-aws-atlantis<\/a> Terraform\u8077\u4eba\u518d\u5165\u95802020<\/a> Terraform\u8077\u4eba\u5165\u9580: \u65e5\u3005\u306e\u904b\u7528\u3067\u5b66\u3093\u3060\u77e5\u898b\u3092\u6de1\u3005\u3068\u307e\u3068\u3081\u308b<\/a> IaC(Infrastructure as Code)\u306e\u30c4\u30fc\u30eb\u306e\u6d3b\u7528\u306b\u306f\u30a4\u30f3\u30d5\u30e9\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\u3001\u518d\u5229\u7528\u3001\u5b9f\u969b\u306e\u69cb\u7bc9\u524d\u306e\u691c\u8a3c\u3068\u3044\u3063\u305f\u958b\u767a\u9762\u30fb\u904b\u7528\u9762\u306e\u30e1\u30ea\u30c3\u30c8\u306f\u3082\u3061\u308d\u3093\u306e\u3053\u3068\u3001\u305d\u308c\u305e\u308c\u306e\u8a2d\u5b9a\u3092\u8a18\u8ff0\u3059\u308b\u3053\u3068\u3067\u30b3\u30f3\u30bd\u30fc\u30eb\u304b\u3089\u4f5c\u6210\u3059\u308b\u5834\u5408\u4ee5\u4e0a\u306b\u610f\u5473\u3092\u3088\u304f\u7406\u89e3\u3067\u304d\u308b\u306e\u304c\u826f\u3044\u3068\u611f\u3058\u307e\u3057\u305f\u3002<\/p>\n MMM\u3067\u306fIaC\u7b49\u30c4\u30fc\u30eb\u306e\u6d3b\u7528\u306e\u307f\u306b\u983c\u3089\u306a\u3044\u3001\u571f\u53f0\u3068\u306a\u308bDevOps\u30ab\u30eb\u30c1\u30e3\u30fc\u306e\u91b8\u6210\u3082\u610f\u8b58\u3057\u305f\u652f\u63f4\u3092\u5fc3\u304c\u3051\u3066\u304a\u308a\u307e\u3059\u306e\u3067\u3001\u3088\u308d\u3057\u304f\u304a\u9858\u3044\u3044\u305f\u3057\u307e\u3059\u3002<\/p>\n DevOps\u652f\u63f4 \u30b5\u30fc\u30d3\u30b9<\/a> Terraform\u306e\u5b66\u7fd2\u304c\u6357\u3063\u305f\u8cc7\u6599\u306e\u3054\u7d39\u4ecb \u571f\u5c45\u3067\u3059\u3002 \u6700\u8fd1\u306fTerraform\u3092\u7528\u3044\u3066AWS\u57fa\u76e4\u3092\u69cb\u7bc9\u3059\u308b\u6a5f\u4f1a\u306b\u591a\u304f\u6075\u307e\u308c\u3066\u304a\u308a\u3001\u5b66\u7fd2\u3059\u308b\u904e\u7a0b\u3067\u53c2\u8003\u306b\u306a\u3063\u305f\u60c5\u5831\u3092\u3054\u7d39\u4ecb\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002 \u57fa\u672c\u306f\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8 \u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306f\u3084\u3063\u3071\u308a\u5049\u5927\u3067\u3059\u3002\u7279\u306bTerraform\u306f\u3088\u304f\u66f8\u304d\u8fbc\u307e\u308c\u3066\u3044\u308b\u3068\u601d\u3044\u307e\u3057\u305f\u3002Resource\u306e\u4f5c\u6210\u306b\u5fc5\u8981\u306a\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u521d\u3081\u3001\u8a73\u7d30\u306b\u8aac\u660e\u3057\u3066\u304f\u308c\u3066\u3044\u307e\u3059\u3002\u53e4\u3044Resou […]<\/p>\n","protected":false},"author":11,"featured_media":1146,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[18],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/posts\/1145"}],"collection":[{"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/comments?post=1145"}],"version-history":[{"count":6,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/posts\/1145\/revisions"}],"predecessor-version":[{"id":1152,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/posts\/1145\/revisions\/1152"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/media\/1146"}],"wp:attachment":[{"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/media?parent=1145"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/categories?post=1145"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/tags?post=1145"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}\u30b3\u30fc\u30c9\u306e\u66f8\u304d\u65b9\u3092\u5b66\u3076<\/h2>\n
\n\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u30b9\u30bf\u30a4\u30eb\u3001\u547d\u540d\u306a\u3069\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u3092\u5b66\u3079\u307e\u3059\u3002<\/p>\n
\nRegistry\u3067\u3082\u3063\u3068\u3082\u5229\u7528\u3055\u308c\u3066\u3044\u308bmodules\u306e\u3046\u3061\u306e\u4e00\u3064\u3067\u3042\u308b terraform-aws-modules<\/code> \u30b7\u30ea\u30fc\u30ba\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3067\u3059\u3002\u8907\u6570\u306eResource\u3092\u307e\u3068\u307e\u308a\u3067\u7ba1\u7406\u3059\u308bmodules\u6a5f\u80fd\u3067\u3059\u304c\u3001\u3069\u306e\u3088\u3046\u306b\u307e\u3068\u3081\u308b\u3079\u304d\u304b\u3044\u307e\u3044\u3061\u308f\u304b\u3063\u3066\u3044\u306a\u304b\u3063\u305f\u306e\u3067\u53c2\u8003\u306b\u3057\u3066\u3044\u307e\u3059\u3002\u30ea\u30f3\u30af\u306fVPC\u306e\u3082\u306e\u3067\u3059\u304c\u3001\u69d8\u3005\u306a\u7528\u9014\u306emodules\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u4f5c\u6210\u3057\u305f\u3044\u3068\u8003\u3048\u3066\u3044\u308b\u307b\u3068\u3093\u3069\u306eResource\u306b\u3064\u3044\u3066\u4f55\u3089\u304b\u306e\u53c2\u8003\u60c5\u5831\u304c\u5f97\u3089\u308c\u308b\u3068\u601d\u3044\u307e\u3059\u3002\u4f8b\u3048\u3070RDS\u3084Fargate\u306a\u3069\u3001\u4e3b\u3068\u306a\u308bRes\u76ee\u7684\u306b\u95a2\u9023\u3057\u3066\u5fc5\u8981\u306b\u306a\u308bResource\u3092\u307e\u3068\u3081\u3066\u628a\u63e1\u3057\u305f\u3044\u5834\u5408\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002\u307e\u305f\u3001Resource\u306b\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u307b\u3068\u3093\u3069\u306e\u5f15\u6570\u3092\u6e21\u305b\u308b\u3088\u3046\u306b\u4f5c\u3089\u308c\u3066\u3044\u308b\u3053\u3068\u304c\u591a\u3044\u306e\u3067\u3001\u5f15\u6570\u306e\u4f7f\u3044\u65b9\u306e\u52c9\u5f37\u306b\u3082\u306a\u308a\u307e\u3059\u3002<\/p>\n
\nFargate\u4e0a\u3067\u52d5\u4f5c\u3057\u3066\u3044\u308bAtlantis\u3068\u3044\u3046\u30b5\u30fc\u30d3\u30b9\u306e\u69cb\u7bc9\u4f8b\u3002\u4e0a\u8a18\u306emodules\u3084resource\u3092\u5229\u7528\u3057\u3066\u3069\u306e\u3088\u3046\u306b\u5b9f\u88c5\u3059\u308b\u304b\u3001\u306e\u53c2\u8003\u306b\u306a\u308a\u307e\u3059\u3002Resource\u306e\u91cf\u304c\u975e\u5e38\u306b\u591a\u3044\u306e\u3067\u306a\u3051\u308c\u3070\u3001modules\u3092\u6d3b\u7528\u3057\u3064\u3064main.tf\u306b\u5217\u6319\u3059\u308b\u30b9\u30bf\u30a4\u30eb\u304c\u898b\u3084\u3059\u305d\u3046\u3067\u3059\u306d\u3002<\/p>\nQiita\u306e\u307e\u3068\u3081\u8a18\u4e8b\u3067\u5b9f\u8df5\u7684\u77e5\u898b\u3092\u5b66\u3076<\/h2>\n
\nHCL2\u3067\u5909\u5316\u3057\u305f\u66f8\u304d\u65b9\u3084\u3001\u65b0\u3057\u3044\u6a5f\u80fd\u3092\u8a73\u3057\u304f\u6559\u3048\u3066\u304f\u308c\u307e\u3059\u3002jsonencode\uff08\uff09\u3092\u7528\u3044\u3066JSON\u306b\u30b3\u30e1\u30f3\u30c8\u3092\u66f8\u304f\u65b9\u6cd5\u306e\u3068\u3053\u308d\u306f\u500b\u4eba\u7684\u306b\u7d39\u4ecb\u8a18\u4e8b\u3082\u542b\u3081\u3066\u9762\u767d\u304b\u3063\u305f\u3067\u3059\u3002<\/p>\n
\n\u4e0a\u8a18\u8a18\u4e8b\u306e\u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306a\u306e\u3067\u53e4\u3044\u8a18\u8ff0\u3082\u3042\u308a\u307e\u3059\u304c\u3001Terraform\u5168\u4f53\u306b\u3064\u3044\u3066\u3088\u308a\u5e83\u7bc4\u306b\u66f8\u304b\u308c\u3066\u304a\u308a\u8aad\u3093\u3067\u304a\u3044\u3066\u640d\u306f\u306a\u3044\u3068\u601d\u3044\u307e\u3057\u305f\u3002<\/p>\n\u307e\u3068\u3081<\/h2>\n
\nDevOps\u30ab\u30eb\u30c1\u30e3\u30fc\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\u52d5\u753b<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"