2015-07-16 17:40:04 +02:00
|
|
|
---
|
|
|
|
layout: "cloudstack"
|
|
|
|
page_title: "CloudStack: cloudstack_secondary_ipaddress"
|
|
|
|
sidebar_current: "docs-cloudstack-resource-secondary-ipaddress"
|
|
|
|
description: |-
|
|
|
|
Assigns a secondary IP to a NIC.
|
|
|
|
---
|
|
|
|
|
2017-04-10 18:15:08 +02:00
|
|
|
# cloudstack_secondary_ipaddress
|
2015-07-16 17:40:04 +02:00
|
|
|
|
|
|
|
Assigns a secondary IP to a NIC.
|
|
|
|
|
|
|
|
## Example Usage
|
|
|
|
|
2017-04-10 18:15:08 +02:00
|
|
|
```hcl
|
2015-07-16 17:40:04 +02:00
|
|
|
resource "cloudstack_secondary_ipaddress" "default" {
|
2017-02-18 23:48:50 +01:00
|
|
|
virtual_machine_id = "server-1"
|
2015-07-16 17:40:04 +02:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Argument Reference
|
|
|
|
|
|
|
|
The following arguments are supported:
|
|
|
|
|
2016-06-25 19:42:01 +02:00
|
|
|
* `ip_address` - (Optional) The IP address to bind the to NIC. If not supplied
|
2016-04-11 17:14:19 +02:00
|
|
|
an IP address will be selected randomly. Changing this forces a new resource
|
|
|
|
to be created.
|
2015-07-16 17:40:04 +02:00
|
|
|
|
2016-04-11 17:14:19 +02:00
|
|
|
* `nic_id` - (Optional) The NIC ID to which you want to attach the secondary IP
|
|
|
|
address. Changing this forces a new resource to be created (defaults to the
|
|
|
|
ID of the primary NIC)
|
2015-07-16 17:40:04 +02:00
|
|
|
|
2016-04-11 17:14:19 +02:00
|
|
|
* `virtual_machine_id` - (Required) The ID of the virtual machine to which you
|
|
|
|
want to attach the secondary IP address. Changing this forces a new resource
|
|
|
|
to be created.
|
|
|
|
|
2015-07-16 17:40:04 +02:00
|
|
|
## Attributes Reference
|
|
|
|
|
|
|
|
The following attributes are exported:
|
|
|
|
|
|
|
|
* `id` - The secondary IP address ID.
|