kola1982 / AZURERESUME

Azure IAC (Terraform)
0 stars 0 forks source link

Create Terrafrom main.tf file #1

Open kola1982 opened 11 months ago

kola1982 commented 11 months ago
  1. create main.tf file in Visio Studio code.
  2. Add Azure Providing (versioning
  3. Initialize Terraform local backend
kola1982 commented 11 months ago

terraform fmt : Fomat code terraform int: initalize the local backend. terrafrom state is stored terraform directory is stored and the .exe terraform lock.hcl- maintains the version when the code runs. When upgrading delete the file or modify the version

terrafrom plan - shown what is going to build before applying to deployment terraform apply - push/deploy terraform apply -auto approve : approve delploy without check Main.tf

Azure Provider list the versions Can also list feature: neede but can be empty

type of resource group "azure_resource_group" cannot change has to be there." it tells what type of resoure to azure you trying to deploy

"example" is a alias that can change. This is how you tell your reference your resource within terraform stored within the state

Azure Provider : allows terraform to communicate to with the azure api. know how to deploy resources.

  1. Step 1 create main.tf consist of the azure provider

  2. resource_group_name = azure_resource_group.mts.rg.name : Dependent on the resource group. If you destroy i will not destroy the resource nor it will create it "Creates Implicit Dependecy"

  3. address space you specify mutiple address space

terraform state apply it performs a backup terraform state list - shows the list of resources you have