6.1 Creating Network Components

First version of Terraform could create new network components but subsequent versions should allow use of existing VCN, Subnet, etc.

  1. Accept compartment as input. The above topology will be provisioned in compartment specified.
  2. Create a new VCN with CIDR block 10.0.0.0/16, for example, ggsa-ha.
  3. Create an Internet Gateway, for example, ggsa-ig for VCN ggsa-ha.
  4. Add a route rule to the VCN’s route table with the following attributes:
    • Target Type = Internet Gateway
    • Destination CIDR Block = 0.0.0.0/0
    • Target Internet Gateway = ggsa-ig
  5. Create a new public regional-subnet, for example, your-vcn-name-public, with CIDR block 10.0.0.0/24.
  6. Create a new private regional-subnet, for example, your-private-regional-subnet, with CIDR block 10.0.1.0/24.