Skip to content

Networking

All applications in an environment share a common network (VPC).

The default VPC for your environment set up by this guide is: {Environment}

Step 1: Add and configure the networking package

repo-iac/environments/dev/
ok pkg add networking
cd networking

Update package-config.yml with your preferences.

Step 2: Install the package

repo-iac/environments/dev/networking/
ok pkg install

Step 3: Configure CIDR range

Each VPC must have a unique CIDR range within the Origo AWS organization. You must claim a range and document this in the Google doc created for this purpose.

Once a range have been claimed: edit config_override.tf and set the CIDR range chosen:

repo-iac/environments/dev/networking/config_override.tf
vpc_cidr_block = "{value-chosen}"

Release CIDR block

The CIDR block must be released (removed from the Google doc) once the VPC is no longer in use.

Step 4: Initialize and apply the networking stack

repo-iac/environments/dev/networking/
terraform init
terraform apply

Step 4: Verify

Run the following command:

aws ec2 describe-vpcs | jq '.Vpcs[].Tags[] | select(.Key == "Name") | .Value'

The output list should contain the name of the VPC you just created.

Login to the AWS console and navigate to VPC. Select Your VPCs in the left-hand menu.

The list should contain the name of the VPC you just created.


Commit your files

At this stage it is a good idea to commit your files.

Next step

Set up databases.