{"id":3420,"date":"2026-09-24T05:48:41","date_gmt":"2026-09-23T20:48:41","guid":{"rendered":"https:\/\/qol-kk.com\/wp2\/?p=3420"},"modified":"2026-09-24T05:48:41","modified_gmt":"2026-09-23T20:48:41","slug":"20260917-plan025","status":"publish","type":"post","link":"https:\/\/qol-kk.com\/wp2\/blog\/2026\/09\/24\/20260917-plan025\/","title":{"rendered":"\u30d1\u30d6\u30ea\u30c3\u30af\/\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30b5\u30d6\u30cd\u30c3\u30c8\u306e\u8a2d\u8a08\u3068\u4f7f\u3044\u5206\u3051"},"content":{"rendered":"<h2>\u6982\u8981<\/h2>\n<p>AWS \u3067 VPC \u3092\u8a2d\u8a08\u3059\u308b\u3068\u304d\u3001\u6700\u521d\u306b\u8ff7\u3046\u306e\u304c\u300c\u30b5\u30d6\u30cd\u30c3\u30c8\u3092\u3069\u3046\u5206\u3051\u308b\u304b\u300d\u3067\u3059\u3002\u3068\u304f\u306b <strong>\u30d1\u30d6\u30ea\u30c3\u30af\u30b5\u30d6\u30cd\u30c3\u30c8<\/strong> \u3068 <strong>\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30b5\u30d6\u30cd\u30c3\u30c8<\/strong> \u306e\u9055\u3044\u3068\u4f7f\u3044\u5206\u3051\u306f\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306b\u3082\u30b3\u30b9\u30c8\u306b\u3082\u76f4\u7d50\u3059\u308b\u57fa\u672c\u8a2d\u8a08\u3067\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u4e21\u8005\u306e\u9055\u3044\u3092\u300c\u30eb\u30fc\u30c8\u30c6\u30fc\u30d6\u30eb\u306e\u4e2d\u8eab\u300d\u3068\u3044\u3046\u30ec\u30d9\u30eb\u307e\u3067\u6398\u308a\u4e0b\u3052\u3064\u3064\u3001\u5b9f\u969b\u306b\u3069\u3046\u30ea\u30bd\u30fc\u30b9\u3092\u914d\u7f6e\u3059\u308b\u306e\u304b\u3092\u5165\u9580\u8005\u5411\u3051\u306b\u6574\u7406\u3057\u307e\u3059\u3002<\/p>\n<h2>\u30d1\u30d6\u30ea\u30c3\u30af\u3068\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u3092\u5206\u3051\u308b\u3082\u306e\u306f\u4f55\u304b<\/h2>\n<p>\u307e\u305a\u8aa4\u89e3\u3057\u3084\u3059\u3044\u30dd\u30a4\u30f3\u30c8\u304b\u3089\u3002<strong>\u30b5\u30d6\u30cd\u30c3\u30c8\u81ea\u4f53\u306b\u300c\u30d1\u30d6\u30ea\u30c3\u30af\u300d\u300c\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u300d\u3068\u3044\u3046\u5c5e\u6027\u30d5\u30e9\u30b0\u304c\u3042\u308b\u308f\u3051\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/strong><\/p>\n<p>\u30b5\u30d6\u30cd\u30c3\u30c8\u304c\u300c\u30d1\u30d6\u30ea\u30c3\u30af\u300d\u306b\u306a\u308b\u6761\u4ef6\u306f\u305f\u3060\u4e00\u3064\u3067\u3059\u3002\u305d\u308c\u306f\u3001\u305d\u306e\u30b5\u30d6\u30cd\u30c3\u30c8\u306b\u7d10\u3065\u304f\u30eb\u30fc\u30c8\u30c6\u30fc\u30d6\u30eb\u304c\u3001<strong>\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4\uff08IGW\uff09\u3078\u306e\u7d4c\u8def\u3092\u6301\u3063\u3066\u3044\u308b\u304b\u3069\u3046\u304b<\/strong>\u3067\u3059\u3002<\/p>\n<ul>\n<li>IGW \u3078\u306e <code>0.0.0.0\/0<\/code> \u7d4c\u8def\u3092 <strong>\u6301\u3064<\/strong> \u2192 \u30d1\u30d6\u30ea\u30c3\u30af\u30b5\u30d6\u30cd\u30c3\u30c8<\/li>\n<li>IGW \u3078\u306e\u7d4c\u8def\u3092 <strong>\u6301\u305f\u306a\u3044<\/strong> \u2192 \u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30b5\u30d6\u30cd\u30c3\u30c8<\/li>\n<\/ul>\n<p>\u3064\u307e\u308a\u300c\u30d1\u30d6\u30ea\u30c3\u30af\/\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u300d\u306f\u7269\u7406\u7684\u306a\u533a\u5225\u3067\u306f\u306a\u304f\u3001<strong>\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u8a2d\u8a08\u306e\u7d50\u679c\u3068\u3057\u3066\u306e\u547c\u3073\u540d<\/strong>\u3067\u3059\u3002\u3053\u3053\u304c\u8179\u843d\u3061\u3059\u308b\u3068\u3001\u4ee5\u964d\u306e\u8a2d\u8a08\u5224\u65ad\u304c\u3076\u308c\u306a\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<h3>\u30eb\u30fc\u30c8\u30c6\u30fc\u30d6\u30eb\u306e\u4e2d\u8eab\u3092\u6bd4\u8f03\u3059\u308b<\/h3>\n<p>\u30d1\u30d6\u30ea\u30c3\u30af\u30b5\u30d6\u30cd\u30c3\u30c8\u306e\u30eb\u30fc\u30c8\u30c6\u30fc\u30d6\u30eb\uff08\u30a4\u30e1\u30fc\u30b8\uff09:<\/p>\n<table>\n<thead>\n<tr>\n<th>\u5b9b\u5148 (Destination)<\/th>\n<th>\u30bf\u30fc\u30b2\u30c3\u30c8 (Target)<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>10.0.0.0\/16<\/code><\/td>\n<td><code>local<\/code>\uff08VPC\u5185\u901a\u4fe1\uff09<\/td>\n<\/tr>\n<tr>\n<td><code>0.0.0.0\/0<\/code><\/td>\n<td><code>igw-xxxx<\/code>\uff08\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4\uff09<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30b5\u30d6\u30cd\u30c3\u30c8\u306e\u30eb\u30fc\u30c8\u30c6\u30fc\u30d6\u30eb\uff08\u30a4\u30e1\u30fc\u30b8\uff09:<\/p>\n<table>\n<thead>\n<tr>\n<th>\u5b9b\u5148 (Destination)<\/th>\n<th>\u30bf\u30fc\u30b2\u30c3\u30c8 (Target)<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>10.0.0.0\/16<\/code><\/td>\n<td><code>local<\/code>\uff08VPC\u5185\u901a\u4fe1\uff09<\/td>\n<\/tr>\n<tr>\n<td><code>0.0.0.0\/0<\/code><\/td>\n<td><code>nat-xxxx<\/code>\uff08NAT \u30b2\u30fc\u30c8\u30a6\u30a7\u30a4\uff09<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u9055\u3044\u306f <code>0.0.0.0\/0<\/code> \u306e\u5411\u304d\u5148\u3060\u3051\u3067\u3059\u3002IGW \u3092\u5411\u3044\u3066\u3044\u308c\u3070\u5916\u304b\u3089\u5165\u308c\u308b\uff08\uff1d\u30d1\u30d6\u30ea\u30c3\u30af\uff09\u3001NAT \u3092\u5411\u3044\u3066\u3044\u308c\u3070\u300c\u51fa\u3089\u308c\u308b\u304c\u5165\u3089\u308c\u306a\u3044\u300d\uff08\uff1d\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\uff09\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>\u30d1\u30d6\u30ea\u30c3\u30afIP\u3060\u3051\u3067\u306f\u5916\u90e8\u901a\u4fe1\u306f\u6210\u7acb\u3057\u306a\u3044<\/h2>\n<p>\u3082\u3046\u4e00\u3064\u306e\u843d\u3068\u3057\u7a74\u3002EC2 \u306b\u30d1\u30d6\u30ea\u30c3\u30af IP \u3092\u5272\u308a\u5f53\u3066\u3066\u3082\u3001\u305d\u308c\u3060\u3051\u3067\u306f\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u3068\u901a\u4fe1\u3067\u304d\u307e\u305b\u3093\u3002\u6b21\u306e <strong>3\u70b9\u30bb\u30c3\u30c8<\/strong> \u304c\u305d\u308d\u3063\u3066\u521d\u3081\u3066\u758e\u901a\u3057\u307e\u3059\u3002<\/p>\n<ol>\n<li>\u30b5\u30d6\u30cd\u30c3\u30c8\u306e\u30eb\u30fc\u30c8\u30c6\u30fc\u30d6\u30eb\u306b IGW \u3078\u306e\u7d4c\u8def\u304c\u3042\u308b<\/li>\n<li>\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u30d1\u30d6\u30ea\u30c3\u30af IP\uff08\u307e\u305f\u306f EIP\uff09\u304c\u4ed8\u3044\u3066\u3044\u308b<\/li>\n<li>\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30b0\u30eb\u30fc\u30d7\uff0f\u30cd\u30c3\u30c8\u30ef\u30fc\u30af ACL \u3067\u8a72\u5f53\u901a\u4fe1\u304c\u8a31\u53ef\u3055\u308c\u3066\u3044\u308b<\/li>\n<\/ol>\n<p>\u300c\u30d1\u30d6\u30ea\u30c3\u30af IP \u3092\u4ed8\u3051\u305f\u306e\u306b\u7e4b\u304c\u3089\u306a\u3044\u300d\u306e\u5927\u534a\u306f\u30011 \u306e\u30eb\u30fc\u30c8\u4e0d\u8db3\u304c\u539f\u56e0\u3067\u3059\u3002<\/p>\n<h2>\u4f55\u3092\u3069\u3053\u306b\u7f6e\u304f\u304b\uff08\u914d\u7f6e\u306e\u539f\u5247\uff09<\/h2>\n<p>\u539f\u5247\u306f\u30b7\u30f3\u30d7\u30eb\u3067\u3059\u3002<strong>\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u304b\u3089\u76f4\u63a5\u30a2\u30af\u30bb\u30b9\u3055\u308c\u308b\u5fc5\u8981\u304c\u3042\u308b\u3082\u306e\u3060\u3051\u3092\u30d1\u30d6\u30ea\u30c3\u30af\u306b\u7f6e\u304f\u3002\u305d\u308c\u4ee5\u5916\u306f\u5168\u90e8\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u3002<\/strong><\/p>\n<p>\u5178\u578b\u7684\u306a3\u5c64\u69cb\u6210\u3067\u306e\u914d\u7f6e\u4f8b:<\/p>\n<table>\n<thead>\n<tr>\n<th>\u30ea\u30bd\u30fc\u30b9<\/th>\n<th>\u914d\u7f6e<\/th>\n<th>\u7406\u7531<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>ALB\uff08\u30ed\u30fc\u30c9\u30d0\u30e9\u30f3\u30b5\u30fc\uff09<\/td>\n<td>\u30d1\u30d6\u30ea\u30c3\u30af<\/td>\n<td>\u5916\u90e8\u304b\u3089\u306eHTTP(S)\u53d7\u3051\u53e3<\/td>\n<\/tr>\n<tr>\n<td>Web\u30b5\u30fc\u30d0\u30fc \/ AP\u30b5\u30fc\u30d0\u30fc<\/td>\n<td>\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8<\/td>\n<td>\u5916\u90e8\u516c\u958b\u305b\u305aALB\u7d4c\u7531\u3067\u306e\u307f\u53d7\u3051\u308b<\/td>\n<\/tr>\n<tr>\n<td>RDS \/ Aurora<\/td>\n<td>\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8<\/td>\n<td>DB\u306f\u7d76\u5bfe\u306b\u5916\u90e8\u516c\u958b\u3057\u306a\u3044<\/td>\n<\/tr>\n<tr>\n<td>NAT\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4<\/td>\n<td>\u30d1\u30d6\u30ea\u30c3\u30af<\/td>\n<td>\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u304b\u3089\u306e\u5916\u5411\u304d\u901a\u4fe1\u306e\u51fa\u53e3<\/td>\n<\/tr>\n<tr>\n<td>Bastion\uff08\u8e0f\u307f\u53f0\uff09<\/td>\n<td>\u30d1\u30d6\u30ea\u30c3\u30af\uff08\u307e\u305f\u306f SSM \u3067\u4e0d\u8981\u5316\uff09<\/td>\n<td>\u904b\u7528\u30a2\u30af\u30bb\u30b9\u306e\u5165\u53e3<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u30dd\u30a4\u30f3\u30c8\u306f\u3001<strong>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u30fc\u3084DB\u3092\u30d1\u30d6\u30ea\u30c3\u30af\u306b\u7f6e\u304b\u306a\u3044<\/strong>\u3053\u3068\u3067\u3059\u3002\u5916\u90e8\u304b\u3089\u306e\u53d7\u3051\u53e3\u306f ALB \u306b\u96c6\u7d04\u3057\u3001\u305d\u306e\u80cc\u5f8c\u306f\u5168\u3066\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u306b\u9589\u3058\u8fbc\u3081\u307e\u3059\u3002\u3053\u308c\u3060\u3051\u3067\u653b\u6483\u9762\uff08\u30a2\u30bf\u30c3\u30af\u30b5\u30fc\u30d5\u30a7\u30b9\uff09\u304c\u5927\u304d\u304f\u6e1b\u308a\u307e\u3059\u3002<\/p>\n<h2>NAT\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4 \u2014 \u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u306e\u300c\u51fa\u53e3\u300d<\/h2>\n<p>\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30b5\u30d6\u30cd\u30c3\u30c8\u306e\u30b5\u30fc\u30d0\u30fc\u3082\u3001\u5916\u5411\u304d\u306e\u901a\u4fe1\u306f\u5fc5\u8981\u3067\u3059\uff08OS\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3001\u5916\u90e8API\u30b3\u30fc\u30eb\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u53d6\u5f97\u306a\u3069\uff09\u3002\u3053\u306e\u3068\u304d\u4f7f\u3046\u306e\u304c <strong>NAT\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4<\/strong> \u3067\u3059\u3002<\/p>\n<ul>\n<li>NAT\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4\u306f <strong>\u30d1\u30d6\u30ea\u30c3\u30af\u30b5\u30d6\u30cd\u30c3\u30c8<\/strong> \u306b\u7f6e\u304f<\/li>\n<li>\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30b5\u30d6\u30cd\u30c3\u30c8\u306e\u30eb\u30fc\u30c8\u30c6\u30fc\u30d6\u30eb\u3067 <code>0.0.0.0\/0<\/code> \u3092 NAT \u306b\u5411\u3051\u308b<\/li>\n<li>\u300c\u5185 \u2192 \u5916\u300d\u306f\u901a\u3059\u304c\u3001\u300c\u5916 \u2192 \u5185\u300d\u306f\u901a\u3055\u306a\u3044\uff08\uff1d\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u6027\u3092\u7dad\u6301\u3057\u305f\u307e\u307e\u5916\u306b\u51fa\u3089\u308c\u308b\uff09<\/li>\n<\/ul>\n<h3>NAT\u306f\u30b3\u30b9\u30c8\u6ce8\u610f\u30dd\u30a4\u30f3\u30c8<\/h3>\n<p>\u5165\u9580\u6bb5\u968e\u3067\u5fc5\u305a\u77e5\u3063\u3066\u304a\u304d\u305f\u3044\u306e\u304c\u3001<strong>NAT\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4\u306f\u7121\u6599\u3067\u306f\u306a\u3044<\/strong>\u3053\u3068\u3067\u3059\u3002\u8d77\u52d5\u3057\u3066\u3044\u308b\u3060\u3051\u3067\u6642\u9593\u8ab2\u91d1\u304c\u767a\u751f\u3057\u3001\u901a\u904e\u30c7\u30fc\u30bf\u91cf\u306b\u3082\u8ab2\u91d1\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u305f\u3081\u3001\u53ef\u7528\u6027\u91cd\u8996\u306a\u3089 AZ \u3054\u3068\u306b NAT \u3092\u7f6e\u304d\u307e\u3059\u304c\u3001\u30b3\u30b9\u30c8\u91cd\u8996\u306e\u691c\u8a3c\u74b0\u5883\u3067\u306f NAT \u30921\u3064\u306b\u96c6\u7d04\u3059\u308b\u3001\u3042\u308b\u3044\u306f <strong>VPC\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8<\/strong> \u3092\u4f7f\u3063\u3066 NAT \u3092\u7d4c\u7531\u305b\u305a AWS \u30b5\u30fc\u30d3\u30b9\uff08S3, DynamoDB \u306a\u3069\uff09\u3078\u76f4\u63a5\u30a2\u30af\u30bb\u30b9\u3055\u305b\u308b\u3001\u3068\u3044\u3063\u305f\u6700\u9069\u5316\u304c\u5b9a\u77f3\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>\u30b5\u30d6\u30cd\u30c3\u30c8\u306eCIDR\u8a2d\u8a08<\/h2>\n<p>\u30b5\u30d6\u30cd\u30c3\u30c8\u306b\u5272\u308a\u5f53\u3066\u308b IP \u30ec\u30f3\u30b8\uff08CIDR\uff09\u306f\u5f8c\u304b\u3089\u5e83\u3052\u306b\u304f\u3044\u306e\u3067\u3001\u6700\u521d\u306b\u5c11\u3057\u4f59\u88d5\u3092\u3082\u3063\u3066\u5207\u308a\u307e\u3059\u3002VPC \u3092 <code>10.0.0.0\/16<\/code> \u3068\u3057\u305f\u5834\u5408\u306e\u4e00\u4f8b:<\/p>\n<table>\n<thead>\n<tr>\n<th>\u30b5\u30d6\u30cd\u30c3\u30c8<\/th>\n<th>CIDR<\/th>\n<th>AZ<\/th>\n<th>\u7a2e\u5225<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>public-1a<\/td>\n<td><code>10.0.0.0\/24<\/code><\/td>\n<td>ap-northeast-1a<\/td>\n<td>\u30d1\u30d6\u30ea\u30c3\u30af<\/td>\n<\/tr>\n<tr>\n<td>public-1c<\/td>\n<td><code>10.0.1.0\/24<\/code><\/td>\n<td>ap-northeast-1c<\/td>\n<td>\u30d1\u30d6\u30ea\u30c3\u30af<\/td>\n<\/tr>\n<tr>\n<td>private-app-1a<\/td>\n<td><code>10.0.10.0\/24<\/code><\/td>\n<td>ap-northeast-1a<\/td>\n<td>\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8<\/td>\n<\/tr>\n<tr>\n<td>private-app-1c<\/td>\n<td><code>10.0.11.0\/24<\/code><\/td>\n<td>ap-northeast-1c<\/td>\n<td>\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8<\/td>\n<\/tr>\n<tr>\n<td>private-db-1a<\/td>\n<td><code>10.0.20.0\/24<\/code><\/td>\n<td>ap-northeast-1a<\/td>\n<td>\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8<\/td>\n<\/tr>\n<tr>\n<td>private-db-1c<\/td>\n<td><code>10.0.21.0\/24<\/code><\/td>\n<td>ap-northeast-1c<\/td>\n<td>\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u88dc\u8db3: AWS \u3067\u306f\u5404\u30b5\u30d6\u30cd\u30c3\u30c8\u3067<strong>\u5148\u982d4\u3064\uff0b\u672b\u5c3e1\u3064\u306e\u8a085\u30a2\u30c9\u30ec\u30b9\u304c\u4e88\u7d04<\/strong>\u3055\u308c\u308b\u305f\u3081\u3001<code>\/24<\/code>\uff08256\u500b\uff09\u3067\u3082\u5b9f\u969b\u306b\u4f7f\u3048\u308b\u306e\u306f251\u500b\u3067\u3059\u3002\u7d30\u304b\u304f\u5207\u308a\u3059\u304e\u308b\u3068\u8db3\u308a\u306a\u304f\u306a\u308b\u306e\u3067\u6ce8\u610f\u3057\u307e\u3059\u3002<\/p>\n<h2>\u5b9f\u88c5\u4f8b\uff08\u69cb\u6210\u30a4\u30e1\u30fc\u30b8\uff09<\/h2>\n<p>Terraform \u3067\u306e\u30a4\u30e1\u30fc\u30b8\uff08\u629c\u7c8b\u30fb\u6982\u5ff5\u78ba\u8a8d\u7528\uff09:<\/p>\n<pre class=\"lang:default decode:true\"># \u30d1\u30d6\u30ea\u30c3\u30af\u30b5\u30d6\u30cd\u30c3\u30c8\nresource \"aws_subnet\" \"public_1a\" {\n  vpc_id                  = aws_vpc.main.id\n  cidr_block              = \"10.0.0.0\/24\"\n  availability_zone       = \"ap-northeast-1a\"\n  map_public_ip_on_launch = true   # \u8d77\u52d5\u6642\u306b\u81ea\u52d5\u3067\u30d1\u30d6\u30ea\u30c3\u30afIP\u4ed8\u4e0e\n  tags = { Name = \"public-1a\" }\n}\n\n# \u30d1\u30d6\u30ea\u30c3\u30af\u7528\u30eb\u30fc\u30c8\u30c6\u30fc\u30d6\u30eb\uff08IGW\u3078\uff09\nresource \"aws_route_table\" \"public\" {\n  vpc_id = aws_vpc.main.id\n  route {\n    cidr_block = \"0.0.0.0\/0\"\n    gateway_id = aws_internet_gateway.main.id\n  }\n}\n\nresource \"aws_route_table_association\" \"public_1a\" {\n  subnet_id      = aws_subnet.public_1a.id\n  route_table_id = aws_route_table.public.id\n}\n\n# \u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30b5\u30d6\u30cd\u30c3\u30c8\nresource \"aws_subnet\" \"private_app_1a\" {\n  vpc_id            = aws_vpc.main.id\n  cidr_block        = \"10.0.10.0\/24\"\n  availability_zone = \"ap-northeast-1a\"\n  tags = { Name = \"private-app-1a\" }\n}\n\n# \u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u7528\u30eb\u30fc\u30c8\u30c6\u30fc\u30d6\u30eb\uff08NAT\u3078\uff09\nresource \"aws_route_table\" \"private\" {\n  vpc_id = aws_vpc.main.id\n  route {\n    cidr_block     = \"0.0.0.0\/0\"\n    nat_gateway_id = aws_nat_gateway.main.id\n  }\n}<\/pre>\n<p><code>map_public_ip_on_launch = true<\/code> \u3092\u4ed8\u3051\u308b\u3068\u3001\u305d\u306e\u30b5\u30d6\u30cd\u30c3\u30c8\u3067\u8d77\u52d5\u3057\u305f\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u81ea\u52d5\u3067\u30d1\u30d6\u30ea\u30c3\u30af IP \u304c\u632f\u3089\u308c\u307e\u3059\u3002\u30d1\u30d6\u30ea\u30c3\u30af\u30b5\u30d6\u30cd\u30c3\u30c8\u7528\u306e\u8a2d\u5b9a\u3067\u3059\u3002<\/p>\n<h2>\u78ba\u8a8d\u65b9\u6cd5<\/h2>\n<p>\u8a2d\u8a08\u304c\u610f\u56f3\u3069\u304a\u308a\u304b\u3001\u6b21\u306e\u89b3\u70b9\u3067\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<ol>\n<li><strong>\u30eb\u30fc\u30c8\u30c6\u30fc\u30d6\u30eb\u306e\u78ba\u8a8d<\/strong> \u2014 \u5bfe\u8c61\u30b5\u30d6\u30cd\u30c3\u30c8\u306b\u7d10\u3065\u304f\u30eb\u30fc\u30c8\u30c6\u30fc\u30d6\u30eb\u3092\u958b\u304d\u3001<code>0.0.0.0\/0<\/code> \u306e\u5411\u304d\u5148\u304c IGW \u304b NAT \u304b\u3092\u898b\u308b<\/li>\n<li><strong>\u758e\u901a\u78ba\u8a8d\uff08\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u5074\uff09<\/strong> \u2014 \u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u306e\u30b5\u30fc\u30d0\u30fc\u304b\u3089 <code>curl https:\/\/example.com<\/code> \u306a\u3069\u3067\u5916\u5411\u304d\u901a\u4fe1\u304c\u901a\u308b\u3053\u3068\uff08NAT\u7d4c\u7531\uff09\u3001\u5916\u90e8\u304b\u3089\u305d\u306e\u30b5\u30fc\u30d0\u30fc\u3078\u76f4\u63a5\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u3044\u3053\u3068<\/li>\n<li><strong>DB\u306e\u9694\u96e2\u78ba\u8a8d<\/strong> \u2014 RDS \u306e\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30b0\u30eb\u30fc\u30d7\u304c\u3001\u30a2\u30d7\u30ea\u5c64\u306eSG\u304b\u3089\u306e\u307f\u8a31\u53ef\u3055\u308c\u3066\u304a\u308a\u3001\u30d1\u30d6\u30ea\u30c3\u30af\u304b\u3089\u306e\u7d4c\u8def\u304c\u306a\u3044\u3053\u3068<\/li>\n<\/ol>\n<h2>\u6ce8\u610f\u70b9<\/h2>\n<ul>\n<li>\u30d1\u30d6\u30ea\u30c3\u30af\/\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u306f\u300c\u30eb\u30fc\u30c8\u30c6\u30fc\u30d6\u30eb\u6b21\u7b2c\u300d\u3067\u3042\u308a\u3001\u30b5\u30d6\u30cd\u30c3\u30c8\u540d\u3060\u3051\u3067\u5224\u65ad\u3057\u306a\u3044<\/li>\n<li>AP\u30b5\u30fc\u30d0\u30fc\u30fbDB\u306f\u30d1\u30d6\u30ea\u30c3\u30af\u306b\u7f6e\u304b\u306a\u3044\uff08\u5916\u90e8\u53d7\u3051\u53e3\u306f ALB \u306b\u96c6\u7d04\uff09<\/li>\n<li>\u30d1\u30d6\u30ea\u30c3\u30afIP\u3092\u4ed8\u3051\u3066\u3082\u30eb\u30fc\u30c8\u4e0d\u8db3\u306a\u3089\u758e\u901a\u3057\u306a\u3044\uff083\u70b9\u30bb\u30c3\u30c8\u3092\u78ba\u8a8d\uff09<\/li>\n<li>NAT\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4\u306f\u5e38\u6642\u8ab2\u91d1\uff0b\u8ee2\u9001\u8ab2\u91d1\u3002\u691c\u8a3c\u74b0\u5883\u3067\u306f\u96c6\u7d04\u3084 VPC\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3067\u30b3\u30b9\u30c8\u6700\u9069\u5316<\/li>\n<li>CIDR \u306f\u5404\u30b5\u30d6\u30cd\u30c3\u30c8\u30675\u30a2\u30c9\u30ec\u30b9\u4e88\u7d04\u3055\u308c\u308b\u70b9\u3092\u7e54\u308a\u8fbc\u3080<\/li>\n<li>\u672c\u756a\u3067\u306f NACL\uff08\u30b9\u30c6\u30fc\u30c8\u30ec\u30b9\uff09\u3068 SG\uff08\u30b9\u30c6\u30fc\u30c8\u30d5\u30eb\uff09\u306e\u5f79\u5272\u306e\u9055\u3044\u3082\u62bc\u3055\u3048\u308b<\/li>\n<\/ul>\n<h2>\u307e\u3068\u3081<\/h2>\n<ul>\n<li>\u30d1\u30d6\u30ea\u30c3\u30af\/\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u306e\u5dee\u306f <strong><code>0.0.0.0\/0<\/code> \u306e\u5411\u304d\u5148\u304c IGW \u304b NAT \u304b<\/strong> \u306e\u4e00\u70b9<\/li>\n<li>\u5916\u90e8\u304b\u3089\u76f4\u63a5\u30a2\u30af\u30bb\u30b9\u3055\u308c\u308b\u3082\u306e\u3060\u3051\u3092\u30d1\u30d6\u30ea\u30c3\u30af\u306b\u3001\u305d\u308c\u4ee5\u5916\u306f\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u306b<\/li>\n<li>\u5916\u5411\u304d\u901a\u4fe1\u306f NAT \u30b2\u30fc\u30c8\u30a6\u30a7\u30a4\u7d4c\u7531\uff08\u30b3\u30b9\u30c8\u306b\u6ce8\u610f\u3001VPC\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3067\u6700\u9069\u5316\uff09<\/li>\n<li>ALB\uff1d\u30d1\u30d6\u30ea\u30c3\u30af\u3001AP\/DB\uff1d\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u3001\u304c\u57fa\u672c\u5f62<\/li>\n<\/ul>\n<p>\u300c\u30b5\u30d6\u30cd\u30c3\u30c8\u306e\u8272\u306f\u540d\u524d\u3067\u306a\u304f\u30eb\u30fc\u30c8\u30c6\u30fc\u30d6\u30eb\u304c\u6c7a\u3081\u308b\u300d\u2014\u2014\u3053\u306e\u4e00\u70b9\u3092\u62bc\u3055\u3048\u3066\u304a\u304f\u3068\u3001VPC\u8a2d\u8a08\u3067\u8ff7\u3044\u306b\u304f\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>AWS \u3067 VPC \u3092\u8a2d\u8a08\u3059\u308b\u3068\u304d\u3001\u6700\u521d\u306b\u8ff7\u3046\u306e\u304c\u300c\u30b5\u30d6\u30cd\u30c3\u30c8\u3092\u3069\u3046\u5206\u3051\u308b\u304b\u300d\u3067\u3059\u3002\u3068\u304f\u306b \u30d1\u30d6\u30ea\u30c3\u30af\u30b5\u30d6\u30cd\u30c3\u30c8 \u3068 \u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30b5\u30d6\u30cd\u30c3\u30c8 \u306e\u9055\u3044\u3068\u4f7f\u3044\u5206\u3051\u306f\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306b\u3082\u30b3\u30b9\u30c8\u306b\u3082\u76f4\u7d50\u3059\u308b\u57fa\u672c\u8a2d\u8a08\u3067\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u4e21\u8005\u306e\u9055\u3044\u3092\u300c\u30eb\u2026<\/p>\n","protected":false},"author":1,"featured_media":3419,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","sitemap_hide":"","_veu_custom_css":"","veu_display_promotion_alert":"","vkexunit_cta_each_option":"","_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[75],"tags":[499,679,1095,562,472],"class_list":["post-3420","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-code-of-serverside","tag-aws","tag-679","tag-1095","tag-562","tag-472"],"veu_head_title_object":{"title":"","add_site_title":""},"jetpack_publicize_connections":[],"jetpack-related-posts":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/qol-kk.com\/wp2\/wp-content\/uploads\/2026\/09\/20260917-plan025-thumbnail.jpg","_links":{"self":[{"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/posts\/3420","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/comments?post=3420"}],"version-history":[{"count":1,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/posts\/3420\/revisions"}],"predecessor-version":[{"id":3433,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/posts\/3420\/revisions\/3433"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/media\/3419"}],"wp:attachment":[{"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/media?parent=3420"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/categories?post=3420"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/tags?post=3420"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}