{"id":3201,"date":"2025-12-12T11:02:44","date_gmt":"2025-12-12T02:02:44","guid":{"rendered":"https:\/\/www.agile-software.site\/?p=3201"},"modified":"2025-12-12T11:02:46","modified_gmt":"2025-12-12T02:02:46","slug":"terraform","status":"publish","type":"post","link":"https:\/\/agile-software.net\/?p=3201","title":{"rendered":"Terraform"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">&#x1f4bb; \u30a4\u30f3\u30d5\u30e9\u7ba1\u7406\u306e\u9769\u547d\uff1aTerraform\uff08\u30c6\u30e9\u30d5\u30a9\u30fc\u30e0\uff09\u5165\u9580<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">&#x1f4a1; \u306f\u3058\u3081\u306b\uff1a\u30a4\u30f3\u30d5\u30e9\u3092\u300c\u30b3\u30fc\u30c9\u300d\u3067\u7ba1\u7406\u3059\u308b\u6642\u4ee3<\/h2>\n\n\n\n<p>\u30b5\u30fc\u30d0\u30fc\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306a\u3069\u306eIT\u30a4\u30f3\u30d5\u30e9\u30b9\u30c8\u30e9\u30af\u30c1\u30e3\u306e\u69cb\u7bc9\u30fb\u7ba1\u7406\u306f\u3001\u3053\u308c\u307e\u3067\u624b\u52d5\u3067\u884c\u308f\u308c\u308b\u3053\u3068\u304c\u4e00\u822c\u7684\u3067\u3057\u305f\u3002\u3057\u304b\u3057\u3001\u3053\u306e\u65b9\u6cd5\u3067\u306f\u4eba\u70ba\u7684\u306a\u30df\u30b9\u304c\u767a\u751f\u3057\u3084\u3059\u304f\u3001\u74b0\u5883\u306e\u518d\u73fe\u6027\u3084\u5909\u66f4\u5c65\u6b74\u306e\u8ffd\u8de1\u304c\u56f0\u96e3\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u8ab2\u984c\u3092\u89e3\u6c7a\u3059\u308b\u306e\u304c\u3001\u300c<strong>IaC (Infrastructure as Code) &#8211; \u30b3\u30fc\u30c9\u3068\u3057\u3066\u306e\u30a4\u30f3\u30d5\u30e9\u30b9\u30c8\u30e9\u30af\u30c1\u30e3<\/strong>\u300d\u3068\u3044\u3046\u6982\u5ff5\u3067\u3042\u308a\u3001\u305d\u306e\u4ee3\u8868\u7684\u306a\u30c4\u30fc\u30eb\u304c <strong>HashiCorp Terraform\uff08\u30c6\u30e9\u30d5\u30a9\u30fc\u30e0\uff09<\/strong> \u3067\u3059\u3002<\/p>\n\n\n\n<p>Terraform\u306f\u3001\u30af\u30e9\u30a6\u30c9\u3084\u30aa\u30f3\u30d7\u30ec\u30df\u30b9\u3092\u554f\u308f\u305a\u3001\u30a4\u30f3\u30d5\u30e9\u3092\u30b3\u30fc\u30c9\u3068\u3057\u3066\u5b9a\u7fa9\u3057\u3001\u305d\u306e\u69cb\u6210\u3092\u81ea\u52d5\u7684\u306b\u69cb\u7bc9\u30fb\u5909\u66f4\u30fb\u7ba1\u7406\u3059\u308b\u3053\u3068\u3092\u53ef\u80fd\u306b\u3059\u308b\u30c4\u30fc\u30eb\u3067\u3059\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">&#x1f680; Terraform\u3067\u3067\u304d\u308b\u3053\u3068\uff1a\u5ba3\u8a00\u7684\u306a\u30a4\u30f3\u30d5\u30e9\u7ba1\u7406<\/h2>\n\n\n\n<p>Terraform\u306e\u6838\u5fc3\u7684\u306a\u7279\u5fb4\u306f\u3001\u300c<strong>\u5ba3\u8a00\u7684\uff08Declarative\uff09<\/strong>\u300d\u3067\u3042\u308b\u70b9\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. \u5ba3\u8a00\u7684\u306a\u30a2\u30d7\u30ed\u30fc\u30c1<\/h3>\n\n\n\n<p>\u30e6\u30fc\u30b6\u30fc\u306f\u3001\u30a4\u30f3\u30d5\u30e9\u306e**\u6700\u7d42\u7684\u306a\u72b6\u614b\uff08\u3042\u308b\u3079\u304d\u59ff\uff09**\u3092\u30b3\u30fc\u30c9\uff08HCL\u8a00\u8a9e\uff09\u3067\u8a18\u8ff0\u3059\u308b\u3060\u3051\u3067\u6e08\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u300c\u3069\u306e\u3088\u3046\u306b\u69cb\u7bc9\u3059\u308b\u304b\u300d<\/strong> (\u624b\u9806) \u3067\u306f\u306a\u304f\u3001<\/li>\n\n\n\n<li><strong>\u300c\u4f55\u3092\u4f5c\u6210\u3057\u305f\u3044\u304b\u300d<\/strong> (\u72b6\u614b) \u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<p>Terraform\u306f\u3001\u73fe\u5728\u306e\u30a4\u30f3\u30d5\u30e9\u306e\u72b6\u614b\u3092\u628a\u63e1\u3057\u3001\u30b3\u30fc\u30c9\u3067\u5b9a\u7fa9\u3055\u308c\u305f\u76ee\u6a19\u306e\u72b6\u614b\u306b\u5230\u9054\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u624b\u9806\uff08\u4f5c\u6210\u3001\u5909\u66f4\u3001\u524a\u9664\uff09\u3092\u81ea\u52d5\u3067\u8a08\u7b97\u3057\u3001\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. \u30de\u30eb\u30c1\u30af\u30e9\u30a6\u30c9\/\u30de\u30eb\u30c1\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u5bfe\u5fdc<\/h3>\n\n\n\n<p>Terraform\u306f\u3001AWS\u3001Azure\u3001Google Cloud (GCP) \u3068\u3044\u3063\u305f\u4e3b\u8981\u306a\u30d1\u30d6\u30ea\u30c3\u30af\u30af\u30e9\u30a6\u30c9\u306b\u52a0\u3048\u3066\u3001Kubernetes\u3001VMware\u3001GitHub\u306a\u3069\u3001<strong>1,000\u3092\u8d85\u3048\u308b\u591a\u69d8\u306a\u30b5\u30fc\u30d3\u30b9<\/strong>\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u308c\u306f\u3001\u5404\u30b5\u30fc\u30d3\u30b9\u5411\u3051\u306e\u5c02\u7528\u306e\u300c<strong>\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\uff08Provider\uff09<\/strong>\u300d\u3092\u901a\u3058\u3066\u5b9f\u73fe\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u8907\u6570\u306e\u30af\u30e9\u30a6\u30c9\u74b0\u5883\u306b\u307e\u305f\u304c\u308b\u30a4\u30f3\u30d5\u30e9\uff08\u30de\u30eb\u30c1\u30af\u30e9\u30a6\u30c9\uff09\u3092\u4e00\u8cab\u3057\u305f\u65b9\u6cd5\u3067\u7ba1\u7406\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. \u30b9\u30c6\u30fc\u30c8\u7ba1\u7406<\/h3>\n\n\n\n<p>Terraform\u306f\u3001\u69cb\u7bc9\u3057\u305f\u30a4\u30f3\u30d5\u30e9\u306e\u60c5\u5831\u3092\u300c<strong>\u30b9\u30c6\u30fc\u30c8\u30d5\u30a1\u30a4\u30eb (State File)<\/strong>\u300d\u3068\u3057\u3066\u7ba1\u7406\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u73fe\u5728\u306e\u72b6\u614b\u306e\u8ffd\u8de1:<\/strong> \u30b9\u30c6\u30fc\u30c8\u30d5\u30a1\u30a4\u30eb\u306f\u3001Terraform\u304c\u7ba1\u7406\u3059\u308b\u3059\u3079\u3066\u306e\u30ea\u30bd\u30fc\u30b9\u306e\u6700\u65b0\u306e\u72b6\u614b\u3092\u8a18\u9332\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u5909\u66f4\u306e\u5dee\u5206\u8a08\u7b97:<\/strong> \u30e6\u30fc\u30b6\u30fc\u304c\u30b3\u30fc\u30c9\u3092\u5909\u66f4\u3057\u305f\u969b\u3001Terraform\u306f\u30b3\u30fc\u30c9\u3068\u30b9\u30c6\u30fc\u30c8\u30d5\u30a1\u30a4\u30eb\u306e\u5185\u5bb9\u3092\u6bd4\u8f03\u3057\u3001<strong>\u5909\u66f4\u304c\u5fc5\u8981\u306a\u5dee\u5206\u306e\u307f<\/strong>\u3092\u6b63\u78ba\u306b\u628a\u63e1\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u610f\u56f3\u3057\u306a\u3044\u30ea\u30bd\u30fc\u30b9\u306e\u524a\u9664\u3084\u5909\u66f4\u3092\u9632\u304e\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">&#x1f6e0;&#xfe0f; Terraform\u306e\u57fa\u672c\u7684\u306a\u30ef\u30fc\u30af\u30d5\u30ed\u30fc<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">&#x1f6e0;&#xfe0f; 1. <code>terraform fmt<\/code> (Formatting: \u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306e\u6574\u5f62)<\/h3>\n\n\n\n<p><code>terraform fmt<\/code> \u306f\u3001Terraform\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u6a19\u6e96\u7684\u306a\u5f62\u5f0f\u306b\u6574\u5f62\uff08\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\uff09\u3059\u308b\u305f\u3081\u306e\u30b3\u30de\u30f3\u30c9\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u7279\u5fb4\u3068\u6a5f\u80fd<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u76ee\u7684:<\/strong> \u3059\u3079\u3066\u306eHCL\uff08HashiCorp Configuration Language\uff09\u30d5\u30a1\u30a4\u30eb\uff08<code>.tf<\/code> \u62e1\u5f35\u5b50\u306e\u30d5\u30a1\u30a4\u30eb\uff09\u3092\u8aad\u307f\u53d6\u308a\u3001Terraform\u306e\u63a8\u5968\u3059\u308b\u6a19\u6e96\u7684\u306a\u30a4\u30f3\u30c7\u30f3\u30c8\u3001\u6539\u884c\u3001\u30b9\u30da\u30fc\u30b9\u306a\u3069\u306e\u30b9\u30bf\u30a4\u30eb\u306b\u81ea\u52d5\u3067\u4fee\u6b63\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u975e\u7834\u58ca\u7684:<\/strong> \u30b3\u30fc\u30c9\u306e<strong>\u610f\u5473\u3084\u5185\u5bb9<\/strong>\u3092\u5909\u3048\u308b\u3053\u3068\u306a\u304f\u3001\u898b\u305f\u76ee\u3060\u3051\u3092\u6574\u5f62\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u8907\u6570\u30d5\u30a1\u30a4\u30eb\u5bfe\u5fdc:<\/strong> \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u3067\u5b9f\u884c\u3059\u308b\u3068\u3001\u305d\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306e\u3059\u3079\u3066\u306e <code>.tf<\/code> \u30d5\u30a1\u30a4\u30eb\u306b\u9069\u7528\u3055\u308c\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u306a\u305c\u91cd\u8981\u304b\uff1f<\/h3>\n\n\n\n<p>\u30c1\u30fc\u30e0\u958b\u767a\u306b\u304a\u3044\u3066\u3001\u500b\u3005\u306e\u958b\u767a\u8005\u306e\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u30b9\u30bf\u30a4\u30eb\uff08\u30a4\u30f3\u30c7\u30f3\u30c8\u306e\u30b9\u30da\u30fc\u30b9\u6570\u306a\u3069\uff09\u306e\u9055\u3044\u3092\u5438\u53ce\u3057\u3001\u30b3\u30fc\u30c9\u30d9\u30fc\u30b9\u5168\u4f53\u306e<strong>\u4e00\u8cab\u6027\u3068\u53ef\u8aad\u6027<\/strong>\u3092\u7dad\u6301\u3059\u308b\u305f\u3081\u306b\u4e0d\u53ef\u6b20\u3067\u3059\u3002Git\u306a\u3069\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0\u3067\u5dee\u5206\u3092\u78ba\u8a8d\u3057\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">&#x1f6e0;&#xfe0f; 2. <code>terraform init<\/code> (Initialization: \u521d\u671f\u5316)<\/h3>\n\n\n\n<p><code>terraform init<\/code> \u306f\u3001Terraform\u3092\u5b9f\u884c\u3059\u308b<strong>\u4f5c\u696d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u521d\u671f\u5316<\/strong>\u3059\u308b\u305f\u3081\u306b\u3001\u5fc5\u305a\u6700\u521d\u306b\u5b9f\u884c\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u30b3\u30de\u30f3\u30c9\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u7279\u5fb4\u3068\u6a5f\u80fd<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9:<\/strong> \u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\uff08<code>.tf<\/code>\uff09\u3092\u8aad\u307f\u8fbc\u307f\u3001\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u3059\u3079\u3066\u306e<strong>\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc<\/strong>\uff08AWS\u3001Azure\u3001Snowflake\u306a\u3069\uff09\u306e\u30d0\u30a4\u30ca\u30ea\uff08\u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\uff09\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3001\u30ed\u30fc\u30ab\u30eb\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306e\u8a2d\u5b9a:<\/strong> <strong>\u30b9\u30c6\u30fc\u30c8\u30d5\u30a1\u30a4\u30eb<\/strong>\u3092\u3069\u3053\u306b\u4fdd\u5b58\u30fb\u7ba1\u7406\u3059\u308b\u304b\uff08\u30ed\u30fc\u30ab\u30eb\u30d5\u30a1\u30a4\u30eb\u3001S3\u3001Azure Blob Storage\u306a\u3069\uff09\u3068\u3044\u3046\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u8a2d\u5b9a\u3092\u8aad\u307f\u8fbc\u307f\u3001\u521d\u671f\u5316\u3057\u307e\u3059\u3002\u7279\u306b\u30ea\u30e2\u30fc\u30c8\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u3001\u3053\u306e\u30b9\u30c6\u30c3\u30d7\u3067\u63a5\u7d9a\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9:<\/strong> \u8a2d\u5b9a\u5185\u3067\u5916\u90e8\u304b\u3089\u53c2\u7167\u3057\u3066\u3044\u308b<strong>\u30e2\u30b8\u30e5\u30fc\u30eb<\/strong>\uff08\u518d\u5229\u7528\u53ef\u80fd\u306aTerraform\u30b3\u30fc\u30c9\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\uff09\u304c\u3042\u308c\u3070\u3001\u305d\u308c\u3089\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u306a\u305c\u91cd\u8981\u304b\uff1f<\/h3>\n\n\n\n<p>\u3053\u306e\u30b3\u30de\u30f3\u30c9\u304c\u6210\u529f\u3059\u308b\u3053\u3068\u3067\u3001\u305d\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304cTerraform\u306e\u30ef\u30fc\u30af\u30b9\u30da\u30fc\u30b9\u3068\u3057\u3066\u6a5f\u80fd\u3059\u308b\u305f\u3081\u306e<strong>\u3059\u3079\u3066\u306e\u4f9d\u5b58\u95a2\u4fc2\u3068\u8a2d\u5b9a<\/strong>\u304c\u6574\u3044\u3001\u6b21\u306e <code>plan<\/code> \u3084 <code>apply<\/code> \u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">&#x1f6e0;&#xfe0f; 3. <code>terraform validate<\/code> (Validation: \u691c\u8a3c)<\/h3>\n\n\n\n<p><code>terraform validate<\/code> \u306f\u3001\u8a2d\u5b9a\u30b3\u30fc\u30c9\u306e<strong>\u69cb\u6587\u3068\u6574\u5408\u6027<\/strong>\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u305f\u3081\u306e\u30b3\u30de\u30f3\u30c9\u3067\u3059\u3002\u30c7\u30d7\u30ed\u30a4\u306e\u5b9f\u884c\uff08<code>apply<\/code>\uff09\u524d\u306b\u5fc5\u305a\u884c\u3046\u3079\u304d\u30c1\u30a7\u30c3\u30af\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u7279\u5fb4\u3068\u6a5f\u80fd<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u69cb\u6587\u30c1\u30a7\u30c3\u30af:<\/strong> HCL\uff08HashiCorp Configuration Language\uff09\u306e\u69cb\u6587\u304c\u6b63\u3057\u3044\u304b\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u6574\u5408\u6027\u30c1\u30a7\u30c3\u30af:<\/strong> \u4f9d\u5b58\u95a2\u4fc2\u3001\u5909\u6570\u306e\u578b\u3001\u30ea\u30bd\u30fc\u30b9\u306e\u5f15\u6570\u304c\u6b63\u3057\u3044\u304b\u306a\u3069\u3001<strong>\u8a2d\u5b9a\u306e\u5185\u90e8\u7684\u306a\u8ad6\u7406\u6574\u5408\u6027<\/strong>\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u975e\u4f9d\u5b58:<\/strong> \u30af\u30e9\u30a6\u30c9\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\uff08AWS\u306a\u3069\uff09\u306e<strong>API\u306b\u63a5\u7d9a\u3059\u308b\u5fc5\u8981\u304c\u306a\u3044<\/strong>\u305f\u3081\u3001\u975e\u5e38\u306b\u9ad8\u901f\u306b\u5b9f\u884c\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u306a\u305c\u91cd\u8981\u304b\uff1f<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u8fc5\u901f\u306a\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af:<\/strong> <code>init<\/code> \u3067\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3055\u3048\u3059\u308c\u3070\u3001\u30af\u30e9\u30a6\u30c9\u3078\u306e\u63a5\u7d9a\u306a\u3057\u306b\u30b3\u30fc\u30c9\u306e\u57fa\u672c\u7684\u306a\u30a8\u30e9\u30fc\u3092\u767a\u898b\u3067\u304d\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>CI\/CD\u3078\u306e\u7d44\u307f\u8fbc\u307f:<\/strong> Git\u9023\u643a\u3084CI\/CD\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\uff08GitHub Actions, Jenkins\u306a\u3069\uff09\u306e\u6700\u521d\u306e\u30b9\u30c6\u30c3\u30d7\u3068\u3057\u3066\u7d44\u307f\u8fbc\u3080\u3053\u3068\u3067\u3001<strong>\u7121\u52b9\u306a\u30b3\u30fc\u30c9\u304c\u30c7\u30d7\u30ed\u30a4\u3055\u308c\u308b\u306e\u3092\u672a\u7136\u306b\u9632\u304e\u307e\u3059<\/strong>\u3002<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>Terraform\u3092\u4f7f\u3063\u305f\u30a4\u30f3\u30d5\u30e9\u306e\u30c7\u30d7\u30ed\u30a4\u306f\u3001\u4ee5\u4e0b\u306e\u30b7\u30f3\u30d7\u30eb\u306a3\u3064\u306e\u30b9\u30c6\u30c3\u30d7\u3067\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. Plan (\u8a08\u753b)<\/h3>\n\n\n\n<p><code>terraform plan<\/code> \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Terraform\u306f\u3001\u5b9a\u7fa9\u30b3\u30fc\u30c9\u3068\u30b9\u30c6\u30fc\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u6bd4\u8f03\u3057\u3001<strong>\u3053\u308c\u304b\u3089\u5b9f\u884c\u3055\u308c\u308b\u5909\u66f4\u5185\u5bb9<\/strong>\uff08\u3069\u306e\u30ea\u30bd\u30fc\u30b9\u304c\u4f5c\u6210\u3001\u5909\u66f4\u3001\u307e\u305f\u306f\u524a\u9664\u3055\u308c\u308b\u304b\uff09\u3092\u8a73\u7d30\u306b\u8868\u793a\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u30e6\u30fc\u30b6\u30fc\u306f\u3001<strong>\u5b9f\u884c\u524d\u306b<\/strong>\u610f\u56f3\u3057\u305f\u5909\u66f4\u3067\u3042\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">2. Apply (\u9069\u7528)<\/h3>\n\n\n\n<p><code>terraform apply<\/code> \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>plan<\/code> \u3067\u8868\u793a\u3055\u308c\u305f\u5909\u66f4\u5185\u5bb9\u3092<strong>\u5b9f\u884c<\/strong>\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li>Terraform\u304c\u30af\u30e9\u30a6\u30c9API\u3068\u901a\u4fe1\u3057\u3001\u8a18\u8ff0\u3055\u308c\u305f\u901a\u308a\u306b\u30a4\u30f3\u30d5\u30e9\u30ea\u30bd\u30fc\u30b9\u3092\u69cb\u7bc9\u307e\u305f\u306f\u5909\u66f4\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">3. Destroy (\u7834\u68c4)<\/h3>\n\n\n\n<p><code>terraform destroy<\/code> \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u7ba1\u7406\u3057\u3066\u3044\u308b\u3059\u3079\u3066\u306e\u30a4\u30f3\u30d5\u30e9\u30ea\u30bd\u30fc\u30b9\u3092<strong>\u4e00\u62ec\u3067\u5b89\u5168\u306b\u524a\u9664<\/strong>\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u958b\u767a\u74b0\u5883\u3084\u691c\u8a3c\u74b0\u5883\u3092\u4e00\u6642\u7684\u306b\u7acb\u3061\u4e0a\u3052\u3066\u8cbb\u7528\u3092\u7bc0\u7d04\u3059\u308b\u969b\u306b\u975e\u5e38\u306b\u6709\u7528\u3067\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">&#x1f31f; Terraform\u5c0e\u5165\u306e\u30e1\u30ea\u30c3\u30c8<\/h2>\n\n\n\n<p>Terraform\u3092\u5c0e\u5165\u3059\u308b\u3053\u3068\u3067\u3001\u7d44\u7e54\u306e\u30a4\u30f3\u30d5\u30e9\u7ba1\u7406\u306b\u4ee5\u4e0b\u306e\u30e1\u30ea\u30c3\u30c8\u304c\u3082\u305f\u3089\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li><strong>\u518d\u73fe\u6027\u306e\u78ba\u4fdd:<\/strong> \u8ab0\u304c\u5b9f\u884c\u3057\u3066\u3082\u3001\u4f55\u5ea6\u5b9f\u884c\u3057\u3066\u3082\u3001\u5e38\u306b<strong>\u540c\u3058\u69cb\u6210<\/strong>\u306e\u30a4\u30f3\u30d5\u30e9\u304c\u69cb\u7bc9\u3055\u308c\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u76e3\u67fb\u3068\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406:<\/strong> \u30a4\u30f3\u30d5\u30e9\u306e\u5b9a\u7fa9\u304c\u30b3\u30fc\u30c9\u306b\u306a\u308b\u305f\u3081\u3001Git\u306a\u3069\u3067\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\u3067\u304d\u3001<strong>\u3044\u3064\u3001\u8ab0\u304c\u3001\u3069\u306e\u3088\u3046\u306a\u5909\u66f4\u3092\u52a0\u3048\u305f\u304b<\/strong>\u306e\u5c65\u6b74\u8ffd\u8de1\u304c\u5bb9\u6613\u306b\u306a\u308a\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u30df\u30b9\u306e\u524a\u6e1b:<\/strong> \u624b\u52d5\u3067\u306e\u8a2d\u5b9a\u4f5c\u696d\u304c\u306a\u304f\u306a\u308a\u3001\u81ea\u52d5\u5316\u3055\u308c\u308b\u305f\u3081\u3001\u4eba\u70ba\u7684\u306a\u8a2d\u5b9a\u30df\u30b9\uff08\u30d2\u30e5\u30fc\u30de\u30f3\u30a8\u30e9\u30fc\uff09\u3092\u6700\u5c0f\u9650\u306b\u6291\u3048\u3089\u308c\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u52b9\u7387\u7684\u306a\u74b0\u5883\u69cb\u7bc9:<\/strong> \u958b\u767a\u74b0\u5883\u3084\u30c6\u30b9\u30c8\u74b0\u5883\u3092\u3001\u6570\u5206\u3067\u30b3\u30fc\u30c9\u304b\u3089\u7acb\u3061\u4e0a\u3052\u3001\u691c\u8a3c\u304c\u7d42\u308f\u308c\u3070\u3059\u3050\u306b\u7834\u68c4\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>#x1f4bb; \u30a4\u30f3\u30d5\u30e9\u7ba1\u7406\u306e\u9769\u547d\uff1aTerraform\uff08\u30c6\u30e9\u30d5\u30a9\u30fc\u30e0\uff09\u5165\u9580 #x1f4a1; \u306f\u3058\u3081\u306b\uff1a\u30a4\u30f3\u30d5\u30e9\u3092\u300c\u30b3\u30fc\u30c9\u300d\u3067\u7ba1\u7406\u3059\u308b\u6642\u4ee3 \u30b5\u30fc\u30d0\u30fc\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306a\u3069\u306eIT\u30a4\u30f3\u30d5\u30e9\u30b9\u30c8\u30e9\u30af\u30c1\u30e3\u306e\u69cb\u7bc9\u30fb<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jin_ogp_image_url":"","_jin_last_featured_id":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3201","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/3201","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3201"}],"version-history":[{"count":1,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/3201\/revisions"}],"predecessor-version":[{"id":3202,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/3201\/revisions\/3202"}],"wp:attachment":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3201"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3201"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}