# Updating Your Configuration with More Resources

> Markdown source of <https://docs.calebsargeant.com/computing/terraform/getting-started/updating-configuration-with-more-resources/>.

## Terraform State

- JSON format (Do not touch!)
- Resource mappings and metadata
- Locking
- Location
  - Local
  - Remote: AWS, Azure, NFS, Terraform Cloud
- Workspaces

### State File

``` json
{
  "version": 4,
  "terraform_version": "0.12.5",
  "serial": 30,
  "lineage": "",
  "outputs": {},
  "resources": []
}
```

!!! note


    First rule of Terraform? Make all changes in Terraform.


## Terraform Plan

### Terraform Planning

- Inspect state
- Dependency graph
- Additions, updates, and deletions
- Parallel execution
- Save the plan

## Adding a VPC

``` text
resource "aws_vpc" "vpc" {}
resource "aws_internet_gateway" "igw" {}
resource "aws_subnet" "subnet" {}
resource "aws_route_table" "rtb" {}
resource "aws_route_table_association" "rta-subnet1" {}
```

### Deploying a VPC

The below also includes an ELB and different availability zone for blue and red team deployment

[modulefour-update.tf](https://github.com/CalebSargeant/Getting-Started-Terraform/blob/master/m4/modulefour-update.tf)

[m4_commands.txt](https://github.com/CalebSargeant/Getting-Started-Terraform/blob/master/m4/m4_commands.txt)
