Тёмный

Using Terraform in Azure DevOps Pipelines PART 1 

skunklabz
Подписаться 1,4 тыс.
Просмотров 43 тыс.
50% 1

This video shows you how to create a Terraform Azure DevOps pipeline that can be leveraged to create Azure Cloud resources. Watch PART 2 where I show you how to templatize this pipeline ( • Using Terraform in Azu... ).
Music by OctoberMusic: / octobermusic-1

Наука

Опубликовано:

 

1 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 114   
@CantthinkOfAYoutubeName
@CantthinkOfAYoutubeName 3 года назад
Man this made my day, been looking for a 'from scratch' TF pipeline procedure and haven't been able to find one nearly as helpful till today. Thanks for doing this!!
@skunklabz
@skunklabz 3 года назад
I'm glad this helped guide you. Thanks for watching.
@suvitsharma7432
@suvitsharma7432 2 года назад
Thank you ! this is exactly the video that I've been looking for :-) thank you
@nijamkullamkulla6133
@nijamkullamkulla6133 2 года назад
Hello, you are a savior for all the people looking for the automation of terraform in azure Devops. May god bless you ! Highly appreciated !
@skunklabz
@skunklabz 2 года назад
I really appreciate the feedback and do plan on continuing my videos on infrastructure as code as well as other DevOps topics. Please make sure to show appreciation by subscribing to the channel and liking the video.
@suvitsharma7432
@suvitsharma7432 2 года назад
All those who are having trouble regarding the access as contributor, *DO NOT* mention any resource group while creating service principal (inside service connection in Azure DevOps). It worked for me !
@nehasharon5491
@nehasharon5491 Год назад
Hey, I'm facing an error that says unexpected value environment, continueOnError and strategy. Any help would be appreciated!
@rahulshaw308
@rahulshaw308 2 года назад
in your video using command you had created "skftcontainer" container but in terraform code you are using terraform.tfstate name of container why?
@abhishwetkumar
@abhishwetkumar 4 года назад
Thanks for the VDO , I was looking for this from last few days, its quite helpful. Here you used MS defined agent pool. if I want use a self hosted agentpool what extra steps do i need to do.
@skunklabz
@skunklabz 4 года назад
It should be the same but it must have all the prerequisites installed.
@TheMeehaw
@TheMeehaw 3 года назад
From one perspective it shows a lot, from other It does take a lot of assumptions. Why do we need all the things at the beginning? What they are for? Can we create them using terraform? ... Many questions
@skunklabz
@skunklabz 3 года назад
Those are all prerequisites to create the Terraform steps.
@shikha1911
@shikha1911 Год назад
Can we create the pipeline using terraform by using the existing service principal?
@khushbugupta5849
@khushbugupta5849 Год назад
Can anyone help me how did we make use of service principal did we used it in service connection? bcz in service connection we had mentioned "Azure resource manager" and then selected RG and before we had authenticate and we did even mentioned the "SP" in the terraform script. So why did we create SP in start
@skunklabz
@skunklabz Год назад
That's because you have to create a service principal first before even attempting to authenticate.
@fpwilliams71
@fpwilliams71 2 года назад
I'd say this video is exceptional, on point, and clearly explains how to use Terraform in Azure DevOps Pipeline. Thank you very much, you've made my day and greatly appreciate you.
@skunklabz
@skunklabz 2 года назад
Thanks for the feedback it's much appreciated.
@fpwilliams71
@fpwilliams71 2 года назад
@@skunklabz Do you mind sharing the exact thing you did to fix the issue when the Apply task failed as a result of Service Principal not properly scoped. Please kindly share that experience.
@fpwilliams71
@fpwilliams71 2 года назад
I figured out how that issue was fixed. In my own case I used Azure Resource Manager > Service Principal (manual) authentication method when creating the Service Connections of the DevOps project. Obviousely the Service Principal Key was actually required using this approach. Thought I should share.
@skunklabz
@skunklabz 2 года назад
Thanks for sharing the solution.
@ramonvega7575
@ramonvega7575 2 года назад
So, if you use Git to store your Terraform code, when you push PR to Git, how can you have it automatically run init and plan and not apply until the PR is approved,
@skunklabz
@skunklabz 2 года назад
The pipeline would need to be modified to work on different triggers like on PR. This example I have here is just a high-level idea of what folks can do. How people implement is up to them. Everyone has different workflows and I can't cover all scenarios. Good point though.
@terrygorham8739
@terrygorham8739 3 года назад
Great stuff...plus kudos for Cheech going blind mode!
@skunklabz
@skunklabz 3 года назад
Glad you liked the reference! :)
@srujanmettu
@srujanmettu 2 года назад
Hi can you please help how we can use of parameters and inject the values while running the pipeline ? Instead of hard coding
@skunklabz
@skunklabz 2 года назад
That's covered in part 2 of this video. Go check it out.
@chetanvaidya5793
@chetanvaidya5793 2 года назад
Hi,, How did you resolve last error while deploying. I am still getting the same error after giving contributor role for myself to subscription
@skunklabz
@skunklabz 2 года назад
I believe I explained it in some other comment made here. But it had to do with granting the service principal the proper permissions.
@syedasif1004
@syedasif1004 2 года назад
Im still getting the authorization/authentication error during the stage:apply even after adding role assignment at subscription level.
@skunklabz
@skunklabz 2 года назад
Please check the comments here as there is someone that resolved the issue and posted what to do. It's been almost two years and don't remember what I did from the top of my head other than what I said in the video.
@kalyan769
@kalyan769 4 года назад
this was a really WOW, but please add the troubleshooting video also it would really help us in future . thanks alot for the video
@skunklabz
@skunklabz 4 года назад
Sure thing!
@joejoe570
@joejoe570 3 года назад
Nice quick demo! for the 'backend' in .tf file there is this line: "resource_group_name = "tstate"" what does this line mean? We do not have such an rg named 'tstate' in subscription. Also there is no storage key provided either, so how could terraform access it? It works but cannot understand how. Also how did the azure-pipelines.yml found the terraform.tf? It checks for this file in root?
@skunklabz
@skunklabz 3 года назад
That would be the resource group name you are going to use.
@joejoe570
@joejoe570 3 года назад
@@skunklabz going to use for ?
@skunklabz
@skunklabz 3 года назад
All resources in Azures require them to be associated with a resource group. What I meant was you can use an existing resource group that has been previously created, or as in this case, create a new one.
@suri4ulagumavarapu100
@suri4ulagumavarapu100 3 года назад
can you please provide YAML pipeline for CI/CD or githut location URL please ... i tried all the steps that in the above video
@skunklabz
@skunklabz 3 года назад
Sure: dev.azure.com/skunklabz/public/_git/terraform
@suri4ulagumavarapu100
@suri4ulagumavarapu100 3 года назад
Thanks a ton
@ramanujamvs4763
@ramanujamvs4763 4 года назад
Excellent stuff . Nice that I had a chance to start my work with the 90% match
@skunklabz
@skunklabz 4 года назад
Thanks for watching and I appreciate the feedback.
@joejoe570
@joejoe570 3 года назад
what you mean 90% match?
@marsamuk
@marsamuk Год назад
Hi. Great video. Do you have resource recommendations where I can use to master Azure DevOps with terraform? Thanks
@nathamp88
@nathamp88 3 года назад
Thanks bro. Defo subscribing for more 👌
@skunklabz
@skunklabz 3 года назад
Thanks for watching!!
@wealthystudent
@wealthystudent 2 года назад
Thanks for providing great audio quality🎉 Nice work
@skunklabz
@skunklabz 2 года назад
Thanks for your feedback! It's very much appreciated. Please make sure to subscribe the channel to encourage more future content.
@shanehanson3339
@shanehanson3339 Год назад
this is perfect, thanks!!
@RaviKumarAddala
@RaviKumarAddala 3 года назад
Great video. Very useful. Thank u so much.
@skunklabz
@skunklabz 3 года назад
Thank you for watching!
@chiranjeevik900
@chiranjeevik900 2 года назад
if i am using classic pipeline in azure DevOps, and i want to make some enhancements and value in my environment, then how can i leverage terraform for that?
@skunklabz
@skunklabz 2 года назад
You can use the same tasks in classic pipelines to get the same benefit.
@vikasg3729
@vikasg3729 2 года назад
No Nonsense explanations - straight to the actions with brief info. Too good video
@carodnful
@carodnful 2 года назад
Thank you! Very helpful to me too!
@skunklabz
@skunklabz 2 года назад
Glad it helped!
@InigoMontoyaGAMING
@InigoMontoyaGAMING 3 года назад
that's amazing, thank you so much, keep them coming
@skunklabz
@skunklabz 3 года назад
I know I've been lagging. I am working on my next videos. Soon to be released.
@honor7xuser999
@honor7xuser999 2 года назад
Best video and best explanation. Cheers.
@ParagDarji
@ParagDarji 3 года назад
Can you suggest a way to work with Terraform workspaces in devops?
@skunklabz
@skunklabz 3 года назад
That's a very good topic to bring up and something I'd like to cover in the future. Thank you for valuable feedback.
@ParagDarji
@ParagDarji 3 года назад
@@skunklabz Will you be able to project a timeline for that?
@skunklabz
@skunklabz 3 года назад
Not at the moment.
@ParagDarji
@ParagDarji 3 года назад
@@skunklabz Ok. thanks
@lawrencejob
@lawrencejob 2 года назад
Thanks man this was so useful!
@skunklabz
@skunklabz 2 года назад
Glad it helped!
@UeberLandUndMeere
@UeberLandUndMeere 2 года назад
Hey, thank you. Do you have the code?
@say2merohit
@say2merohit 3 года назад
1 minute in the video start loving it ! great work watched and enjoyed the full video keep up the good work
@skunklabz
@skunklabz 3 года назад
Thank you so much! I appreciate the support.
@hariselvan7429
@hariselvan7429 2 года назад
Hello, This video is amazing and very helpful to me. Step by step instructions that you have given is very easy to understand. Thanks for posting this !!
@skunklabz
@skunklabz 2 года назад
Thank you for your feedback. Please make sure to subscribe and like to show your support.
@hariselvan7429
@hariselvan7429 2 года назад
Subscribed to your channel! Keep posting! Cheers !!
@dwiti7381
@dwiti7381 3 года назад
Thank you Sir
@skunklabz
@skunklabz 3 года назад
No problem.
@philc8544
@philc8544 2 года назад
Great video
@skunklabz
@skunklabz 2 года назад
Thank you!
@ChanceMinus
@ChanceMinus 3 года назад
Thank you. I appreciate you...
@skunklabz
@skunklabz 3 года назад
Thanks for stopping by!
@ChanceMinus
@ChanceMinus 3 года назад
@@skunklabz, I have been receiving a "Service returned an error. Status=403 Code="AuthorizationFailed" Any suggestions? Thank you in advance...
@skunklabz
@skunklabz 3 года назад
403 is forbidden but doesn't tell you much on what the underlying issue could be.
@RameshP-ds4xt
@RameshP-ds4xt 3 года назад
Excellent !!!
@skunklabz
@skunklabz 3 года назад
Thank you for watching!
@rohitpahuja1787
@rohitpahuja1787 3 года назад
if i am using classic pipeline in azure devops, and i want to make some enhancements and value in my environment,,then how can i leverage terraform for that? i am also yet to introduce containers, microservices in my environment and i work on ON-PREM environment.
@skunklabz
@skunklabz 3 года назад
Hi Rohit, I'm not too clear on what your ask is but Terraform can be run from either classic pipeline or pipeline as code. That's separate from Terraform itself.
@rohitpahuja1787
@rohitpahuja1787 3 года назад
@@skunklabz I see, you have any resources where i can learn how to use terraform from classic pipeline, and also i am trying to ask is that what benefits will i get by using terraform in my environment and currently there are no containers but i am planning to enhance it by introducing containers annd working on docker and kubernetes stuff and transition to devsecops too, so all i am tring to ask is, what value i can add through terraform in my environment? I hope it helps?
@skunklabz
@skunklabz 3 года назад
Hi Rohit. Terraform is primarily for managing resources in cloud using infrastructure as code. It's dependent on what cloud provider you're using and what resources you want to manage. Leveraging Terraform you can automate using pipelines with any CI tool not just Azure DevOps. In this video I just showed one particular example. There are many ways you can leverage Terraform.
@rohitpahuja1787
@rohitpahuja1787 3 года назад
@@skunklabz well right now i am not using any cloud environment, i have ON PREM environment, and we have azure devops servers which are connected to those ON PREM servers, so can i leverage terraform for introducing containers in my environment?
@skunklabz
@skunklabz 3 года назад
Unless you are hosting private cloud I'm not clear on how else you could leverage it for your needs. Containerization doesn't depend on something like Terraform.
@abdulthakur5608
@abdulthakur5608 4 года назад
how to give contributor role to my service principle at 16:35,, please advice
@skunklabz
@skunklabz 4 года назад
I followed this: docs.microsoft.com/en-us/azure/role-based-access-control/role-assignments-portal
@abdulthakur5608
@abdulthakur5608 4 года назад
@@skunklabz Thanks but my Service principle has contributor role, but it still does not work, please advice
@skunklabz
@skunklabz 4 года назад
@@abdulthakur5608 yeah that's what I did so not sure how to solve your issue. Sorry.
@atanudebnath9173
@atanudebnath9173 4 года назад
Please make more videos on azure DevOps
@skunklabz
@skunklabz 4 года назад
@@atanudebnath9173 they're coming!! ;)
@pankaj7121
@pankaj7121 2 года назад
Great video, easy to understand. Thanks .
@skunklabz
@skunklabz 2 года назад
Thanks for stopping by and watching! If you haven't done so, please make sure to like and subscribe.
@GravitySucks2000
@GravitySucks2000 2 года назад
one of the best demonstration... awesome man many many thanks...
@skunklabz
@skunklabz 2 года назад
Thanks for stopping by, I appreciate the comments. Make sure to subscribe!
Далее
Using Terraform in Azure DevOps Pipelines PART 2
7:32
Вопрос Ребром - Серго
43:16
Просмотров 1,2 млн
БАГ ЕЩЕ РАБОТАЕТ?
00:26
Просмотров 44 тыс.
Terraform on Azure for Beginners
28:44
Просмотров 42 тыс.
Azure DevOps Pipelines with Terraform and Stages
22:26
Containers vs VMs: What's the difference?
8:08
Просмотров 762 тыс.
Using Terraform with Azure
45:00
Просмотров 117 тыс.
Скучнее iPhone еще не было!
10:48
Просмотров 605 тыс.
Скучнее iPhone еще не было!
10:48
Просмотров 605 тыс.
Самый длинный ноутбук!
0:23
Просмотров 11 тыс.
Проверил, как вам?
1:01
Просмотров 912 тыс.