Automate Cloudflare with Terraform and GitHub Actions! - Terraform Tutorial for Beginners

preview_player
Показать описание
Terraform is a powerful infrastructure as code tool to help you create and manage infrastructure across multiple public or private clouds. It can help you provision, configure, and manage infrastructure using their simple and human readable configuration language. Using Terraform helps you automate your infrastructure and your DevOps workflow, do it consistently, and allows you to collaborate with teams in Git. Today, we're going to set up and configure Terraform on your machine so we can start using Terraform. Then we'll configure cf-terraforming to import our Cloudflare state and configuration into Terraform. After that we'll set up a GitHub report and configure GitHub actions so you have CI and CD for deploying your Infrastructure automatically using a Git Flow. If you're new to Terraform, that's fine! This is a beginner tutorial for Terraform and by the end of this, you will feel like an expert!

(Affiliate links may be included in this description. I may receive a small commission at no cost to you.)

#terraform #cloudflare #github

00:00 - What is Terraform and what are the benefits of Terraform?
01:15 - How to Automate Cloudflare with Terraform
03:19 - How to Install Terraform
03:59 - How to Initialize a new Terraform projects
04:38 - Terraform Providers
05:54 - Cloudflare Provider for Terraform
08:35 - Getting an API Token from Cloudflare
10:55 - Terraform Plan & Terraform Apply
12:18 - Importing Cloudflare State to Terraform
14:54 - Import State using cf-terraforming
17:16 - Configuring Terraform Cloud for your Terraform State
20:43 - CI / CD with Terraform
21:32 - Create a new GitHub Repo
21:59 - Import Project into GitHub with Git
24:34 - Adding GitHub Action for Terraform
27:22 - Adding Terraform Secret to GitHub Action
28:55 - Pull Request Workflow with CI / CD and Terraform
33:16 - What do I think about Terraform?
34:23 - Stream Highlight - "I'm done clicking buttons!"

Thank you for watching!
Рекомендации по теме
Комментарии
Автор

Have you thought about using Terraform? How do you use it?

TechnoTim
Автор

One of the biggest injustice in life is to see this video only got 35k views. This is great work Tim. Thanks for doing this.

bigbrovar-br
Автор

Small correction here (unless I misunderstood in which case I apologize). Terraform does not take away the nuance of writing specific code away from you solely based on providers. The resources available (per provider) as well as the structure each provider offers differs greatly. For example for a VM on AWS you'd need resource called "aws_instance" whereas for GCP (Google) you'd need resource called "google_compute_instance". Each has its own configuration and would require you to write pretty much different stuff. Generally the "agnosticity" of Terraform stops on the fact that you can support _most_ providers in a single frramework, and on the same files of code and that you can _transfer_ your code from one to another. But (sadly) it does not allow you to hit multiple birds with one stone. Other than that of course great video Tim! Well done! :)

SataPataKiouta
Автор

Big fan of terraform -- use it nearly every day for work.

karatekid
Автор

30:50 Tim struggling to show us that he is other Tim/Guy 😂🤣.... Appreciate his efforts💚

i_Kruti
Автор

I use terraform daily for work. It’s a great tool and lots of support. One small thing that I did for big production deploys was to make an alias that runs terraform apply and then notifies my discord server. Sometimes applies with ecr or images can take more than 15mins and it’s annoying to have to continually be checking on the deploy status instead of working on something else. Love the content Tim. Thanks for everything -Lesterine from twitch

sachasmart
Автор

I use terraform for customer onboarding and it really is an awesome tool. Writing a custom provider was challenging but well worth it! You can do almost anything with it!

JT-mrdb
Автор

This is awesome, I've been using terraform to provision my proxmox and upcoming harvester machines using a self hosted gitlab and their ci/cd. I'd love to see a video on setting up a "production" ready vault for secret management. Awesome content as always!!

CTWilliams
Автор

Love to see how you were excited once after hours of API Tokens, git commit ecc the record changes ahahah! Amazon tutorial, cheers from Italy!

mircocispazia
Автор

This was the most useful devops ci/di example video. Thank you

slade
Автор

I love using terraform! Such a great tool. Mainly I am using it on all clouds and services to maintain my infrastructure setup and keep it repeatable deployable.

techwithmarco
Автор

I've been wanting to start learning Terraform for a while now and always found an excuse to do the same with Ansible. I'm a big fan of yours and it really made me want to sit down and finally try Terraform.
Thank you very much!

dushkodavchev
Автор

Awesome video. so helpful. looking forward to see more videos from you on CloudFlare Terraform, for example WAF, ruleSets, etc.

FuShengzhen
Автор

Really amazing tutorial and been waiting for your content, Thanks Tim

mayurchavhan
Автор

Once again, a great video! Thanks Tim <3

angelosnm
Автор

Thanks Tim, will try terraform after watch your video. Seems pretty simple and straightforward.

aanset
Автор

terraform cloud has version control integration.. can run a plan when pushed, then apply when merged to main. Good stuff Tim

denniscastillo
Автор

More Terraform videos, you are awesome!

mavis-io
Автор

I was pretty skeptical at first, but this looks amazing.

nezu_cc
Автор

Awesome video as always. Thank you Tim!

thecloudterminal