{"action":"opened","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/8800","repository_url":"https://api.github.com/repos/hashicorp/terraform","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/8800/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/8800/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/8800/events","html_url":"https://github.com/hashicorp/terraform/issues/8800","id":176463480,"number":8800,"title":"Azure splat operator (*) in azure_network_interface resource not working outside of list","user":{"login":"sherabi","id":2041061,"avatar_url":"https://avatars.githubusercontent.com/u/2041061?v=3","gravatar_id":"","url":"https://api.github.com/users/sherabi","html_url":"https://github.com/sherabi","followers_url":"https://api.github.com/users/sherabi/followers","following_url":"https://api.github.com/users/sherabi/following{/other_user}","gists_url":"https://api.github.com/users/sherabi/gists{/gist_id}","starred_url":"https://api.github.com/users/sherabi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sherabi/subscriptions","organizations_url":"https://api.github.com/users/sherabi/orgs","repos_url":"https://api.github.com/users/sherabi/repos","events_url":"https://api.github.com/users/sherabi/events{/privacy}","received_events_url":"https://api.github.com/users/sherabi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-12T19:32:04Z","updated_at":"2016-09-12T19:32:04Z","closed_at":null,"body":"Please advise if there is something I am doing wrong in the below configuration.\r\n\r\n```\r\nresource \"azurerm_resource_group\" \"TestResourceGroup\" {\r\n  name     = \"TestResourceGroup\"\r\n  location = \"${var.location}\"\r\n}\r\n\r\nresource \"azurerm_virtual_network\" \"TestVirtualNetwork\" {\r\n  name                = \"TestVirtualNetwork\"\r\n  address_space       = [\"10.0.0.0/16\"]\r\n  location            = \"${var.location}\"\r\n  resource_group_name = \"${azurerm_resource_group.TestResourceGroup.name}\"\r\n}\r\n\r\nresource \"azurerm_subnet\" \"TestSubnet\" {\r\n  name                 = \"TestSubnet\"\r\n  resource_group_name  = \"${azurerm_resource_group.TestResourceGroup.name}\"\r\n  virtual_network_name = \"${azurerm_virtual_network.TestVirtualNetwork.name}\"\r\n  address_prefix       = \"10.0.2.0/24\"\r\n}\r\n\r\nresource \"azurerm_public_ip\" \"TestPublicIP\" {\r\n  count = 2\r\n  name = \"TestPublicIP-${count.index}\"\r\n  location = \"${var.location}\"\r\n  resource_group_name = \"${azurerm_resource_group.TestResourceGroup.name}\"\r\n  public_ip_address_allocation = \"dynamic\"\r\n\r\n  tags {\r\n    environment = \"staging\"\r\n  }\r\n}\r\n\r\nresource \"azurerm_network_interface\" \"TestNIC\" {\r\n  count = 2\r\n  name                = \"TestNIC-${count.index}\"\r\n  //name                = \"test\"\r\n  location            = \"${var.location}\"\r\n  resource_group_name = \"${azurerm_resource_group.TestResourceGroup.name}\"\r\n\r\n  ip_configuration {\r\n    name                          = \"testconfiguration1-${count.index}\"\r\n    subnet_id                     = \"${azurerm_subnet.TestSubnet.id}\"\r\n    private_ip_address_allocation = \"dynamic\"\r\n    public_ip_address_id          = \"${azurerm_public_ip.TestPublicIP.*.id}\"\r\n  }\r\n}\r\n\r\nresource \"azurerm_storage_account\" \"TestStorageAccount\" {\r\n  name                = \"teststorageaccount\"\r\n  resource_group_name = \"${azurerm_resource_group.TestResourceGroup.name}\"\r\n  location            = \"${var.location}\"\r\n  account_type        = \"Standard_LRS\"\r\n\r\n  tags {\r\n    environment = \"staging\"\r\n  }\r\n}\r\n\r\nresource \"azurerm_storage_container\" \"TestStorageContainer\" {\r\n  name                  = \"teststoragecontainer\"\r\n  resource_group_name   = \"${azurerm_resource_group.TestResourceGroup.name}\"\r\n  storage_account_name  = \"${azurerm_storage_account.TestStorageAccount.name}\"\r\n  container_access_type = \"private\"\r\n}\r\n\r\nresource \"azurerm_virtual_machine\" \"TestVM\" {\r\n  count = 1\r\n  name                  = \"TestVM-${count.index}\"\r\n  location              = \"${var.location}\"\r\n  resource_group_name   = \"${azurerm_resource_group.TestResourceGroup.name}\"\r\n  network_interface_ids = [\"${azurerm_network_interface.TestNIC.*.id}\"]\r\n  vm_size               = \"Standard_A2\"\r\n\r\n  storage_image_reference {\r\n    publisher = \"OpenLogic\"\r\n    offer = \"CentOS\"\r\n    sku = \"7.1\"\r\n    version = \"latest\"\r\n  }\r\n\r\n  storage_os_disk {\r\n    name          = \"myosdisk1-${count.index}\"\r\n    vhd_uri       = \"${azurerm_storage_account.TestStorageAccount.primary_blob_endpoint}${azurerm_storage_container.TestStorageContainer.name}/myosdisk1-${count.index}.vhd\"\r\n    caching       = \"ReadWrite\"\r\n    create_option = \"FromImage\"\r\n  }\r\n\r\n  os_profile {\r\n    computer_name  = \"Test-${count.index}\"\r\n    admin_username = \"${var.username}\"\r\n    admin_password = \"${var.password}\"\r\n  }\r\n\r\n  os_profile_linux_config {\r\n    disable_password_authentication = false\r\n  }\r\n}\r\n\r\nresource \"azurerm_network_security_group\" \"TestNetworkSG\" {\r\n    name = \"TestNetworkSG\"\r\n    location = \"${var.location}\"\r\n    resource_group_name = \"${azurerm_resource_group.TestResourceGroup.name}\"\r\n}\r\n\r\nresource \"azurerm_network_security_rule\" \"TestSecurityRuleOut\" {\r\n    name = \"outbound\"\r\n    priority = 100\r\n    direction = \"Outbound\"\r\n    access = \"Allow\"\r\n    protocol = \"Tcp\"\r\n    source_port_range = \"22\"\r\n    destination_port_range = \"22\"\r\n    source_address_prefix = \"*\"\r\n    destination_address_prefix = \"*\"\r\n    resource_group_name = \"${azurerm_resource_group.TestResourceGroup.name}\"\r\n    network_security_group_name = \"${azurerm_network_security_group.TestNetworkSG.name}\"\r\n}\r\n\r\nresource \"azurerm_network_security_rule\" \"TestSecurityRuleIn\" {\r\n    name = \"inbound\"\r\n    priority = 100\r\n    direction = \"Inbound\"\r\n    access = \"Allow\"\r\n    protocol = \"Tcp\"\r\n    source_port_range = \"22\"\r\n    destination_port_range = \"22\"\r\n    source_address_prefix = \"*\"\r\n    destination_address_prefix = \"*\"\r\n    resource_group_name = \"${azurerm_resource_group.TestResourceGroup.name}\"\r\n    network_security_group_name = \"${azurerm_network_security_group.TestNetworkSG.name}\"\r\n}\r\n```\r\n\r\nIn the above configuration I first get the following error\r\n\r\n```\r\nmodule root: 1 error(s) occurred:\r\n\r\n* resource 'azurerm_network_interface.TestNIC' config: use of the splat ('*') operator must be wrapped in a list declaration\r\n```\r\n\r\nAfter wrapping the operator in a list I get this error\r\n\r\n```\r\nErrors:\r\n\r\n  * azurerm_network_interface.TestNIC #0: ip_configuration.0.public_ip_address_id must be a single value, not a list\r\n  * azurerm_network_interface.TestNIC #1: ip_configuration.0.public_ip_address_id must be a single value, not a list\r\n```"}}
{"actor":{"display_login":"sherabi"}}