2017-01-18 15:43:09 +01:00
---
layout: "profitbricks"
page_title: "ProfitBricks: profitbricks_nic"
2017-01-26 18:28:01 +01:00
sidebar_current: "docs-profitbricks-resource-nic"
2017-01-18 15:43:09 +01:00
description: |-
Creates and manages Network Interface objects.
---
# profitbricks\_nic
Manages a NICs on ProfitBricks
## Example Usage
2017-04-17 12:17:54 +02:00
```hcl
2017-01-18 15:43:09 +01:00
resource "profitbricks_nic" "example" {
datacenter_id = "${profitbricks_datacenter.example.id}"
2017-02-18 23:48:50 +01:00
server_id = "${profitbricks_server.example.id}"
lan = 2
dhcp = true
ip = "${profitbricks_ipblock.example.ip}"
2017-01-18 15:43:09 +01:00
}
```
##Argument reference
* `datacenter_id` - (Required)[string]< sup > [1](#myfootnote1)</ sup >
* `server_id` - (Required)[string]< sup > [1](#myfootnote1)</ sup >
2017-02-18 23:48:50 +01:00
* `lan` - (Required) [integer] The LAN ID the NIC will sit on.
2017-01-18 15:43:09 +01:00
* `name` - (Optional) [string] The name of the LAN.
* `dhcp` - (Optional) [boolean]
* `ip` - (Optional) [string] IP assigned to the NIC.
* `firewall_active` - (Optional) [boolean] If this resource is set to true and is nested under a server resource firewall, with open SSH port, resource must be nested under the nic.
2017-02-02 14:26:14 +01:00
* `nat` - (Optional) [boolean] Boolean value indicating if the private IP address has outbound access to the public internet.