Open eashweragero101 opened 3 years ago
### Client.tf
resource "azurerm_virtual_machine_scale_set" "client-nodes" { count = "${var.clients_count == "0" ? "0" : "1"}"
name = "es-${var.es_cluster}-client-nodes" resource_group_name = "${azurerm_resource_group.elasticsearch.name}" location = "${var.azure_location}" "sku" { name = "${var.client_instance_type}" tier = "Standard" capacity = "${var.clients_count}" } upgrade_policy_mode = "Manual" overprovision = false
resource "azurerm_virtual_machine_scale_set" "data-nodes" { count = "${var.datas_count == "0" ? "0" : "1"}"
name = "es-${var.es_cluster}-data-nodes" resource_group_name = "${azurerm_resource_group.elasticsearch.name}" location = "${var.azure_location}" "sku" { name = "${var.data_instance_type}" tier = "Standard" capacity = "${var.datas_count}" }
resource "azurerm_virtual_machine_scale_set" "master-nodes" { count = "${var.masters_count == "0" ? "0" : "1"}"
name = "es-${var.es_cluster}-master-nodes" resource_group_name = "${azurerm_resource_group.elasticsearch.name}" location = "${var.azure_location}" "sku" { name = "${var.master_instance_type}" tier = "Standard" capacity = "${var.masters_count}" } upgrade_policy_mode = "Manual" overprovision = false
"os_profile" { computer_name_prefix = "${var.es_cluster}-master" admin_username = "ubuntu" admin_password = "${random_string.vm-login-password.result}" custom_data = "${data.template_file.master_userdata_script.rendered}" }
this is the issue with the "" ."sku" should be sku .. figured it
which version of terraform is used
@eashweragero101 TF 12 and up - what version were you using?
Error: Invalid argument name
on clients.tf line 31, in resource "azurerm_virtual_machine_scale_set" "client-nodes": 31: "sku" {
Argument names must not be quoted.
Error: Invalid argument name
on datas.tf line 31, in resource "azurerm_virtual_machine_scale_set" "data-nodes": 31: "sku" {
Argument names must not be quoted.
Error: Invalid argument name
on masters.tf line 31, in resource "azurerm_virtual_machine_scale_set" "master-nodes": 31: "sku" {
Argument names must not be quoted.
Error: Invalid argument name
on single-node.tf line 71, in resource "azurerm_virtual_machine" "single-node": 71: "os_profile" {
Argument names must not be quoted.