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
    Preview
  • 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
    Preview
  • 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 Reply

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

Please turn AdBlock off
Social Network Integration by Acurax Social Media Branding Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube