Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terraform .Invalid argument name #97

Open
eashweragero101 opened this issue Nov 4, 2020 · 4 comments
Open

Terraform .Invalid argument name #97

eashweragero101 opened this issue Nov 4, 2020 · 4 comments

Comments

@eashweragero101
Copy link

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.

@eashweragero101
Copy link
Author

### 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

data.tf

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}"
}

masters.tf

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}"
}

@eashweragero101
Copy link
Author

this is the issue with the "" ."sku" should be sku .. figured it

@eashweragero101
Copy link
Author

which version of terraform is used

@synhershko
Copy link
Member

@eashweragero101 TF 12 and up - what version were you using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants