Conditional resource creation in Terraform
- Refer Here for official docs
Activity 1.1 Create a openssh firewall rule based on network tag linux
- For this lets create a google compute firewall resource Refer Here for the changes to create compute firewall conditionally
locals
- Refer Here for official docs
- Refer Here for the changes
outputs
- Outputs for the terraform template will display the outputs after apply Refer Here

- Refer Here for the changes done to add outputs
What is the importance of terraform state ?
- Terraform state stores the information of the resources created during last apply
- When we execute terraform apply,
- terraform first refresh state
- calculates the drift
- drift becomes the plan
- which will be applied
- Refer Here for official docs
Importing resources into terraform
- Now lets assume, we have manually created a resource or our state file is deleted in these case we need to reverse engineering
- Watch the classroom recording
Functions
- Refer Here for functions
Backend
- Terraform stores state in the backend and default backend is local
- Generally for multi user executions it is recommended to use remote backends
- Refer Here for terraform backends
- Refer Here for using gcs backend
- Refer Here for the changes
Activities
Deploying a Three-Tier Archictecture
-
Overview
-
Topics:
- Modules
- Workspaces
- Provisioning
Deploying a Public GKE Cluster
- Topics:
- Modules
- Workspaces
