Activity 1 contd
- Creating a linux vm in azure requires
- network interface with nsg connected to a subnet (optional public ip)
- credentials:
- username/password
- username/key
- Image: os
publisher = "Canonical"
offer = "0001-com-ubuntu-server-jammy"
sku = "22_04-lts-gen2"
version = "latest"
- Refer Here for the changes done to create virtual machine
Tainting terraform resources
- Tainting a terraform resources is marking for the resource to replaced during next terraform apply.
Installing softwares in virtual machine
- Option 1: Userdata/Custom Data from cloud providers
- Option 2: Terraform provisioning
Terraform Provisioners
- Provisioners can execute some extra stuff in virtual machines. Terraform has 3 types of provisioners
- file
- local-exec
- remote-exec
- For the remote connections provisioner will have a connetion object
- Refer Here also
- Refer Here for the changes done to include a provisioner.
