Manipulate State Using Terraform

Takes 45 mins

States in Terraform refer to records of information about the resources being created and used. This is an essential feature of Terraform and allows us to keep track of the changes that may have taken place from the last usage of a user, that is, any resources that may have been newly created, modified, or deleted.

In this Cloud Lab, you’ll learn how the state in Terraform can be manipulated by creating resources like VPCs and subnets and explore the changes in the state in correspondence to changes in resource properties.

Lab tasks

  • Create an EC2 Instance
  • Download the Terraform Files
  • Create Resources Using Terraform
  • Manipulating State Using Terraform
  • Clean Up

Architecture diagram

The following is the high-level architecture diagram of how to manipulate a state using terraform: