opentofu tutorial - helloworld example to create resources in Azure
To install opentofu, please goto this link here.
I am using windows so i am downloading my windows binaries. We are going to use azurerm provider and to do that, we are going to authenticate using a service principal, but you can choose to use other methods as well.
Open powershell terminal, fill in your azure service principal and other info and run the following command:
Create a main.tf file with the following contents
Then run the following
tofu init
Next, run
tofu plan
to see what opentofu is about to create. To finalize your deployment run
tofu apply
That's it.
Additional references
Opentofu registry
https://github.com/opentofu/registry/tree/main/providers/m
cloud block here for example - allows integration to Terraform cloud by specifying the organization and workspace you will be connecting to.
Comments