NIC
nic
This module allows you to create, update or remove a NIC.
Example Syntax
Returned object
For more examples please check out the tests here.
state: present
Available parameters for state present:
Name | Required | Description |
---|---|---|
name str | True | The name of the resource. |
datacenter str | True | The datacenter name or UUID in which to operate. |
server str | True | The server name or UUID. |
lan str | True | The LAN ID the NIC will be on. If the LAN ID does not exist, it will be implicitly created. |
dhcp bool | False | Indicates if the NIC will reserve an IP using DHCP. |
dhcpv6 bool | False | Indicates if the NIC will receive an IPv6 using DHCP. It can be set to 'true' or 'false' only if this NIC is connected to an IPv6 enabled LAN. |
firewall_active bool | False | Activate or deactivate the firewall. By default, an active firewall without any defined rules will block all incoming network traffic except for the firewall rules that explicitly allows certain protocols, IP addresses and ports. |
ips list | False | Collection of IP addresses, assigned to the NIC. Explicitly assigned public IPs need to come from reserved IP blocks. Passing value null or empty array will assign an IP address automatically. |
ipv6_ips list | False | If this NIC is connected to an IPv6 enabled LAN then this property contains the IPv6 IP addresses of the NIC. The maximum number of IPv6 IP addresses per NIC is 50, if you need more, contact support. If you leave this property 'null' when adding a NIC, when changing the NIC's IPv6 CIDR block, when changing the LAN's IPv6 CIDR block or when moving the NIC to a different IPv6 enabled LAN, then we will automatically assign the same number of IPv6 addresses which you had before from the NICs new CIDR block. If you leave this property 'null' while not changing the CIDR block, the IPv6 IP addresses won't be changed either. You can also provide your own self choosen IPv6 addresses, which then must be inside the IPv6 CIDR block of this NIC. |
ipv6_cidr str | False | If this NIC is connected to an IPv6 enabled LAN then this property contains the /80 IPv6 CIDR block of the NIC. If you leave this property 'null' when adding a NIC to an IPv6-enabled LAN, then an IPv6 CIDR block will automatically be assigned to the NIC, but you can also specify an /80 IPv6 CIDR block for the NIC on your own, which must be inside the /64 IPv6 CIDR block of the LAN and unique. This value can only be set, if the LAN already has an IPv6 CIDR block assigned. An IPv6-enabled LAN is limited to a maximum of 65,536 NICs. |
api_url str | False | The Ionos API base URL. |
certificate_fingerprint str | False | The Ionos API certificate fingerprint. |
username str | False | The Ionos username. Overrides the IONOS_USERNAME environment variable. |
password str | False | The Ionos password. Overrides the IONOS_PASSWORD environment variable. |
token str | False | The Ionos token. Overrides the IONOS_TOKEN environment variable. |
wait bool | False | Wait for the resource to be created before returning. Default: True Options: [True, False] |
wait_timeout int | False | How long before wait gives up, in seconds. Default: 600 |
state str | False | Indicate desired state of the resource. Default: present Options: ['present', 'absent', 'update'] |
state: absent
Available parameters for state absent:
Name | Required | Description |
---|---|---|
nic str | True | The ID or name of an existing NIC. |
datacenter str | True | The datacenter name or UUID in which to operate. |
server str | True | The server name or UUID. |
api_url str | False | The Ionos API base URL. |
certificate_fingerprint str | False | The Ionos API certificate fingerprint. |
username str | False | The Ionos username. Overrides the IONOS_USERNAME environment variable. |
password str | False | The Ionos password. Overrides the IONOS_PASSWORD environment variable. |
token str | False | The Ionos token. Overrides the IONOS_TOKEN environment variable. |
wait bool | False | Wait for the resource to be created before returning. Default: True Options: [True, False] |
wait_timeout int | False | How long before wait gives up, in seconds. Default: 600 |
state str | False | Indicate desired state of the resource. Default: present Options: ['present', 'absent', 'update'] |
state: update
Available parameters for state update:
Name | Required | Description |
---|---|---|
name str | False | The name of the resource. |
nic str | True | The ID or name of an existing NIC. |
datacenter str | True | The datacenter name or UUID in which to operate. |
server str | True | The server name or UUID. |
lan str | False | The LAN ID the NIC will be on. If the LAN ID does not exist, it will be implicitly created. |
dhcp bool | False | Indicates if the NIC will reserve an IP using DHCP. |
dhcpv6 bool | False | Indicates if the NIC will receive an IPv6 using DHCP. It can be set to 'true' or 'false' only if this NIC is connected to an IPv6 enabled LAN. |
firewall_active bool | False | Activate or deactivate the firewall. By default, an active firewall without any defined rules will block all incoming network traffic except for the firewall rules that explicitly allows certain protocols, IP addresses and ports. |
ips list | False | Collection of IP addresses, assigned to the NIC. Explicitly assigned public IPs need to come from reserved IP blocks. Passing value null or empty array will assign an IP address automatically. |
ipv6_ips list | False | If this NIC is connected to an IPv6 enabled LAN then this property contains the IPv6 IP addresses of the NIC. The maximum number of IPv6 IP addresses per NIC is 50, if you need more, contact support. If you leave this property 'null' when adding a NIC, when changing the NIC's IPv6 CIDR block, when changing the LAN's IPv6 CIDR block or when moving the NIC to a different IPv6 enabled LAN, then we will automatically assign the same number of IPv6 addresses which you had before from the NICs new CIDR block. If you leave this property 'null' while not changing the CIDR block, the IPv6 IP addresses won't be changed either. You can also provide your own self choosen IPv6 addresses, which then must be inside the IPv6 CIDR block of this NIC. |
ipv6_cidr str | False | If this NIC is connected to an IPv6 enabled LAN then this property contains the /80 IPv6 CIDR block of the NIC. If you leave this property 'null' when adding a NIC to an IPv6-enabled LAN, then an IPv6 CIDR block will automatically be assigned to the NIC, but you can also specify an /80 IPv6 CIDR block for the NIC on your own, which must be inside the /64 IPv6 CIDR block of the LAN and unique. This value can only be set, if the LAN already has an IPv6 CIDR block assigned. An IPv6-enabled LAN is limited to a maximum of 65,536 NICs. |
api_url str | False | The Ionos API base URL. |
certificate_fingerprint str | False | The Ionos API certificate fingerprint. |
username str | False | The Ionos username. Overrides the IONOS_USERNAME environment variable. |
password str | False | The Ionos password. Overrides the IONOS_PASSWORD environment variable. |
token str | False | The Ionos token. Overrides the IONOS_TOKEN environment variable. |
wait bool | False | Wait for the resource to be created before returning. Default: True Options: [True, False] |
wait_timeout int | False | How long before wait gives up, in seconds. Default: 600 |
state str | False | Indicate desired state of the resource. Default: present Options: ['present', 'absent', 'update'] |
Last updated