Thanks for sharing such a good step by step information. Can you please publish one video on how create terraform pipeline with YAML using Azure Devops
Very nice and clear explanation. Thank you for that however, this pipeline will only work if you run it for the first time. The second time you'll get an error something like " already exists - to be managed via Terraform this resource needs to be imported into the State" It is because your .state file is not imported/copied in your CD pipeline so the CD pipeline tries to re-create everything from scratch... Not sure if this is the best solution but i removed the ".tf" and i put only "**". Like this, I was able to import/copy my .state file. in my artifacts. Now your CD pipeline should succeed. Ps: Enable the CD trigger to automate the process every time you have a new push/merge into your master branch.
this tasks are not mandatory if you are running the CI process on the repo server itself because now the virtualized agents servers are running the CI process and are diff from the version control , YES , this copy and publish tasks are mandatory
Houssem, great and simple video - although I'm novice user but it made perfect sense what you discussed in this video. Would you be kind enough to share your PUBLIC github repository link please?
Great tutorial. how do you select a repo folder that already exists in Azure DevOps? I tried the classic method and it only lets me chose files and not the entire repo with terraform files in it.
Hey bro, Nice Video. I do have couple of questions, could you please provide your response on it please ? 1. From where did you got the Terraform Code that you used to deploy the resources ? Is this something we need to write on our Own ? 2. How to create a Loop ? For instance, if i want to create 10 VM's simultaneously is this something possible by using single main.tf file ?
The same way, make sure your artifiact has the complete folder that includes your modules. lets say your structure looks likes this: ./subscription ./subscription/main.tf ./subscription/provider.tf ./subscription/module_a/file.tf your artifact copy would be the complete ./subscription folder
2020-03-19T08:12:49.6881506Z ##[error] Terraform failed to execute. Error: release pipeline got error . terraform plan step . pls let know what is wrong here