Search code examples
moduleterraformazure-cloud-services

how to access type list of tuple values of module [NICs] output into another module[VM] in azure terraform


| var.nic1-id is tuple with 2 elements

Inappropriate value for attribute "network_interface_ids": element 0: string required. Please help me in this issue!


Solution

  • If var.nic1-id is a list, then you would do:

    network_interface_ids = var.nic1-id
    

    Otherwise, you are creating a list of lists, which results in your error.