I have just started coding in Terraform and doing the basics. Every code that I find in any repo asks comes with deploying a VM in Azure with LoadBalance, Availability Set and Storage to enable Boot Diagnostic.
Is there any simple syntax to disabled them ?
I tried to add "disabled" in front of those resource but that didnt work.
2
Answers
try using the following code:
filling the missing values.
It should be fine for a test environment
Cheers,
Nico
I have created Azure VM using Terraform without Loadbalancer, Availability Set and without storage for boot diagnostic
Terraform code:
Terraform apply:
Once ran the above code,Azure VM got created without Availability Set , Boot diagnostic and LoadBalancer successfully.
Boot diagnostic
To check the boot diagnostic is enabled in VM, you can follow the below steps.
Azure Portal > Virtual Machines > Select your VM > Boot diagnostic
To check the Loadbalancer is associated with VM, you can use the below command.
Output