DevOps Project - Automate deploying to AWS using Terraform with GitLab CICD pipeline

  Рет қаралды 18,016

Cloud Champ

Cloud Champ

Күн бұрын

Terraform Pipeline | Gitlab ci cd pipeline AWS | Terraform Project | AWS Terraform
In this Devops project you will learn how to set up a Terraform ci cd pipeline using gitlab to automatically deploy infrastructure on AWS cloud.
Throughout this terraform project you will learn all devops best practices used in the industry to learn and Practice Hands on.
Find the code in GitLab Repository: gitlab.com/N4si/cicdtf
#devops #aws #terraform
Connect with me on LinkedIn: / nasiullha-chaudhari
Helpful resources -
Terraform tutorial : • Master Terraform in 60...
CICD explained : • What is CICD Pipeline?...
Gitlab CICD tutorial : • Learn Complete GitLab ...
Terraform Official documentation: developer.hashicorp.com/terra...
Timestamps
🕒 Intro 0:00
📝 What is this project 0:04
🔧 Prerequisites for this DevOps project 0:32
🛠️ Part 1 of the project (Terraform Code) 03:44
📂 S3 state backend setup 23:55
🔧 Part 2 (Gitlab cicd pipeline) 26:02
🔗 Create Gitlab repository 26:35
📥 Push the Terraform code to Gitlab 27:37
🔄 Gitlab CICD pipeline script 29:53
🔢 Define variable 38:56
🏃 Pipeline running 45:00
🎬 Conclusion 49:50
Also checkout other DevOps projects:
Devsecops project: • DevSecOps Pipeline Pro...
Microservices project: • DevOps Project: Video ...
Simple Terraform Project: • Simple DevOps Project ...
Kubernetes Project: • Kubernetes Live Projec...
This terraform pipeline project will teach you how to properly create infrastructure on cloud like aws or azure using cicd tools like gitlab, jenkins or github.
Setting up cicd pipeline for Terraform is very common best practice followed in devops industry to provision infrastructure.
Feel free to comment your doubts if you have any :)
Support my work : www.buymeacoffee.com/cloudchamp

