Skip to content

Commit

Permalink
Added new video links for Terraform and two directories to replace la…
Browse files Browse the repository at this point in the history
…st year's terraform tf files (DataTalksClub#392)
  • Loading branch information
MichaelShoemaker authored Dec 7, 2023
1 parent 6101f8a commit 96e87c0
Show file tree
Hide file tree
Showing 7 changed files with 135 additions and 80 deletions.

This file was deleted.

49 changes: 0 additions & 49 deletions week_1_basics_n_setup/1_terraform_gcp/terraform/main.tf

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "4.51.0"
}
}
}

provider "google" {
# Credentials only needs to be set if you do not have the GOOGLE_APPLICATION_CREDENTIALS set
# credentials =
project = "<Your Project ID>"
region = "us-central1"
}



resource "google_storage_bucket" "data-lake-bucket" {
name = "<Your Unique Bucket Name>"
location = "US"

# Optional, but recommended settings:
storage_class = "STANDARD"
uniform_bucket_level_access = true

versioning {
enabled = true
}

lifecycle_rule {
action {
type = "Delete"
}
condition {
age = 30 // days
}
}

force_destroy = true
}


resource "google_bigquery_dataset" "dataset" {
dataset_id = "<The Dataset Name You Want to Use>"
project = "<Your Project ID>"
location = "US"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "5.6.0"
}
}
}

provider "google" {
credentials = file(var.credentials)
project = var.project
region = var.region
}


resource "google_storage_bucket" "demo-bucket" {
name = var.gcs_bucket_name
location = var.location
force_destroy = true


lifecycle_rule {
condition {
age = 1
}
action {
type = "AbortIncompleteMultipartUpload"
}
}
}



resource "google_bigquery_dataset" "demo_dataset" {
dataset_id = var.bq_dataset_name
location = var.location
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
variable "credentials" {
description = "My Credentials"
default = "<Path to your Service Account json file>"
#ex: if you have a directory where this file is called keys with your service account json file
#saved there as my-creds.json you could use default = "./keys/my-creds.json"
}


variable "project" {
description = "Project"
default = "<Your Project ID>"
}

variable "region" {
description = "Region"
#Update the below to your desired region
default = "us-central1"
}

variable "location" {
description = "Project Location"
#Update the below to your desired location
default = "US"
}

variable "bq_dataset_name" {
description = "My BigQuery Dataset Name"
#Update the below to what you want your dataset to be called
default = "demo_dataset"
}

variable "gcs_bucket_name" {
description = "My Storage Bucket Name"
#Update the below to a unique bucket name
default = "terraform-demo-terra-bucket"
}

variable "gcs_storage_class" {
description = "Bucket Storage Class"
default = "STANDARD"
}
24 changes: 0 additions & 24 deletions week_1_basics_n_setup/1_terraform_gcp/terraform/variables.tf

This file was deleted.

13 changes: 8 additions & 5 deletions week_1_basics_n_setup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,15 @@ if you have troubles setting up the environment and following along with the vid

* Introduction to GCP (Google Cloud Platform)
* [Video](https://www.youtube.com/watch?v=18jIzE41fJ4&list=PL3MmuxUbc_hJed7dXYoJw8DoCuVHhGEQb)
* Introduction to Terraform Concepts & GCP Pre-Requisites
* [Video](https://www.youtube.com/watch?v=Hajwnmj0xfQ&list=PL3MmuxUbc_hJed7dXYoJw8DoCuVHhGEQb)
* Introduction to Terraform Concepts - Overview
* [Video](https://youtu.be/s2bOYDCKl_M)
* [Companion Notes](1_terraform_gcp)
* Workshop: Creating GCP Infrastructure with Terraform
* [Video](https://www.youtube.com/watch?v=dNkEgO-CExg&list=PL3MmuxUbc_hJed7dXYoJw8DoCuVHhGEQb)
* [Workshop](1_terraform_gcp/terraform)
* Terraform Basice - Simple one file Terraform Deployment
* [Video](https://youtu.be/Y2ux7gq3Z0o)
* [Companion Notes](1_terraform_gcp)
* Terraform Continued - Terraform Deployment with a Variables File
* [Video](https://youtu.be/PBi0hHjLftk)
* [Companion Notes](1_terraform_gcp)
* Configuring terraform and GCP SDK on Windows
* [Instructions](1_terraform_gcp/windows.md)

Expand Down

0 comments on commit 96e87c0

Please sign in to comment.