Hi All,
I am new to terraform. Need your help please.
The below mention is the script for terraform.tfvar
vmdetail = [
{
resource_group = “abc”
instName = “vmtest”
location = “EAST US”
vnet = “abc-vnet”
subnet = “default”
OS_Type = “Linux”
instVMSize = “Standard_D2s_v3”
publisher = “RedHat”
offer = “RHEL”
sku = “7-LVM”
ver = “latest”
instOSDiskSize = “256”
instOSDiskType = “Standard_LRS”
ddiskType = “Premium_LRS”
instdDisk = “256”
Asset_ID = “1234”
domain_name = “abc”
SDC_system_catalogue = “na”
Server_purpose = “na”
IP_address = “x.x.x.x”
Tags = { cost_center = “”, environment_type = “” }
},
I want to create a json file where i can get these details from terraform.tfvar. Please let me know how to proceed. I have read most of the terraform docs but not able to find exactly how this can be covert to json.