Files
opentf/website/source/docs/providers/cloudstack/r/nic.html.markdown
Sander van Harmelen 815c8840a7 Refactor the use of names vs IDs for parameters referencing other TF resources
We have a curtesy function in place allowing you to specify both a
`name` of `ID`. But in order for the graph to be build correctly when
you recreate or taint stuff that other resources depend on, we need to
reference the `ID` and *not* the `name`.

So in order to enforce this and by that help people to not make this
mistake unknowingly, I deprecated all the parameters this allies to and
changed the logic, docs and tests accordingly.
2016-04-11 17:14:28 +02:00

1.5 KiB

layout, page_title, sidebar_current, description
layout page_title sidebar_current description
cloudstack CloudStack: cloudstack_nic docs-cloudstack-resource-nic Creates an additional NIC to add a VM to the specified network.

cloudstack_nic

Creates an additional NIC to add a VM to the specified network.

Example Usage

Basic usage:

resource "cloudstack_nic" "test" {
    network_id = "6eb22f91-7454-4107-89f4-36afcdf33021"
    ip_address = "192.168.1.1"
    virtual_machine_id = "f8141e2f-4e7e-4c63-9362-986c908b7ea7"
}

Argument Reference

The following arguments are supported:

  • network_id - (Required) The ID of the network to plug the NIC into. Changing this forces a new resource to be created.

  • network - (Required, Deprecated) The name or ID of the network to plug the NIC into. Changing this forces a new resource to be created.

  • ip_address - (Optional) The IP address to assign to the NIC. Changing this forces a new resource to be created.

  • ipaddress - (Optional, Deprecated) The IP address to assign to the NIC. Changing this forces a new resource to be created.

  • virtual_machine_id - (Required) The ID of the virtual machine to which to attach the NIC. Changing this forces a new resource to be created.

  • virtual_machine - (Required, Deprecated) The name or ID of the virtual machine to which to attach the NIC. Changing this forces a new resource to be created.

Attributes Reference

The following attributes are exported:

  • id - The ID of the NIC.
  • ip_address - The assigned IP address.