Azure Infrastructure with Terraform
credits to https://schnerring.net/

Azure Infrastructure with Terraform

I have just started exploring Terraforms as IaC (Infra as a Code) for creating Azure resources. The official documentation from both Microsoft and HasiCorp are rich enough.

But I kept falling for a very small glitch\mistake while trying to run terraform commands like init, plan, apply etc.

So basically all the prerequisites were in place like Azure CLI, Terraforms plugin(environment variable created), VS code for IDE, a working Azure subscription etc.

az login worked fine and I was connected to my azure subscription.

but when running the terraform commands it just ended with a generic success command for example 'terraform init -upgrade' or 'terrafrom init' gives:

It doesn't actually downloads the azurerm provider files.

init

'terraform plan' or 'terraform plan -out main.tfplan' gives:

plan

'terraform apply' says 'Apply Complete!' But 0 resources were created.

apply

So the solution in this case was to actually saving the files previously created main.tf, provider.tf , output.tf and variable.tf . Once the files were saved it all worked fine.

Its pretty basic but now I realize it can happen to anyone when starting.

'Terraform init' finally downloaded and installed the provider plugin.

provider init

More in this coming soon..

要查看或添加评论,请登录

Abhishek Yadav的更多文章

  • Applying SCCM 2403 Hotfix KB28290310

    Applying SCCM 2403 Hotfix KB28290310

    Generally applying SCCM\MECM In-console hotfixes is a straight forward process, with not much hassle. (If done…

  • Co-management workloads

    Co-management workloads

    In my previous post we discussed the paths to co-management, the related components and how to enable them. Once we…

    1 条评论
  • Enable co-management for new internet-based devices

    Enable co-management for new internet-based devices

    In my previous post we saw an overview of Path 1: Enable co-management for existing Configuration Manager clients. Lets…

  • Enable co-management for existing Configuration Manager clients

    Enable co-management for existing Configuration Manager clients

    In my previous post we saw an overview of what paths are available for adapting Co-management. We also saw the overview…

    2 条评论
  • Paths to co-management

    Paths to co-management

    In my previous post we saw an overview of what Co-management is what it is not, options, pre-requisites, immediate…

  • What is co-management?

    What is co-management?

    Co-management is one of the primary ways to attach your existing ConfigMgr environment to the M365 cloud. Co-management…

    6 条评论
  • SCCM CMG Troubleshooting 0x87D00607(-2016410105)

    SCCM CMG Troubleshooting 0x87D00607(-2016410105)

    I recently worked with one of the clients who were facing issues Application Download and Install issues after…

    7 条评论
  • Windows Autopilot Device Preparation

    Windows Autopilot Device Preparation

    LinkedIn in now full with the posts about the latest offering from Microsoft for Windows 11 device provisioning…

  • Windows Autopilot ESP Troubleshooting

    Windows Autopilot ESP Troubleshooting

    Are you someone who is responsible for managing or working with #Windows #Autopilot there is a fare chance that you are…

    1 条评论
  • Windows Autopilot ODJ Connectivity Issue.

    Windows Autopilot ODJ Connectivity Issue.

    Its odd but I've been looking out for quite sometime to get this error so I can make a post about it! :) Scenario:…

    1 条评论

社区洞察

其他会员也浏览了