Giter Club home page Giter Club logo

learning-terraform-gcp's Introduction

tf-workspace

Learning history and files of Terraform for Beginners using GCP - Google Cloud (Hands-on) from Udemy


Work notes

  • Below is just work note of my learning ;)

Section3: Terraform Basics & Installation

7: TF workflow

  1. scope
  2. author
  3. initialize
  4. plan
  5. apply

8: init, plan, apply

9: local_file arguments

10: Mutltiple Resources

11: Random provider

12: Intro to Variables

13: List of Variables 1

string – “cat”
number – 234, 6.5
bool - true/false
list – sequence of value
    list(string) =>[“red”, “green”, “blue”]
Tuple – group non homogeneous data type
    tuple([string, number, bool]) => [“dog”, 23, true]
map – like key value : Dictionary
    {name = “Ankit", age = 32}
set – only unique values
object – complex data type

15: Using Variables

  • There are 4 ways to use variable as below
variable filename {
    type = string
    default = "sample.txt"
}
var.filename

---
variable filename {}    Terraform apply will ask

---
terraform apply -var "filename=sample.txt"

---
export TF_VAR_filename=sample.txt"
  • The order of loading variable. 1 is higher priority = load first
1. export TF_VAR_filename=sample.txt“
2. terraform.tfvars file
3. variable.auto.tfvars file
4. terraform apply -var "filename=sample.txt”

16: Multiple Providers

17: Dependency

18: Output Block

19: Lifecycle Rules

  • File: Lifecycle Rules
  • lifecycle – resource attributes
  • create_before_destroy - Create the resource first and then destroy older
  • prevent_destroy - Prevents destroy of a resource
  • ignore_changes - Ignore Changes to Resource – Specific tag or all

20: Provisioner Version

21: Data Source - Read File

Section4: Terraform with Google Cloud

23: Project - Service Account

24: Provider & version

25-27: Connect Terraform with GCP

  • Google Provider base configuration
    • projectid, zone, region
  • Multiple way to authernticate with GCP
    • username/password - gcloud auth application - default login
    • Cloud Shell(lecture 26)
    • Service Account - Keys: preferred in production(lecture 27)
  • Doc: google_storage_bucket
  • File-26:
  • File-27:

29-32: Cloud Storage

33-34: VPC

  • 3 Types of VPC
    • Default VPC
    • Auto Mode
    • Custom Mode
  • File-34-36:

38-43: Compute Engine

45-48: Cloud Run

49-53: Cloud Function

54: BigQuery

55-56: Cloud PubSub

57: Cloud Spanner

58-59: Cloud SQL

61-62: BigTable


Environment:

  • tf is installed on tfenv
% tfenv list
* 1.3.0 (set by /usr/local/Cellar/tfenv/3.0.0/version)
  1.0.10
% terraform --version
Terraform v1.3.0

learning-terraform-gcp's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.