GCP Classroom notes 29/Oct/2024

Conditional resource creation in Terraform

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


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


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
Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a comment

Turn on JavaScript to leave a comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Floating Social Media Icons by Acurax Wordpress Designers
Exit mobile version
%%footer%%