ezgh compute network-interfaces create <name> [--description d] [--firewall f…|--no-firewalls] [--allocate-ipv4|--ipv4 <address>|--subnet s [--private-ipv4 a] [--[no-]allocate-ipv4] [--[no-]allocate-ipv6]] [--tag k=v…] [flags]Create a network interface, with its own routed public IPv6 /64. --allocate-ipv4 gives it a new public IPv4 address (metered while it’s allocated); --ipv4 associates one the project has (ID, UUID, name or the address).
--subnet (ID, UUID or name) makes a private interface in a VPC’s subnet instead: a primary private IPv4 address (--private-ipv4, or the lowest free one) and IPv6 address in the subnet, for its life. With the VPC’s Network Gateway (ezgh compute network-gateways), --allocate-ipv4 gives it a public IPv4 address mapped to its private one and --allocate-ipv6 a public IPv6 /64; --no-allocate-ipv4 and --no-allocate-ipv6 give it none. Without them, the subnet’s auto-assign decides. --ipv4 (an existing address) isn’t taken with --subnet: associate it after (ezgh compute ipv4-addresses associate).
Its firewalls are the project’s default firewall (made then if the project has none yet), or a private interface’s VPC’s default firewall, unless --firewall names them (ID, UUID or name; repeat, at most 5) or --no-firewalls attaches none.
Part of ezgh compute network-interfaces.
Examples
ezgh compute network-interfaces create web --allocate-ipv4
ezgh compute network-interfaces create db --firewall db --firewall ssh
ezgh compute network-interfaces create db-private --subnet app --private-ipv4 10.0.1.20Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--allocate-ipv4 |
boolean | allocate a new public IPv4 address for it | |
--allocate-ipv6 |
boolean | with --subnet: a public IPv6 /64 (the VPC needs a Network Gateway) |
|
--description |
string | what it’s for | |
--firewall |
string, repeatable | a firewall to attach (ID, UUID or name; repeat; default: the project’s default firewall) | |
--ipv4 |
string | associate this IPv4 address of the project’s (ID, UUID, name or address) | |
--no-allocate-ipv4 |
boolean | with --subnet: no public IPv4 address, whatever the subnet’s auto-assign |
|
--no-allocate-ipv6 |
boolean | with --subnet: no public IPv6 /64, whatever the subnet’s auto-assign |
|
--no-firewalls |
boolean | attach no firewall | |
--private-ipv4 |
string | with --subnet: its primary private IPv4 address (default: the lowest free one) |
|
--subnet |
string | make it a private interface in this VPC subnet (ID, UUID or name) | |
--tag |
string, repeatable | a tag, key=value (repeat) |
This command also takes the global flags.