2016-04-04 15:48:14 +02:00
|
|
|
---
|
|
|
|
layout: "cloudstack"
|
|
|
|
page_title: "CloudStack: cloudstack_static_nat"
|
|
|
|
sidebar_current: "docs-cloudstack-resource-static-nat"
|
|
|
|
description: |-
|
|
|
|
Enables static NAT for a given IP address.
|
|
|
|
---
|
|
|
|
|
|
|
|
# cloudstack\_static\_nat
|
|
|
|
|
|
|
|
Enables static NAT for a given IP address
|
|
|
|
|
|
|
|
## Example Usage
|
|
|
|
|
|
|
|
```
|
|
|
|
resource "cloudstack_static_nat" "default" {
|
2017-02-18 23:48:50 +01:00
|
|
|
ip_address_id = "f8141e2f-4e7e-4c63-9362-986c908b7ea7"
|
2016-04-11 17:14:19 +02:00
|
|
|
virtual_machine_id = "6ca2a163-bc68-429c-adc8-ab4a620b1bb3"
|
2016-04-04 15:48:14 +02:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Argument Reference
|
|
|
|
|
|
|
|
The following arguments are supported:
|
|
|
|
|
2016-04-11 17:14:19 +02:00
|
|
|
* `ip_address_id` - (Required) The public IP address ID for which static
|
|
|
|
NAT will be enabled. Changing this forces a new resource to be created.
|
2016-04-04 15:48:14 +02:00
|
|
|
|
2016-04-11 17:14:19 +02:00
|
|
|
* `virtual_machine_id` - (Required) The virtual machine ID to enable the
|
|
|
|
static NAT feature for. Changing this forces a new resource to be created.
|
2016-04-04 15:48:14 +02:00
|
|
|
|
2016-12-12 10:06:42 +01:00
|
|
|
* `vm_guest_ip` - (Optional) The virtual machine IP address to forward the
|
|
|
|
static NAT traffic to (useful when the virtual machine has secondary
|
|
|
|
NICs or IP addresses). Changing this forces a new resource to be created.
|
2016-04-04 15:48:14 +02:00
|
|
|
|
2016-07-27 17:30:18 +02:00
|
|
|
* `project` - (Optional) The name or ID of the project to deploy this
|
|
|
|
instance to. Changing this forces a new resource to be created.
|
|
|
|
|
2016-04-04 15:48:14 +02:00
|
|
|
## Attributes Reference
|
|
|
|
|
|
|
|
The following attributes are exported:
|
|
|
|
|
|
|
|
* `id` - The static nat ID.
|
|
|
|
* `vm_guest_ip` - The IP address of the virtual machine that is used
|
2016-12-12 10:06:42 +01:00
|
|
|
to forward the static NAT traffic to.
|