From eb5b3d4acdd2121f25d2f3d5e2ba5bdee9b0b100 Mon Sep 17 00:00:00 2001 From: Tung Bui Date: Sat, 27 Jan 2024 14:28:04 +0700 Subject: [PATCH 1/5] prometheus: use common template --- topics/prometheus/README.md | 52 ++++++++++++++++--- topics/prometheus/advanced/README.md | 1 + .../prometheus-helloworld-cleanup.sh | 0 .../prometheus-helloworld.sh | 0 4 files changed, 45 insertions(+), 8 deletions(-) create mode 100644 topics/prometheus/advanced/README.md rename topics/prometheus/{hello-world => basic}/prometheus-helloworld-cleanup.sh (100%) mode change 100755 => 100644 rename topics/prometheus/{hello-world => basic}/prometheus-helloworld.sh (100%) mode change 100755 => 100644 diff --git a/topics/prometheus/README.md b/topics/prometheus/README.md index cacd914..4366586 100644 --- a/topics/prometheus/README.md +++ b/topics/prometheus/README.md @@ -1,19 +1,55 @@ -# What is Prometheus? +## What is Prometheus? + - https://prometheus.io/docs/introduction/overview/#what-is-prometheus +### Overview + +- Prometheus is an open-source systems monitoring and alerting toolkit originally built at SoundCloud. + +### Prometheus architecture -# Prometheus Architecture - (Image source provided by https://prometheus.io/docs/introduction/overview/#architecture) -# How to install Prometheus +### Official website documentation of Prometheus + +- https://prometheus.io/docs/introduction/overview/ + +## Prerequisites + +- Linux, Helm, k8s + +## Installation + +### How to install Prometheus? + - https://prometheus.io/docs/prometheus/latest/installation/ -# Prometheus Helloworld Hands-on -- Required knowledge in [helm](../../topics/helm/) | [k8s](../../topics/k8s/) first for better understanding. Because we will deploy our own Prometheus to K8s using Helm -- Run the demo scipt: `cd hello-world; ./prometheus-helloworld.sh` -- (Optional) Run the demo scipt and cleanup right after the demo: `cd hello-world; ./prometheus-helloworld.sh true` +## Basics of Prometheus + +### Prometheus getting started -# Getting started with Prometheus - https://prometheus.io/docs/prometheus/latest/getting_started/ + +### Prometheus Hello World + +- Required knowledge in [helm](../../topics/helm/) | [k8s](../../topics/k8s/) first for better understanding. Because we will deploy our own Prometheus to K8s using Helm +- Run the demo scipt: `cd basic; ./prometheus-helloworld.sh` +- (Optional) Run the demo scipt and cleanup right after the demo: `cd basic; ./prometheus-helloworld.sh true` + +## Beyond the Basics + +### Hands-On Example + +- Check the [advanced/](./advanced/) directory for more Prometheus examples. + +## More... + +### Prometheus cheatsheet + +- None + +### Recommended Books + +- None diff --git a/topics/prometheus/advanced/README.md b/topics/prometheus/advanced/README.md new file mode 100644 index 0000000..4640904 --- /dev/null +++ b/topics/prometheus/advanced/README.md @@ -0,0 +1 @@ +# TODO diff --git a/topics/prometheus/hello-world/prometheus-helloworld-cleanup.sh b/topics/prometheus/basic/prometheus-helloworld-cleanup.sh old mode 100755 new mode 100644 similarity index 100% rename from topics/prometheus/hello-world/prometheus-helloworld-cleanup.sh rename to topics/prometheus/basic/prometheus-helloworld-cleanup.sh diff --git a/topics/prometheus/hello-world/prometheus-helloworld.sh b/topics/prometheus/basic/prometheus-helloworld.sh old mode 100755 new mode 100644 similarity index 100% rename from topics/prometheus/hello-world/prometheus-helloworld.sh rename to topics/prometheus/basic/prometheus-helloworld.sh From eef0f419a63fd10ad471ec7f5eb2bc1a3b51de33 Mon Sep 17 00:00:00 2001 From: Tung Bui Date: Sat, 27 Jan 2024 14:31:37 +0700 Subject: [PATCH 2/5] python: use common template --- topics/python/README.md | 49 ++++++++++++++++++++++++++++++++--------- 1 file changed, 39 insertions(+), 10 deletions(-) diff --git a/topics/python/README.md b/topics/python/README.md index f25e86f..cf4e277 100644 --- a/topics/python/README.md +++ b/topics/python/README.md @@ -1,24 +1,53 @@ -# Python +## What is Python? -## Why python in DevOps? +### Overview -- Python's combination of simplicity, power, extensive libraries, community support, and adaptability to various DevOps tasks makes it a go-to language for many professionals in this field. Its effectiveness in automating workflows, managing infrastructure, and integrating with a plethora of tools solidifies its role as a key player in the DevOps landscape. +- Python's combination of simplicity, power, extensive libraries, community support, and adaptability to various DevOps tasks makes it a go-to language for many professionals in this field. +- Its effectiveness in automating workflows, managing infrastructure, and integrating with a plethora of tools solidifies its role as a key player in the DevOps landscape. -## Getting Started with Python +### Python workflow -- If you're new to Python, the Python Official Getting Started Guide provides comprehensive insights into setting up and beginning your Python journey. -- https://www.python.org/about/gettingstarted/ +- None + +### Official website documentation of Python + +- https://www.python.org/doc/ + +## Prerequisites -## Download Python +- None + +## Installation + +### How to install Python? - Visit the Python Downloads Page to access the latest version of Python suitable for your operating system. - https://www.python.org/downloads/ -## Python Hello World Example +## Basics of Python + +### Python getting started + +- If you're new to Python, the Python Official Getting Started Guide provides comprehensive insights into setting up and beginning your Python journey. +- https://www.python.org/about/gettingstarted/ + +### Python Hello World - Explore the [helloworld.py](./basic/helloworld.py) file in the helloworld directory to get a basic introduction to running a Python script. - Run `cd helloworld; python3 helloworld.py` -## Python script example +## Beyond the Basics + +### Hands-On Example + +- Find more examples at [advanced](./advanced/) + +## More... + +### Python cheatsheet + +- None + +### Recommended Books -- Find more examples at [examples](./examples/) +- None From 4a019d34540164a7bc38bbd956f2c30f7ffe30b5 Mon Sep 17 00:00:00 2001 From: Tung Bui Date: Sat, 27 Jan 2024 14:37:04 +0700 Subject: [PATCH 3/5] shell: use common template --- topics/shell/README.md | 53 +++++++++++++++++-- .../shell/{ => advanced}/examples/README.md | 0 topics/shell/{ => advanced}/examples/list.sh | 0 .../shell/{ => advanced}/excercise/README.md | 0 .../answers/01_system_health_check.sh | 0 topics/shell/{ => basic}/basic.sh | 0 topics/shell/{ => basic}/data/example.json | 0 .../shell/{ => basic}/data/grep_example.txt | 0 topics/shell/{ => basic}/data/one.txt | 0 topics/shell/{ => basic}/data/three.txt | 0 topics/shell/{ => basic}/data/two.txt | 0 11 files changed, 49 insertions(+), 4 deletions(-) rename topics/shell/{ => advanced}/examples/README.md (100%) rename topics/shell/{ => advanced}/examples/list.sh (100%) rename topics/shell/{ => advanced}/excercise/README.md (100%) rename topics/shell/{ => advanced}/excercise/answers/01_system_health_check.sh (100%) rename topics/shell/{ => basic}/basic.sh (100%) mode change 100755 => 100644 rename topics/shell/{ => basic}/data/example.json (100%) mode change 100755 => 100644 rename topics/shell/{ => basic}/data/grep_example.txt (100%) rename topics/shell/{ => basic}/data/one.txt (100%) rename topics/shell/{ => basic}/data/three.txt (100%) rename topics/shell/{ => basic}/data/two.txt (100%) diff --git a/topics/shell/README.md b/topics/shell/README.md index 3e0bfbd..6918b5d 100644 --- a/topics/shell/README.md +++ b/topics/shell/README.md @@ -1,7 +1,52 @@ -# Get started at +## What is Shell? -- [basic](./basic.sh) +### Overview -# Do some practice execise at +- A shell script is a computer program designed to be run by a Unix shell, a command-line interpreter. The various dialects of shell scripts are considered to be scripting languages. +- Typical operations performed by shell scripts include file manipulation, program execution, and printing text. A script which sets up the environment, runs the program, and does any necessary cleanup or logging, is called a wrapper. -- [excercise](./excercise/) +### Shell workflow + +- None + +### Official website documentation of Shell + +- https://en.wikipedia.org/wiki/Shell_script + +## Prerequisites + +- K8s, docker, linux + +## Installation + +### How to install Shell? + +### Install Shell with Docker + +- Just install Linux then you would have shell enviroment as well + +## Basics of Shell + +### Shell getting started + +- https://www.shellscript.sh/ + +### Shell Hello World + +- See: [basic](./basic/) + +## Beyond the Basics + +### Hands-On Example + +- Do more practice execises at [advanced](./advanced/) + +## More... + +### Shell cheatsheet + +- None + +### Recommended Books + +- None diff --git a/topics/shell/examples/README.md b/topics/shell/advanced/examples/README.md similarity index 100% rename from topics/shell/examples/README.md rename to topics/shell/advanced/examples/README.md diff --git a/topics/shell/examples/list.sh b/topics/shell/advanced/examples/list.sh similarity index 100% rename from topics/shell/examples/list.sh rename to topics/shell/advanced/examples/list.sh diff --git a/topics/shell/excercise/README.md b/topics/shell/advanced/excercise/README.md similarity index 100% rename from topics/shell/excercise/README.md rename to topics/shell/advanced/excercise/README.md diff --git a/topics/shell/excercise/answers/01_system_health_check.sh b/topics/shell/advanced/excercise/answers/01_system_health_check.sh similarity index 100% rename from topics/shell/excercise/answers/01_system_health_check.sh rename to topics/shell/advanced/excercise/answers/01_system_health_check.sh diff --git a/topics/shell/basic.sh b/topics/shell/basic/basic.sh old mode 100755 new mode 100644 similarity index 100% rename from topics/shell/basic.sh rename to topics/shell/basic/basic.sh diff --git a/topics/shell/data/example.json b/topics/shell/basic/data/example.json old mode 100755 new mode 100644 similarity index 100% rename from topics/shell/data/example.json rename to topics/shell/basic/data/example.json diff --git a/topics/shell/data/grep_example.txt b/topics/shell/basic/data/grep_example.txt similarity index 100% rename from topics/shell/data/grep_example.txt rename to topics/shell/basic/data/grep_example.txt diff --git a/topics/shell/data/one.txt b/topics/shell/basic/data/one.txt similarity index 100% rename from topics/shell/data/one.txt rename to topics/shell/basic/data/one.txt diff --git a/topics/shell/data/three.txt b/topics/shell/basic/data/three.txt similarity index 100% rename from topics/shell/data/three.txt rename to topics/shell/basic/data/three.txt diff --git a/topics/shell/data/two.txt b/topics/shell/basic/data/two.txt similarity index 100% rename from topics/shell/data/two.txt rename to topics/shell/basic/data/two.txt From 9c5ae977cdeff7f96fb7ec38c2f0f4fdb8e4741a Mon Sep 17 00:00:00 2001 From: Tung Bui Date: Sat, 27 Jan 2024 14:37:30 +0700 Subject: [PATCH 4/5] shell: use common template.v1 --- topics/shell/README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/topics/shell/README.md b/topics/shell/README.md index 6918b5d..ad223e8 100644 --- a/topics/shell/README.md +++ b/topics/shell/README.md @@ -21,8 +21,6 @@ ### How to install Shell? -### Install Shell with Docker - - Just install Linux then you would have shell enviroment as well ## Basics of Shell From d5a2240c8d092f468f288eb7003894787e4a6d41 Mon Sep 17 00:00:00 2001 From: Tung Bui Date: Sat, 27 Jan 2024 14:44:58 +0700 Subject: [PATCH 5/5] terraform: use common template --- topics/terraform/README.md | 48 +++++++++++++++---- .../aws-three-tier/dev/.terraform.lock.hcl | 0 .../aws-three-tier/dev/install_apache.sh | 0 .../aws-three-tier/dev/install_node.sh | 0 .../{ => advanced}/aws-three-tier/dev/main.tf | 0 .../aws-three-tier/dev/outputs.tf | 0 .../aws-three-tier/dev/variables.tf | 0 .../three-tier-deployment/compute/main.tf | 0 .../three-tier-deployment/compute/outputs.tf | 0 .../compute/variables.tf | 0 .../three-tier-deployment/database/main.tf | 0 .../three-tier-deployment/database/outputs.tf | 0 .../database/variables.tf | 0 .../loadbalancing/main.tf | 0 .../loadbalancing/outputs.tf | 0 .../loadbalancing/variables.tf | 0 .../three-tier-deployment/networking/main.tf | 0 .../networking/outputs.tf | 0 .../networking/variables.tf | 0 .../{ => advanced}/docker/.terraform.lock.hcl | 0 .../terraform/{ => advanced}/docker/main.tf | 0 .../cluster-web-server/.terraform.lock.hcl | 0 .../cluster-web-server/main.tf | 0 .../cluster-web-server/outputs.tf | 0 .../cluster-web-server/variables.tf | 0 .../single-web-server/.terraform.lock.hcl | 0 .../single-web-server/main.tf | 0 .../global/s3-dynamo/.terraform.lock.hcl | 0 .../global/s3-dynamo/main.tf | 0 .../global/s3-dynamo/outputs.tf | 0 .../global/s3-dynamo/variables.tf | 0 .../stage/datastore/mysql/.terraform.lock.hcl | 0 .../stage/datastore/mysql/main.tf | 0 .../stage/datastore/mysql/outputs.tf | 0 .../stage/datastore/mysql/variables.tf | 0 .../webserver-cluster/.terraform.lock.hcl | 0 .../stage/service/webserver-cluster/main.tf | 0 .../service/webserver-cluster/outputs.tf | 0 .../service/webserver-cluster/user-data.sh | 0 .../service/webserver-cluster/variables.tf | 0 .../asg-webserver-cluster/asg-user-data.sh | 0 .../services/asg-webserver-cluster/main.tf | 0 .../services/asg-webserver-cluster/outputs.tf | 0 .../asg-webserver-cluster/variables.tf | 0 .../services/webserver-cluster/main.tf | 0 .../services/webserver-cluster/outputs.tf | 0 .../services/webserver-cluster/user-data.sh | 0 .../services/webserver-cluster/variables.tf | 0 .../prod/services/webserver-cluster/main.tf | 0 .../stage/datastore/mysql/.terraform.lock.hcl | 0 .../stage/datastore/mysql/main.tf | 0 .../stage/datastore/mysql/outputs.tf | 0 .../stage/datastore/mysql/variables.tf | 0 .../alb-webserver/.terraform.lock.hcl | 0 .../stage/services/alb-webserver/main.tf | 0 .../stage/services/alb-webserver/outputs.tf | 0 .../webserver-cluster/.terraform.lock.hcl | 0 .../stage/services/webserver-cluster/main.tf | 0 .../practice-scripts/README.md | 0 .../asg-destroy-practice-resource.sh | 0 .../asg-start-practice-resource.sh | 0 .../destroy-practice-resource.sh | 0 .../start-practice-resource.sh | 0 .../tf-backend/create-tf-backend.sh | 0 .../tf-backend/destroy-tf-backend.sh | 0 topics/terraform/basic/README.md | 5 ++ .../aws-ec2/.terraform.lock.hcl | 0 .../{hello-world => basic}/aws-ec2/main.tf | 0 .../{hello-world => basic}/aws-ec2/outputs.tf | 0 .../aws-ec2/variables.tf | 0 .../terraform-helloworld.sh | 0 71 files changed, 44 insertions(+), 9 deletions(-) rename topics/terraform/{ => advanced}/aws-three-tier/dev/.terraform.lock.hcl (100%) rename topics/terraform/{ => advanced}/aws-three-tier/dev/install_apache.sh (100%) rename topics/terraform/{ => advanced}/aws-three-tier/dev/install_node.sh (100%) rename topics/terraform/{ => advanced}/aws-three-tier/dev/main.tf (100%) rename topics/terraform/{ => advanced}/aws-three-tier/dev/outputs.tf (100%) rename topics/terraform/{ => advanced}/aws-three-tier/dev/variables.tf (100%) rename topics/terraform/{ => advanced}/aws-three-tier/modules/three-tier-deployment/compute/main.tf (100%) rename topics/terraform/{ => advanced}/aws-three-tier/modules/three-tier-deployment/compute/outputs.tf (100%) rename topics/terraform/{ => advanced}/aws-three-tier/modules/three-tier-deployment/compute/variables.tf (100%) rename topics/terraform/{ => advanced}/aws-three-tier/modules/three-tier-deployment/database/main.tf (100%) rename topics/terraform/{ => advanced}/aws-three-tier/modules/three-tier-deployment/database/outputs.tf (100%) rename topics/terraform/{ => advanced}/aws-three-tier/modules/three-tier-deployment/database/variables.tf (100%) rename topics/terraform/{ => advanced}/aws-three-tier/modules/three-tier-deployment/loadbalancing/main.tf (100%) rename topics/terraform/{ => advanced}/aws-three-tier/modules/three-tier-deployment/loadbalancing/outputs.tf (100%) rename topics/terraform/{ => advanced}/aws-three-tier/modules/three-tier-deployment/loadbalancing/variables.tf (100%) rename topics/terraform/{ => advanced}/aws-three-tier/modules/three-tier-deployment/networking/main.tf (100%) rename topics/terraform/{ => advanced}/aws-three-tier/modules/three-tier-deployment/networking/outputs.tf (100%) rename topics/terraform/{ => advanced}/aws-three-tier/modules/three-tier-deployment/networking/variables.tf (100%) rename topics/terraform/{ => advanced}/docker/.terraform.lock.hcl (100%) rename topics/terraform/{ => advanced}/docker/main.tf (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap02-getting-started/cluster-web-server/.terraform.lock.hcl (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap02-getting-started/cluster-web-server/main.tf (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap02-getting-started/cluster-web-server/outputs.tf (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap02-getting-started/cluster-web-server/variables.tf (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap02-getting-started/single-web-server/.terraform.lock.hcl (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap02-getting-started/single-web-server/main.tf (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap03-terraform-state/global/s3-dynamo/.terraform.lock.hcl (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap03-terraform-state/global/s3-dynamo/main.tf (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap03-terraform-state/global/s3-dynamo/outputs.tf (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap03-terraform-state/global/s3-dynamo/variables.tf (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap03-terraform-state/stage/datastore/mysql/.terraform.lock.hcl (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap03-terraform-state/stage/datastore/mysql/main.tf (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap03-terraform-state/stage/datastore/mysql/outputs.tf (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap03-terraform-state/stage/datastore/mysql/variables.tf (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap03-terraform-state/stage/service/webserver-cluster/.terraform.lock.hcl (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap03-terraform-state/stage/service/webserver-cluster/main.tf (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap03-terraform-state/stage/service/webserver-cluster/outputs.tf (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap03-terraform-state/stage/service/webserver-cluster/user-data.sh (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap03-terraform-state/stage/service/webserver-cluster/variables.tf (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap04-reusable-module/modules/services/asg-webserver-cluster/asg-user-data.sh (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap04-reusable-module/modules/services/asg-webserver-cluster/main.tf (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap04-reusable-module/modules/services/asg-webserver-cluster/outputs.tf (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap04-reusable-module/modules/services/asg-webserver-cluster/variables.tf (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap04-reusable-module/modules/services/webserver-cluster/main.tf (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap04-reusable-module/modules/services/webserver-cluster/outputs.tf (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap04-reusable-module/modules/services/webserver-cluster/user-data.sh (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap04-reusable-module/modules/services/webserver-cluster/variables.tf (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap04-reusable-module/prod/services/webserver-cluster/main.tf (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap04-reusable-module/stage/datastore/mysql/.terraform.lock.hcl (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap04-reusable-module/stage/datastore/mysql/main.tf (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap04-reusable-module/stage/datastore/mysql/outputs.tf (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap04-reusable-module/stage/datastore/mysql/variables.tf (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap04-reusable-module/stage/services/alb-webserver/.terraform.lock.hcl (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap04-reusable-module/stage/services/alb-webserver/main.tf (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap04-reusable-module/stage/services/alb-webserver/outputs.tf (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap04-reusable-module/stage/services/webserver-cluster/.terraform.lock.hcl (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/chap04-reusable-module/stage/services/webserver-cluster/main.tf (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/practice-scripts/README.md (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/practice-scripts/chap04-alb-instance/asg-destroy-practice-resource.sh (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/practice-scripts/chap04-alb-instance/asg-start-practice-resource.sh (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/practice-scripts/chap04-single-instance/destroy-practice-resource.sh (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/practice-scripts/chap04-single-instance/start-practice-resource.sh (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/practice-scripts/tf-backend/create-tf-backend.sh (100%) rename topics/terraform/{ => advanced}/terraform-up-and-running/practice-scripts/tf-backend/destroy-tf-backend.sh (100%) create mode 100644 topics/terraform/basic/README.md rename topics/terraform/{hello-world => basic}/aws-ec2/.terraform.lock.hcl (100%) rename topics/terraform/{hello-world => basic}/aws-ec2/main.tf (100%) rename topics/terraform/{hello-world => basic}/aws-ec2/outputs.tf (100%) rename topics/terraform/{hello-world => basic}/aws-ec2/variables.tf (100%) rename topics/terraform/{hello-world => basic}/terraform-helloworld.sh (100%) diff --git a/topics/terraform/README.md b/topics/terraform/README.md index 079f25d..b55c98c 100644 --- a/topics/terraform/README.md +++ b/topics/terraform/README.md @@ -1,27 +1,57 @@ -# What is Terraform? +## What is Terraform? - https://developer.hashicorp.com/terraform/intro -# How does Terraform work? +### Overview + +- HashiCorp Terraform is an infrastructure as code tool that lets you define both cloud and on-prem resources in human-readable configuration files that you can version, reuse, and share. +- You can then use a consistent workflow to provision and manage all of your infrastructure throughout its lifecycle. Terraform can manage low-level components like compute, storage, and networking resources, as well as high-level components like DNS entries and SaaS features. + +### Terraform workflow - https://developer.hashicorp.com/terraform/intro#how-does-terraform-work -# Why Terraform? +### Official website documentation of Terraform + +- https://developer.hashicorp.com/terraform/docs + +## Prerequisites -- https://developer.hashicorp.com/terraform/intro#why-terraform +- Basic linux command line skill and IaC concepts +- Cloud (if working with cloud provider) -# How to install terraform +## Installation + +### How to install Terraform? - https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli -# Getting started with Terraform +## Basics of Terraform + +### Terraform getting started - https://developer.hashicorp.com/terraform/tutorials/aws-get-started -# To get more hands on example +### Terraform Hello World + +- See: [basic](./basic/) -- Visit [aws-lab-with-terraform](https://github.com/tungbq/aws-lab-with-terraform) +## Beyond the Basics -# Looking for a Terraform sample project with best practice? +### Hands-On Example + +- For more hands-on examples, visit [aws-lab-with-terraform projects](https://github.com/tungbq/aws-lab-with-terraform) + +## More... + +### Looking for a Terraform sample project with best practice? - Check out: [terraform-sample-project](https://github.com/tungbq/terraform-sample-project) + +### Terraform cheatsheet + +- None + +### Recommended Books + +- None diff --git a/topics/terraform/aws-three-tier/dev/.terraform.lock.hcl b/topics/terraform/advanced/aws-three-tier/dev/.terraform.lock.hcl similarity index 100% rename from topics/terraform/aws-three-tier/dev/.terraform.lock.hcl rename to topics/terraform/advanced/aws-three-tier/dev/.terraform.lock.hcl diff --git a/topics/terraform/aws-three-tier/dev/install_apache.sh b/topics/terraform/advanced/aws-three-tier/dev/install_apache.sh similarity index 100% rename from topics/terraform/aws-three-tier/dev/install_apache.sh rename to topics/terraform/advanced/aws-three-tier/dev/install_apache.sh diff --git a/topics/terraform/aws-three-tier/dev/install_node.sh b/topics/terraform/advanced/aws-three-tier/dev/install_node.sh similarity index 100% rename from topics/terraform/aws-three-tier/dev/install_node.sh rename to topics/terraform/advanced/aws-three-tier/dev/install_node.sh diff --git a/topics/terraform/aws-three-tier/dev/main.tf b/topics/terraform/advanced/aws-three-tier/dev/main.tf similarity index 100% rename from topics/terraform/aws-three-tier/dev/main.tf rename to topics/terraform/advanced/aws-three-tier/dev/main.tf diff --git a/topics/terraform/aws-three-tier/dev/outputs.tf b/topics/terraform/advanced/aws-three-tier/dev/outputs.tf similarity index 100% rename from topics/terraform/aws-three-tier/dev/outputs.tf rename to topics/terraform/advanced/aws-three-tier/dev/outputs.tf diff --git a/topics/terraform/aws-three-tier/dev/variables.tf b/topics/terraform/advanced/aws-three-tier/dev/variables.tf similarity index 100% rename from topics/terraform/aws-three-tier/dev/variables.tf rename to topics/terraform/advanced/aws-three-tier/dev/variables.tf diff --git a/topics/terraform/aws-three-tier/modules/three-tier-deployment/compute/main.tf b/topics/terraform/advanced/aws-three-tier/modules/three-tier-deployment/compute/main.tf similarity index 100% rename from topics/terraform/aws-three-tier/modules/three-tier-deployment/compute/main.tf rename to topics/terraform/advanced/aws-three-tier/modules/three-tier-deployment/compute/main.tf diff --git a/topics/terraform/aws-three-tier/modules/three-tier-deployment/compute/outputs.tf b/topics/terraform/advanced/aws-three-tier/modules/three-tier-deployment/compute/outputs.tf similarity index 100% rename from topics/terraform/aws-three-tier/modules/three-tier-deployment/compute/outputs.tf rename to topics/terraform/advanced/aws-three-tier/modules/three-tier-deployment/compute/outputs.tf diff --git a/topics/terraform/aws-three-tier/modules/three-tier-deployment/compute/variables.tf b/topics/terraform/advanced/aws-three-tier/modules/three-tier-deployment/compute/variables.tf similarity index 100% rename from topics/terraform/aws-three-tier/modules/three-tier-deployment/compute/variables.tf rename to topics/terraform/advanced/aws-three-tier/modules/three-tier-deployment/compute/variables.tf diff --git a/topics/terraform/aws-three-tier/modules/three-tier-deployment/database/main.tf b/topics/terraform/advanced/aws-three-tier/modules/three-tier-deployment/database/main.tf similarity index 100% rename from topics/terraform/aws-three-tier/modules/three-tier-deployment/database/main.tf rename to topics/terraform/advanced/aws-three-tier/modules/three-tier-deployment/database/main.tf diff --git a/topics/terraform/aws-three-tier/modules/three-tier-deployment/database/outputs.tf b/topics/terraform/advanced/aws-three-tier/modules/three-tier-deployment/database/outputs.tf similarity index 100% rename from topics/terraform/aws-three-tier/modules/three-tier-deployment/database/outputs.tf rename to topics/terraform/advanced/aws-three-tier/modules/three-tier-deployment/database/outputs.tf diff --git a/topics/terraform/aws-three-tier/modules/three-tier-deployment/database/variables.tf b/topics/terraform/advanced/aws-three-tier/modules/three-tier-deployment/database/variables.tf similarity index 100% rename from topics/terraform/aws-three-tier/modules/three-tier-deployment/database/variables.tf rename to topics/terraform/advanced/aws-three-tier/modules/three-tier-deployment/database/variables.tf diff --git a/topics/terraform/aws-three-tier/modules/three-tier-deployment/loadbalancing/main.tf b/topics/terraform/advanced/aws-three-tier/modules/three-tier-deployment/loadbalancing/main.tf similarity index 100% rename from topics/terraform/aws-three-tier/modules/three-tier-deployment/loadbalancing/main.tf rename to topics/terraform/advanced/aws-three-tier/modules/three-tier-deployment/loadbalancing/main.tf diff --git a/topics/terraform/aws-three-tier/modules/three-tier-deployment/loadbalancing/outputs.tf b/topics/terraform/advanced/aws-three-tier/modules/three-tier-deployment/loadbalancing/outputs.tf similarity index 100% rename from topics/terraform/aws-three-tier/modules/three-tier-deployment/loadbalancing/outputs.tf rename to topics/terraform/advanced/aws-three-tier/modules/three-tier-deployment/loadbalancing/outputs.tf diff --git a/topics/terraform/aws-three-tier/modules/three-tier-deployment/loadbalancing/variables.tf b/topics/terraform/advanced/aws-three-tier/modules/three-tier-deployment/loadbalancing/variables.tf similarity index 100% rename from topics/terraform/aws-three-tier/modules/three-tier-deployment/loadbalancing/variables.tf rename to topics/terraform/advanced/aws-three-tier/modules/three-tier-deployment/loadbalancing/variables.tf diff --git a/topics/terraform/aws-three-tier/modules/three-tier-deployment/networking/main.tf b/topics/terraform/advanced/aws-three-tier/modules/three-tier-deployment/networking/main.tf similarity index 100% rename from topics/terraform/aws-three-tier/modules/three-tier-deployment/networking/main.tf rename to topics/terraform/advanced/aws-three-tier/modules/three-tier-deployment/networking/main.tf diff --git a/topics/terraform/aws-three-tier/modules/three-tier-deployment/networking/outputs.tf b/topics/terraform/advanced/aws-three-tier/modules/three-tier-deployment/networking/outputs.tf similarity index 100% rename from topics/terraform/aws-three-tier/modules/three-tier-deployment/networking/outputs.tf rename to topics/terraform/advanced/aws-three-tier/modules/three-tier-deployment/networking/outputs.tf diff --git a/topics/terraform/aws-three-tier/modules/three-tier-deployment/networking/variables.tf b/topics/terraform/advanced/aws-three-tier/modules/three-tier-deployment/networking/variables.tf similarity index 100% rename from topics/terraform/aws-three-tier/modules/three-tier-deployment/networking/variables.tf rename to topics/terraform/advanced/aws-three-tier/modules/three-tier-deployment/networking/variables.tf diff --git a/topics/terraform/docker/.terraform.lock.hcl b/topics/terraform/advanced/docker/.terraform.lock.hcl similarity index 100% rename from topics/terraform/docker/.terraform.lock.hcl rename to topics/terraform/advanced/docker/.terraform.lock.hcl diff --git a/topics/terraform/docker/main.tf b/topics/terraform/advanced/docker/main.tf similarity index 100% rename from topics/terraform/docker/main.tf rename to topics/terraform/advanced/docker/main.tf diff --git a/topics/terraform/terraform-up-and-running/chap02-getting-started/cluster-web-server/.terraform.lock.hcl b/topics/terraform/advanced/terraform-up-and-running/chap02-getting-started/cluster-web-server/.terraform.lock.hcl similarity index 100% rename from topics/terraform/terraform-up-and-running/chap02-getting-started/cluster-web-server/.terraform.lock.hcl rename to topics/terraform/advanced/terraform-up-and-running/chap02-getting-started/cluster-web-server/.terraform.lock.hcl diff --git a/topics/terraform/terraform-up-and-running/chap02-getting-started/cluster-web-server/main.tf b/topics/terraform/advanced/terraform-up-and-running/chap02-getting-started/cluster-web-server/main.tf similarity index 100% rename from topics/terraform/terraform-up-and-running/chap02-getting-started/cluster-web-server/main.tf rename to topics/terraform/advanced/terraform-up-and-running/chap02-getting-started/cluster-web-server/main.tf diff --git a/topics/terraform/terraform-up-and-running/chap02-getting-started/cluster-web-server/outputs.tf b/topics/terraform/advanced/terraform-up-and-running/chap02-getting-started/cluster-web-server/outputs.tf similarity index 100% rename from topics/terraform/terraform-up-and-running/chap02-getting-started/cluster-web-server/outputs.tf rename to topics/terraform/advanced/terraform-up-and-running/chap02-getting-started/cluster-web-server/outputs.tf diff --git a/topics/terraform/terraform-up-and-running/chap02-getting-started/cluster-web-server/variables.tf b/topics/terraform/advanced/terraform-up-and-running/chap02-getting-started/cluster-web-server/variables.tf similarity index 100% rename from topics/terraform/terraform-up-and-running/chap02-getting-started/cluster-web-server/variables.tf rename to topics/terraform/advanced/terraform-up-and-running/chap02-getting-started/cluster-web-server/variables.tf diff --git a/topics/terraform/terraform-up-and-running/chap02-getting-started/single-web-server/.terraform.lock.hcl b/topics/terraform/advanced/terraform-up-and-running/chap02-getting-started/single-web-server/.terraform.lock.hcl similarity index 100% rename from topics/terraform/terraform-up-and-running/chap02-getting-started/single-web-server/.terraform.lock.hcl rename to topics/terraform/advanced/terraform-up-and-running/chap02-getting-started/single-web-server/.terraform.lock.hcl diff --git a/topics/terraform/terraform-up-and-running/chap02-getting-started/single-web-server/main.tf b/topics/terraform/advanced/terraform-up-and-running/chap02-getting-started/single-web-server/main.tf similarity index 100% rename from topics/terraform/terraform-up-and-running/chap02-getting-started/single-web-server/main.tf rename to topics/terraform/advanced/terraform-up-and-running/chap02-getting-started/single-web-server/main.tf diff --git a/topics/terraform/terraform-up-and-running/chap03-terraform-state/global/s3-dynamo/.terraform.lock.hcl b/topics/terraform/advanced/terraform-up-and-running/chap03-terraform-state/global/s3-dynamo/.terraform.lock.hcl similarity index 100% rename from topics/terraform/terraform-up-and-running/chap03-terraform-state/global/s3-dynamo/.terraform.lock.hcl rename to topics/terraform/advanced/terraform-up-and-running/chap03-terraform-state/global/s3-dynamo/.terraform.lock.hcl diff --git a/topics/terraform/terraform-up-and-running/chap03-terraform-state/global/s3-dynamo/main.tf b/topics/terraform/advanced/terraform-up-and-running/chap03-terraform-state/global/s3-dynamo/main.tf similarity index 100% rename from topics/terraform/terraform-up-and-running/chap03-terraform-state/global/s3-dynamo/main.tf rename to topics/terraform/advanced/terraform-up-and-running/chap03-terraform-state/global/s3-dynamo/main.tf diff --git a/topics/terraform/terraform-up-and-running/chap03-terraform-state/global/s3-dynamo/outputs.tf b/topics/terraform/advanced/terraform-up-and-running/chap03-terraform-state/global/s3-dynamo/outputs.tf similarity index 100% rename from topics/terraform/terraform-up-and-running/chap03-terraform-state/global/s3-dynamo/outputs.tf rename to topics/terraform/advanced/terraform-up-and-running/chap03-terraform-state/global/s3-dynamo/outputs.tf diff --git a/topics/terraform/terraform-up-and-running/chap03-terraform-state/global/s3-dynamo/variables.tf b/topics/terraform/advanced/terraform-up-and-running/chap03-terraform-state/global/s3-dynamo/variables.tf similarity index 100% rename from topics/terraform/terraform-up-and-running/chap03-terraform-state/global/s3-dynamo/variables.tf rename to topics/terraform/advanced/terraform-up-and-running/chap03-terraform-state/global/s3-dynamo/variables.tf diff --git a/topics/terraform/terraform-up-and-running/chap03-terraform-state/stage/datastore/mysql/.terraform.lock.hcl b/topics/terraform/advanced/terraform-up-and-running/chap03-terraform-state/stage/datastore/mysql/.terraform.lock.hcl similarity index 100% rename from topics/terraform/terraform-up-and-running/chap03-terraform-state/stage/datastore/mysql/.terraform.lock.hcl rename to topics/terraform/advanced/terraform-up-and-running/chap03-terraform-state/stage/datastore/mysql/.terraform.lock.hcl diff --git a/topics/terraform/terraform-up-and-running/chap03-terraform-state/stage/datastore/mysql/main.tf b/topics/terraform/advanced/terraform-up-and-running/chap03-terraform-state/stage/datastore/mysql/main.tf similarity index 100% rename from topics/terraform/terraform-up-and-running/chap03-terraform-state/stage/datastore/mysql/main.tf rename to topics/terraform/advanced/terraform-up-and-running/chap03-terraform-state/stage/datastore/mysql/main.tf diff --git a/topics/terraform/terraform-up-and-running/chap03-terraform-state/stage/datastore/mysql/outputs.tf b/topics/terraform/advanced/terraform-up-and-running/chap03-terraform-state/stage/datastore/mysql/outputs.tf similarity index 100% rename from topics/terraform/terraform-up-and-running/chap03-terraform-state/stage/datastore/mysql/outputs.tf rename to topics/terraform/advanced/terraform-up-and-running/chap03-terraform-state/stage/datastore/mysql/outputs.tf diff --git a/topics/terraform/terraform-up-and-running/chap03-terraform-state/stage/datastore/mysql/variables.tf b/topics/terraform/advanced/terraform-up-and-running/chap03-terraform-state/stage/datastore/mysql/variables.tf similarity index 100% rename from topics/terraform/terraform-up-and-running/chap03-terraform-state/stage/datastore/mysql/variables.tf rename to topics/terraform/advanced/terraform-up-and-running/chap03-terraform-state/stage/datastore/mysql/variables.tf diff --git a/topics/terraform/terraform-up-and-running/chap03-terraform-state/stage/service/webserver-cluster/.terraform.lock.hcl b/topics/terraform/advanced/terraform-up-and-running/chap03-terraform-state/stage/service/webserver-cluster/.terraform.lock.hcl similarity index 100% rename from topics/terraform/terraform-up-and-running/chap03-terraform-state/stage/service/webserver-cluster/.terraform.lock.hcl rename to topics/terraform/advanced/terraform-up-and-running/chap03-terraform-state/stage/service/webserver-cluster/.terraform.lock.hcl diff --git a/topics/terraform/terraform-up-and-running/chap03-terraform-state/stage/service/webserver-cluster/main.tf b/topics/terraform/advanced/terraform-up-and-running/chap03-terraform-state/stage/service/webserver-cluster/main.tf similarity index 100% rename from topics/terraform/terraform-up-and-running/chap03-terraform-state/stage/service/webserver-cluster/main.tf rename to topics/terraform/advanced/terraform-up-and-running/chap03-terraform-state/stage/service/webserver-cluster/main.tf diff --git a/topics/terraform/terraform-up-and-running/chap03-terraform-state/stage/service/webserver-cluster/outputs.tf b/topics/terraform/advanced/terraform-up-and-running/chap03-terraform-state/stage/service/webserver-cluster/outputs.tf similarity index 100% rename from topics/terraform/terraform-up-and-running/chap03-terraform-state/stage/service/webserver-cluster/outputs.tf rename to topics/terraform/advanced/terraform-up-and-running/chap03-terraform-state/stage/service/webserver-cluster/outputs.tf diff --git a/topics/terraform/terraform-up-and-running/chap03-terraform-state/stage/service/webserver-cluster/user-data.sh b/topics/terraform/advanced/terraform-up-and-running/chap03-terraform-state/stage/service/webserver-cluster/user-data.sh similarity index 100% rename from topics/terraform/terraform-up-and-running/chap03-terraform-state/stage/service/webserver-cluster/user-data.sh rename to topics/terraform/advanced/terraform-up-and-running/chap03-terraform-state/stage/service/webserver-cluster/user-data.sh diff --git a/topics/terraform/terraform-up-and-running/chap03-terraform-state/stage/service/webserver-cluster/variables.tf b/topics/terraform/advanced/terraform-up-and-running/chap03-terraform-state/stage/service/webserver-cluster/variables.tf similarity index 100% rename from topics/terraform/terraform-up-and-running/chap03-terraform-state/stage/service/webserver-cluster/variables.tf rename to topics/terraform/advanced/terraform-up-and-running/chap03-terraform-state/stage/service/webserver-cluster/variables.tf diff --git a/topics/terraform/terraform-up-and-running/chap04-reusable-module/modules/services/asg-webserver-cluster/asg-user-data.sh b/topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/modules/services/asg-webserver-cluster/asg-user-data.sh similarity index 100% rename from topics/terraform/terraform-up-and-running/chap04-reusable-module/modules/services/asg-webserver-cluster/asg-user-data.sh rename to topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/modules/services/asg-webserver-cluster/asg-user-data.sh diff --git a/topics/terraform/terraform-up-and-running/chap04-reusable-module/modules/services/asg-webserver-cluster/main.tf b/topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/modules/services/asg-webserver-cluster/main.tf similarity index 100% rename from topics/terraform/terraform-up-and-running/chap04-reusable-module/modules/services/asg-webserver-cluster/main.tf rename to topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/modules/services/asg-webserver-cluster/main.tf diff --git a/topics/terraform/terraform-up-and-running/chap04-reusable-module/modules/services/asg-webserver-cluster/outputs.tf b/topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/modules/services/asg-webserver-cluster/outputs.tf similarity index 100% rename from topics/terraform/terraform-up-and-running/chap04-reusable-module/modules/services/asg-webserver-cluster/outputs.tf rename to topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/modules/services/asg-webserver-cluster/outputs.tf diff --git a/topics/terraform/terraform-up-and-running/chap04-reusable-module/modules/services/asg-webserver-cluster/variables.tf b/topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/modules/services/asg-webserver-cluster/variables.tf similarity index 100% rename from topics/terraform/terraform-up-and-running/chap04-reusable-module/modules/services/asg-webserver-cluster/variables.tf rename to topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/modules/services/asg-webserver-cluster/variables.tf diff --git a/topics/terraform/terraform-up-and-running/chap04-reusable-module/modules/services/webserver-cluster/main.tf b/topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/modules/services/webserver-cluster/main.tf similarity index 100% rename from topics/terraform/terraform-up-and-running/chap04-reusable-module/modules/services/webserver-cluster/main.tf rename to topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/modules/services/webserver-cluster/main.tf diff --git a/topics/terraform/terraform-up-and-running/chap04-reusable-module/modules/services/webserver-cluster/outputs.tf b/topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/modules/services/webserver-cluster/outputs.tf similarity index 100% rename from topics/terraform/terraform-up-and-running/chap04-reusable-module/modules/services/webserver-cluster/outputs.tf rename to topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/modules/services/webserver-cluster/outputs.tf diff --git a/topics/terraform/terraform-up-and-running/chap04-reusable-module/modules/services/webserver-cluster/user-data.sh b/topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/modules/services/webserver-cluster/user-data.sh similarity index 100% rename from topics/terraform/terraform-up-and-running/chap04-reusable-module/modules/services/webserver-cluster/user-data.sh rename to topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/modules/services/webserver-cluster/user-data.sh diff --git a/topics/terraform/terraform-up-and-running/chap04-reusable-module/modules/services/webserver-cluster/variables.tf b/topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/modules/services/webserver-cluster/variables.tf similarity index 100% rename from topics/terraform/terraform-up-and-running/chap04-reusable-module/modules/services/webserver-cluster/variables.tf rename to topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/modules/services/webserver-cluster/variables.tf diff --git a/topics/terraform/terraform-up-and-running/chap04-reusable-module/prod/services/webserver-cluster/main.tf b/topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/prod/services/webserver-cluster/main.tf similarity index 100% rename from topics/terraform/terraform-up-and-running/chap04-reusable-module/prod/services/webserver-cluster/main.tf rename to topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/prod/services/webserver-cluster/main.tf diff --git a/topics/terraform/terraform-up-and-running/chap04-reusable-module/stage/datastore/mysql/.terraform.lock.hcl b/topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/stage/datastore/mysql/.terraform.lock.hcl similarity index 100% rename from topics/terraform/terraform-up-and-running/chap04-reusable-module/stage/datastore/mysql/.terraform.lock.hcl rename to topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/stage/datastore/mysql/.terraform.lock.hcl diff --git a/topics/terraform/terraform-up-and-running/chap04-reusable-module/stage/datastore/mysql/main.tf b/topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/stage/datastore/mysql/main.tf similarity index 100% rename from topics/terraform/terraform-up-and-running/chap04-reusable-module/stage/datastore/mysql/main.tf rename to topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/stage/datastore/mysql/main.tf diff --git a/topics/terraform/terraform-up-and-running/chap04-reusable-module/stage/datastore/mysql/outputs.tf b/topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/stage/datastore/mysql/outputs.tf similarity index 100% rename from topics/terraform/terraform-up-and-running/chap04-reusable-module/stage/datastore/mysql/outputs.tf rename to topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/stage/datastore/mysql/outputs.tf diff --git a/topics/terraform/terraform-up-and-running/chap04-reusable-module/stage/datastore/mysql/variables.tf b/topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/stage/datastore/mysql/variables.tf similarity index 100% rename from topics/terraform/terraform-up-and-running/chap04-reusable-module/stage/datastore/mysql/variables.tf rename to topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/stage/datastore/mysql/variables.tf diff --git a/topics/terraform/terraform-up-and-running/chap04-reusable-module/stage/services/alb-webserver/.terraform.lock.hcl b/topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/stage/services/alb-webserver/.terraform.lock.hcl similarity index 100% rename from topics/terraform/terraform-up-and-running/chap04-reusable-module/stage/services/alb-webserver/.terraform.lock.hcl rename to topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/stage/services/alb-webserver/.terraform.lock.hcl diff --git a/topics/terraform/terraform-up-and-running/chap04-reusable-module/stage/services/alb-webserver/main.tf b/topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/stage/services/alb-webserver/main.tf similarity index 100% rename from topics/terraform/terraform-up-and-running/chap04-reusable-module/stage/services/alb-webserver/main.tf rename to topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/stage/services/alb-webserver/main.tf diff --git a/topics/terraform/terraform-up-and-running/chap04-reusable-module/stage/services/alb-webserver/outputs.tf b/topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/stage/services/alb-webserver/outputs.tf similarity index 100% rename from topics/terraform/terraform-up-and-running/chap04-reusable-module/stage/services/alb-webserver/outputs.tf rename to topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/stage/services/alb-webserver/outputs.tf diff --git a/topics/terraform/terraform-up-and-running/chap04-reusable-module/stage/services/webserver-cluster/.terraform.lock.hcl b/topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/stage/services/webserver-cluster/.terraform.lock.hcl similarity index 100% rename from topics/terraform/terraform-up-and-running/chap04-reusable-module/stage/services/webserver-cluster/.terraform.lock.hcl rename to topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/stage/services/webserver-cluster/.terraform.lock.hcl diff --git a/topics/terraform/terraform-up-and-running/chap04-reusable-module/stage/services/webserver-cluster/main.tf b/topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/stage/services/webserver-cluster/main.tf similarity index 100% rename from topics/terraform/terraform-up-and-running/chap04-reusable-module/stage/services/webserver-cluster/main.tf rename to topics/terraform/advanced/terraform-up-and-running/chap04-reusable-module/stage/services/webserver-cluster/main.tf diff --git a/topics/terraform/terraform-up-and-running/practice-scripts/README.md b/topics/terraform/advanced/terraform-up-and-running/practice-scripts/README.md similarity index 100% rename from topics/terraform/terraform-up-and-running/practice-scripts/README.md rename to topics/terraform/advanced/terraform-up-and-running/practice-scripts/README.md diff --git a/topics/terraform/terraform-up-and-running/practice-scripts/chap04-alb-instance/asg-destroy-practice-resource.sh b/topics/terraform/advanced/terraform-up-and-running/practice-scripts/chap04-alb-instance/asg-destroy-practice-resource.sh similarity index 100% rename from topics/terraform/terraform-up-and-running/practice-scripts/chap04-alb-instance/asg-destroy-practice-resource.sh rename to topics/terraform/advanced/terraform-up-and-running/practice-scripts/chap04-alb-instance/asg-destroy-practice-resource.sh diff --git a/topics/terraform/terraform-up-and-running/practice-scripts/chap04-alb-instance/asg-start-practice-resource.sh b/topics/terraform/advanced/terraform-up-and-running/practice-scripts/chap04-alb-instance/asg-start-practice-resource.sh similarity index 100% rename from topics/terraform/terraform-up-and-running/practice-scripts/chap04-alb-instance/asg-start-practice-resource.sh rename to topics/terraform/advanced/terraform-up-and-running/practice-scripts/chap04-alb-instance/asg-start-practice-resource.sh diff --git a/topics/terraform/terraform-up-and-running/practice-scripts/chap04-single-instance/destroy-practice-resource.sh b/topics/terraform/advanced/terraform-up-and-running/practice-scripts/chap04-single-instance/destroy-practice-resource.sh similarity index 100% rename from topics/terraform/terraform-up-and-running/practice-scripts/chap04-single-instance/destroy-practice-resource.sh rename to topics/terraform/advanced/terraform-up-and-running/practice-scripts/chap04-single-instance/destroy-practice-resource.sh diff --git a/topics/terraform/terraform-up-and-running/practice-scripts/chap04-single-instance/start-practice-resource.sh b/topics/terraform/advanced/terraform-up-and-running/practice-scripts/chap04-single-instance/start-practice-resource.sh similarity index 100% rename from topics/terraform/terraform-up-and-running/practice-scripts/chap04-single-instance/start-practice-resource.sh rename to topics/terraform/advanced/terraform-up-and-running/practice-scripts/chap04-single-instance/start-practice-resource.sh diff --git a/topics/terraform/terraform-up-and-running/practice-scripts/tf-backend/create-tf-backend.sh b/topics/terraform/advanced/terraform-up-and-running/practice-scripts/tf-backend/create-tf-backend.sh similarity index 100% rename from topics/terraform/terraform-up-and-running/practice-scripts/tf-backend/create-tf-backend.sh rename to topics/terraform/advanced/terraform-up-and-running/practice-scripts/tf-backend/create-tf-backend.sh diff --git a/topics/terraform/terraform-up-and-running/practice-scripts/tf-backend/destroy-tf-backend.sh b/topics/terraform/advanced/terraform-up-and-running/practice-scripts/tf-backend/destroy-tf-backend.sh similarity index 100% rename from topics/terraform/terraform-up-and-running/practice-scripts/tf-backend/destroy-tf-backend.sh rename to topics/terraform/advanced/terraform-up-and-running/practice-scripts/tf-backend/destroy-tf-backend.sh diff --git a/topics/terraform/basic/README.md b/topics/terraform/basic/README.md new file mode 100644 index 0000000..127f28d --- /dev/null +++ b/topics/terraform/basic/README.md @@ -0,0 +1,5 @@ +# Basics of Terraform + +## Demo + +Run `./terraform-helloworld.sh` diff --git a/topics/terraform/hello-world/aws-ec2/.terraform.lock.hcl b/topics/terraform/basic/aws-ec2/.terraform.lock.hcl similarity index 100% rename from topics/terraform/hello-world/aws-ec2/.terraform.lock.hcl rename to topics/terraform/basic/aws-ec2/.terraform.lock.hcl diff --git a/topics/terraform/hello-world/aws-ec2/main.tf b/topics/terraform/basic/aws-ec2/main.tf similarity index 100% rename from topics/terraform/hello-world/aws-ec2/main.tf rename to topics/terraform/basic/aws-ec2/main.tf diff --git a/topics/terraform/hello-world/aws-ec2/outputs.tf b/topics/terraform/basic/aws-ec2/outputs.tf similarity index 100% rename from topics/terraform/hello-world/aws-ec2/outputs.tf rename to topics/terraform/basic/aws-ec2/outputs.tf diff --git a/topics/terraform/hello-world/aws-ec2/variables.tf b/topics/terraform/basic/aws-ec2/variables.tf similarity index 100% rename from topics/terraform/hello-world/aws-ec2/variables.tf rename to topics/terraform/basic/aws-ec2/variables.tf diff --git a/topics/terraform/hello-world/terraform-helloworld.sh b/topics/terraform/basic/terraform-helloworld.sh similarity index 100% rename from topics/terraform/hello-world/terraform-helloworld.sh rename to topics/terraform/basic/terraform-helloworld.sh