• システム開発に関わる内容をざっくりと書いていく

TerraFormざっくりパート別

・Foundation:基礎部分

・Network:ネットワーク

 VPC (Virtual Private Cloud)
 サブネット (Subnet)
 インターネットゲートウェイ (Internet Gateway)
 ルートテーブル (Route Table)
 ルートテーブルの関連付け (Route Table Association)
 ネットワーク ACL (Network ACL)
 セキュリティグループ (Security Group)
 VPN Gateway
 ピアリング接続 (Peering Connection)
 etc…

resource "aws_vpc" "example" {
  cidr_block = "10.0.0.0/16"

  tags = {
    Name = "example-vpc"
  }
}

resource "aws_subnet" "example" {
  vpc_id     = aws_vpc.example.id
  cidr_block = "10.0.1.0/24"

  tags = {
    Name = "example-subnet"
  }
}

resource "aws_internet_gateway" "example" {
  vpc_id = aws_vpc.example.id

  tags = {
    Name = "example-internet-gateway"
  }
}

resource "aws_route_table" "example" {
  vpc_id = aws_vpc.example.id

  route {
    cidr_block = "0.0.0.0/0"
    gateway_id = aws_internet_gateway.example.id
  }

  tags = {
    Name = "example-route-table"
  }
}

resource "aws_route_table_association" "example" {
  subnet_id      = aws_subnet.example.id
  route_table_id = aws_route_table.example.id
}

・Runtime:実行部分

・Service:プログラム配置部分