Пікірлер: 86
@soumyadipchatterjee2267
@soumyadipchatterjee2267 2 ай бұрын
Mind-blowing & Hat's off to you to showcase this project step by step especially how Gitlab & Terraform hand to hand works in Production 😀❤. I have successfully created the same .
@cloudchamp
@cloudchamp 2 ай бұрын
Let's see who can complete this first..... 👀 Please Like & share :)
@ankitkumargupta9753
@ankitkumargupta9753 Ай бұрын
Crisp, Clear, Amazing, Mind-Blowing What a tutorial, Loved It ❤
@cloudchamp
@cloudchamp Ай бұрын
Glad you liked it
@cloudchamp
@cloudchamp Ай бұрын
Make sure to share & subscribe 👍🏻
@oc4618
@oc4618 Ай бұрын
I love your tutorials. Simpe, clear and straight foward. One of the best tutorial for devops on the net. Please keep them coming
@cloudchamp
@cloudchamp Ай бұрын
Thanks! Means a lot!!
@Djsanddy
@Djsanddy 19 күн бұрын
Amazing tutorial brother. Keep up the good work.
@cloudchamp
@cloudchamp 19 күн бұрын
Appreciate it!
@inthecloud1043
@inthecloud1043 2 ай бұрын
You explain it so perfectly bro 👍
@cloudchamp
@cloudchamp 2 ай бұрын
Thank you 🙌
@user-pg9yy1un1s
@user-pg9yy1un1s 28 күн бұрын
only one Thala @ Abhishek Vermalla
@kykel4948
@kykel4948 Ай бұрын
Fantastic tutorial! Thank you! This really helped. Yours was the most comprehensive explanation I've seen so far and just you breaking down the code of the gitlab-ci file line by line in your review was incredibly helpful. So many tutorials I've watched skim over the important details and skip steps or just fail to elaborate on what their code is doing, which contributes to the confusion. My only confusion and question is about your destroy job. How did your destroy job run without a state declared? When I tried to run mine, it would "succeed" but only as a false positive. The destroy job wasn't finding the terraform state from the previous jobs and thinking there were 0 things to destroy. I had to troubleshoot and eventually added the state as an artifact in the apply job which resolved my issues. Liked, Subscribed and even bookmarked this particular tutorial!
@smartengineer4484
@smartengineer4484 2 ай бұрын
This is very much needed project brother 👍
@cloudchamp
@cloudchamp 2 ай бұрын
Definitely
@rajvirkaur4411
@rajvirkaur4411 2 ай бұрын
great tutorial. everything is explained in so detail. thank you so much
@cloudchamp
@cloudchamp 2 ай бұрын
You're very welcome!
@mhenterprises1873
@mhenterprises1873 2 ай бұрын
Thanks for this devops project 👍
@cloudchamp
@cloudchamp 2 ай бұрын
My pleasure
@PortgueseProBF3
@PortgueseProBF3 Ай бұрын
This is amazing and exactly what I needed except I'm trying to use gitlab it self as backend!
@cloudchamp
@cloudchamp Ай бұрын
Glad it was helpful!
@RZOLTANM
@RZOLTANM 2 ай бұрын
Good explanation....really concise and articulate....gets to the point and also explains prerequisite videos and concepts to understand... enjoyed it! Will watch all from the all others... just subscribed!
@cloudchamp
@cloudchamp 2 ай бұрын
Thanks man! Happy to help 😀
@yogendrahj9365
@yogendrahj9365 2 ай бұрын
Crisp & Clear. Thanks mate. And please dont take me wrong your talking speed has really reduced to good level compared to initial videos and this helps learners like us to understand thoroughly. Being in the industry for 6+ years have hardly found good live projects. Please keep them coming! Thank you! All the best!
@cloudchamp
@cloudchamp 2 ай бұрын
Thanks for this helpful feedback 😀
@bouksy
@bouksy 2 ай бұрын
very interesting video . Gives very good key concepts in a very clear way. I'll put these in practise pretty soon, Thanks!
@cloudchamp
@cloudchamp 2 ай бұрын
Let me know how it goes 👍🏻
@vijayamarnath1860
@vijayamarnath1860 2 ай бұрын
Great one! Keep up the good work bro.
@cloudchamp
@cloudchamp 2 ай бұрын
Thanks, will do!
@gamingchamp3070
@gamingchamp3070 2 ай бұрын
Thank you for everything you do
@cloudchamp
@cloudchamp 2 ай бұрын
You are so welcome
@rahulsawant485
@rahulsawant485 2 ай бұрын
Great tutorial, thanks
@cloudchamp
@cloudchamp 2 ай бұрын
You're welcome!
@kauapozzi8629
@kauapozzi8629 2 ай бұрын
Just took my SAA-003 certification. Watching your videos to conquer my first IT job and portfolio
@cloudchamp
@cloudchamp 2 ай бұрын
Best of luck to you brother
@kauapozzi8629
@kauapozzi8629 2 ай бұрын
@@cloudchamp tks bro!
@dharshansrsr976
@dharshansrsr976 2 ай бұрын
19:30 waiting for the second part to create keys as per the flow 😊
@vamshikittu8635
@vamshikittu8635 2 ай бұрын
Awesome 👌 content bhai and funny thing is when the destroy was running the bgm was perfect sync 😂 And yes today itself I'll do this project and definitely tag you nasi bhai ❤
@cloudchamp
@cloudchamp 2 ай бұрын
Thanks 😅
@AkshaiReddy183
@AkshaiReddy183 2 ай бұрын
Great job bhai 🎉
@cloudchamp
@cloudchamp 2 ай бұрын
Thanks
@user-pg9yy1un1s
@user-pg9yy1un1s 28 күн бұрын
Appreciate it, nice work.
@cloudchamp
@cloudchamp 28 күн бұрын
Much appreciated!
@ragavraghu8700
@ragavraghu8700 24 күн бұрын
thank you!
@cloudchamp
@cloudchamp 24 күн бұрын
You are welcome 🤗
@gamingchamp2834
@gamingchamp2834 2 ай бұрын
I will try this project today bro
@cloudchamp
@cloudchamp 2 ай бұрын
👍🏻 yes!
@mariocortes2670
@mariocortes2670 2 ай бұрын
Great explanation!
@cloudchamp
@cloudchamp 2 ай бұрын
Thanks 😊
@chipTuanDuc
@chipTuanDuc 2 ай бұрын
Thanks❤❤❤❤❤
@cloudchamp
@cloudchamp 2 ай бұрын
You are welcome 🤗 Lmk if you need help or you complete the project 👍🏻
@techyreport7992
@techyreport7992 2 ай бұрын
Thank you 🙏
@cloudchamp
@cloudchamp 2 ай бұрын
You’re welcome 😊
@harshshah4477
@harshshah4477 2 ай бұрын
It is a good project to automate the IAC though how can we configure the automation of the BE & FE codebase as well? So that whenever I commit any changes in my code base automation directly updates the code in EC2.
@tech_channel110
@tech_channel110 2 ай бұрын
Sir give me fyp idea using devops and cloud Eg . Cloud infrastructure
@OnCloudNine-wv9kv
@OnCloudNine-wv9kv 2 ай бұрын
While creating the pipeline. 31.53 timestamps. how did you get the image name and the path? i tried looking that in your previous video but coudnt find it. i'd appreciate if you help me here.
@oc4618
@oc4618 Ай бұрын
can you explain the 'entry point' value on the gitlab yml. I got a bit lost and wasn't sure how you got that value
@user-ux2hc4zw7x
@user-ux2hc4zw7x 2 ай бұрын
Bro which tool you used for project documentation in ubuntu 22.04?.
@ragavand4678
@ragavand4678 2 ай бұрын
Thank you very much brother.it really helps me to understand how terraform works...
@cloudchamp
@cloudchamp 2 ай бұрын
You are most welcome
@Djsanddy
@Djsanddy 19 күн бұрын
can you please do a similar one for github CICD. Thanks a ton
@zikou6405
@zikou6405 2 ай бұрын
apply: stage: apply script: - terraform apply -input=false "planfile" dependencies: - plan the dependencies is not needed since apply and plan are in different stage so if plan stage failed the following stages will fail too if we put the plan and apply in the same stage then we need to add the dependecies line
@sjokkz
@sjokkz 2 ай бұрын
how can i reuse the same pipeline to deploy multiple environments with the same resources?
@user-ux2hc4zw7x
@user-ux2hc4zw7x 2 ай бұрын
Bro which tool used for documenting in ubuntu!!?.
@jac9886
@jac9886 15 күн бұрын
Excellent video Nasi, it helped me a lot! I just have one question left, in your repository there's a variable TF_VAR_gitlab_token: ${GITLAB_ACCESS_TOKEN} which I was particularly interested in seeing its configuration, but you didn't mention it in the video. Is there another video about it or could you explain it to me here? Thank you very much!
@OnCloudNine-wv9kv
@OnCloudNine-wv9kv 2 ай бұрын
Did you create s3 and dynamoDB manually or via terraform code?
@cloudchamp
@cloudchamp 2 ай бұрын
Manually in this video but also have another terraform backend video where it’s done in terraform 👍🏻
@sparshkhandelwal816
@sparshkhandelwal816 Ай бұрын
15:09
@yogendrahj9365
@yogendrahj9365 2 ай бұрын
Hi Nasi, i am almost there. But getting state lock error in the destroy stage. Not very sure how i can pass -lock=false for this stage manually. This work fine manually i can run this. Now im running the full pipeline and it started failing in the plan job itself saying state lock. Any leads please?
@cloudchamp
@cloudchamp 2 ай бұрын
You can manually release the lock using terraform force-unlock command with the lock Id. -lock=false is not recommended in production environments where you have multiple people working together Let me know if still facing issue.
@yogendrahj9365
@yogendrahj9365 2 ай бұрын
@@cloudchamp yes force-unlock is my first choice but silly thing is i am unable to find the lockid either in the error or state file. Below is the error i get if i run plan and cant see lock id. "Error: Error acquiring the state lock │ │ Error message: 2 errors occurred: │ * ResourceNotFoundException: Requested resource not found │ * ResourceNotFoundException: Requested resource not found │ │ │ │ Terraform acquires a state lock to protect the state from being written │ by multiple users at the same time. Please resolve the issue above and try │ again. For most commands, you can disable locking with the "-lock=false" │ flag, but this is not recommended."
@yogendrahj9365
@yogendrahj9365 2 ай бұрын
something silly im missing.
@guibhai8578
@guibhai8578 2 ай бұрын
nasi can you share some resource to learn golang
@khaledziraoui5246
@khaledziraoui5246 2 ай бұрын
Do u have any videos ro learn terraform please for a beginner ,appreciate it
@cloudchamp
@cloudchamp 2 ай бұрын
Absolutely I do, check out the playlist or a 60 mins video
@khaledziraoui5246
@khaledziraoui5246 2 ай бұрын
@cloudchamp Thank you very much ,i will start watching them videos , ,is it possible to learn that in one month for a beginner
@faizanmomin4417
@faizanmomin4417 2 ай бұрын
Hey, Brother! I am also DevOps engineer, Could you please tell me which terminal are you using, It's Looking Good Though!
@cloudchamp
@cloudchamp 2 ай бұрын
I am using inbuilt terminal . I have Ubuntu 22 in my local
@peace___maker
@peace___maker 2 ай бұрын
Can I do this project in windows 11
@cloudchamp
@cloudchamp 2 ай бұрын
Yes
@heisenberg7049
@heisenberg7049 2 ай бұрын
Hey bro ur discord link expired can u update it
@CHARAN_REDDY18
@CHARAN_REDDY18 2 ай бұрын
bruh were did you learn devops course
@suresh.beats___
@suresh.beats___ 2 ай бұрын
bro why dont u explain in super putty
@cloudchamp
@cloudchamp 2 ай бұрын
It’s the same when you do it in Linux machine mine is Ubuntu 20
@gopalkrishnav2946
@gopalkrishnav2946 16 сағат бұрын
You are too fast bro
@cloudchamp
@cloudchamp 10 сағат бұрын
Please adjust the playback speed on KZbin setting
@gopalkrishnav2946
@gopalkrishnav2946 9 сағат бұрын
Ok bro.
Learn Complete GitLab CI/CD in 1 hour | GitLab CI CD Tutorial
1:10:14
How many pencils can hold me up?
00:40
A4
Рет қаралды 17 МЛН
어른의 힘으로만 할 수 있는 버블티 마시는법
00:15
진영민yeongmin
Рет қаралды 7 МЛН
FOOTBALL WITH PLAY BUTTONS ▶️ #roadto100m
00:29
Celine Dept
Рет қаралды 73 МЛН
狼来了的故事你们听过吗?#天使 #小丑 #超人不会飞
00:42
超人不会飞
Рет қаралды 52 МЛН
15 crazy new JS framework features you don’t know yet
6:11
Fireship
Рет қаралды 385 М.
How Linux is used in devops | Linux for DevOps
7:07
Cloud Champ
Рет қаралды 7 М.
Terraform explained in 15 mins | Terraform Tutorial for Beginners
18:15
TechWorld with Nana
Рет қаралды 1,5 МЛН
Networking Fundamentals for DevOps Engineers | DevOps Networking
18:10
Complete Git and Github Hands On Tutorial with Commands
31:24
Cloud Champ
Рет қаралды 34 М.
Kubernetes Explained
10:59
IBM Technology
Рет қаралды 599 М.
⏱️❌
0:36
Kan Andrey
Рет қаралды 3,6 МЛН
Парень Который Видит Все Болезни 😱🔥
1:00
Voronins and Leo
Рет қаралды 6 МЛН
Зу-зу Кульпәш.Нагашы (11 бөлім)
43:59
ASTANATV Movie
Рет қаралды 535 М.
When the floor is ACTUALLY lava 😱🔥 @BrandonA7
0:26
Nick Pro
Рет қаралды 8 МЛН