Skip to main content

config_profile_interfaces

Creates, updates, deletes, gets or lists a config_profile_interfaces resource.

Overview

Nameconfig_profile_interfaces
TypeResource
Idlinode.linode.config_profile_interfaces

Fields

The following fields are returned by SELECT queries:

A configuration interface object.

NameDatatypeDescription
idintegerRead-only The unique ID representing this interface.
subnet_idintegerThe id of the VPC subnet for this interface. Use this value in a request to assign a Linode to a VPC subnet. - Required for vpc type interfaces. - Returned as null for non-vpc type interfaces. - Once you've assigned a VPC subnet to an interface, you can't update it. - You need to reboot a Linode using the interface's configuration profile to assign the Linode to a VPC subnet.
vpc_idintegerRead-only The id of the VPC configured for this interface. Returned as null for non-vpc type interfaces.
activebooleanRead-only Returns true if the interface is in use, meaning that the Linode has been booted using the configuration profile to which the interface belongs.
ip_rangesarrayIPv4 CIDR VPC subnet ranges that are routed to this interface. When included in a request: - A range can't include any addresses that are assigned to an active Linode or another VPC subnet. - When updating, you need to include any existing ranges to maintain them. If a range is left out, it will be removed. - Submit this as an empty array removes all existing values. - Omit this object to leave existing values as is. <<LB>> > 📘 > > This is only supported for interfaces with a purpose of vpc.
ipam_addressstring (ip/netmask)This interface's private IP address in classless inter-domain routing (CIDR) notation. For interfaces with a purpose of public: - If you include this in a request, set it to an empty string ("") or null. - Returned as null in a response. For interfaces with a purpose of vlan: - To avoid conflicting addresses, make sure this value is unique for each vlan interface. - This should be unique among devices attached to the VLAN to avoid conflict. - If Network Helper is enabled, the Linode's interface will be automatically configured to use this address after the Linode is rebooted. If Network Helper is disabled, enable the address using manual static IP configuration. For interfaces with a purpose of vpc: - If you include this in a request, set it to an empty string ("") or null. - Returned as null in a response. (example: 10.0.0.1/24)
ipv4objectIPv4 addresses configured for this interface. This only applies to interfaces with a purpose of vpc. Returned as null if no vpc interface is assigned.
labelstringFilterable The name of this interface. For interfaces with a purpose of vlan: - Required. - This needs to be unique among a Linode's interfaces. A Linode can't be attached to the same VLAN multiple times. - This can only contain ASCII letters, numbers, and dashes (-). You can't use two consecutive dashes (--). - If the VLAN label is new, a VLAN is created. Up to 10 VLANs can be created in each data center region. To view your active VLANs, run the List VLANs operation. For interfaces with a purpose of public: - If you include this in a request, set it to an empty string ("") or null. - Returned as null in a response. For interfaces with a purpose of vpc: - If you include this in a request, set it to an empty string ("") or null. - Returned as null in a response. (example: example-interface, pattern: [a-zA-Z0-9-]+)
primarybooleanThe default route to the Linode. Each Linode can have one interface set as its primary. If you haven't specifically set a primary, the first non-vlan type interface is automatically treated as the primary. > 📘 > > This needs to be set to false for any interface that uses vlan as its purpose.
purposestringThe type of interface. This can be public, vlan, or vpc. For interfaces with a purpose of public: - You can only define one public interface per Linode. - The Linode's default public IPv4 address is assigned to the public interface. - A Linode needs a public interface in the first or eth0 position to be reachable via the public internet, after it boots. If no public interface is configured, you can only access the Linode through LISH, or through another Linode that's connected to the same VLAN or VPC. For interfaces with a purpose of vlan: - Configuring this purpose of interface attaches a Linode to the VLAN with the specified label. - If an ipam_address is configured, the Linode uses this address. For interfaces with a purpose of vpc: - Configuring this purpose of interface attaches a Linode to an existing VPC subnet with the specified subnet_id. - When the interface is activated, the Linode is configured to use an IP address from the range in the assigned VPC subnet. See ipv4.vpc for more information. (example: vlan)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_linode_config_interfaceselectReturns a single configuration profile interface. To access this operation, your user needs at least the read_only grant for the Linode.

Learn more...

Learn more...
get_linode_config_interfacesselectReturns all configuration profile interfaces assigned to a specific configuration profile, on a specific Linode. To access this operation, your user needs the read_write grant for the Linode.

Learn more...

Learn more...
post_linode_config_interfaceinsertdata__purposeCreates and appends a single interface to the end of the interfaces array for an existing configuration profile. After you add the interface, you need to reboot the target Linode.

- To access this operation, your user needs the read_write grant for the Linode.

- A successful request triggers a linode_config_update event.

- Only one interface can be set as primary. Setting primary to true for an interface sets all other interfaces to false.

Learn more...

Learn more...
put_linode_config_interfacereplaceUpdate a vpc or public configuration profile interface for a specific configuration profile, on a specific Linode.

- To access this operation, your user needs the read_write grant for the Linode.

- A successful request triggers a linode_config_update event.

- Only certain attributes can be updated for a configuration profile interface. You need to add a new configuration profile interface on your Linode if you need new values for any other attribute. Here are the supported objects, based on the interface's purpose:

- public. The primary attribute.

- vpc. The ip_ranges, ipv4, or primary attributes.

- You can't update a configuration profile with a purpose of vlan.

Learn more...

Learn more...
delete_linode_config_interfacedeleteDeletes a configuration profile interface from a specific configuration profile, on a specific Linode.

- To access this operation, your user needs the read_write grant for the Linode.

- A successful request triggers a linode_config_update event.

- You can't delete an active configuration profile interface. First, you need to shut down the associated Linode or restart it using another configuration profile.

Learn more...

Learn more...
post_linode_config_interfacesexecidsReorders the existing Interfaces of a Configuration Profile.

- The User accessing this operation must have read_write grants to the Linode.

Learn more...

Learn more...

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription

SELECT examples

Returns a single configuration profile interface. To access this operation, your user needs at least the read_only grant for the Linode.

Learn more...

Learn more...

SELECT
id,
subnet_id,
vpc_id,
active,
ip_ranges,
ipam_address,
ipv4,
label,
primary,
purpose
FROM linode.linode.config_profile_interfaces;

INSERT examples

Creates and appends a single interface to the end of the interfaces array for an existing configuration profile. After you add the interface, you need to reboot the target Linode.

- To access this operation, your user needs the read_write grant for the Linode.

- A successful request triggers a linode_config_update event.

- Only one interface can be set as primary. Setting primary to true for an interface sets all other interfaces to false.

Learn more...

Learn more...

INSERT INTO linode.linode.config_profile_interfaces (
data__ip_ranges,
data__ipam_address,
data__ipv4,
data__label,
data__primary,
data__purpose,
data__subnet_id
)
SELECT
'{{ ip_ranges }}',
'{{ ipam_address }}',
'{{ ipv4 }}',
'{{ label }}',
{{ primary }},
'{{ purpose }}' --required,
{{ subnet_id }}
RETURNING
id,
subnet_id,
vpc_id,
active,
ip_ranges,
ipam_address,
ipv4,
label,
primary,
purpose
;

REPLACE examples

Update a vpc or public configuration profile interface for a specific configuration profile, on a specific Linode.

- To access this operation, your user needs the read_write grant for the Linode.

- A successful request triggers a linode_config_update event.

- Only certain attributes can be updated for a configuration profile interface. You need to add a new configuration profile interface on your Linode if you need new values for any other attribute. Here are the supported objects, based on the interface's purpose:

- public. The primary attribute.

- vpc. The ip_ranges, ipv4, or primary attributes.

- You can't update a configuration profile with a purpose of vlan.

Learn more...

Learn more...

REPLACE linode.linode.config_profile_interfaces
SET
data__ip_ranges = '{{ ip_ranges }}',
data__ipv4 = '{{ ipv4 }}',
data__primary = {{ primary }}
WHERE

RETURNING
id,
subnet_id,
vpc_id,
active,
ip_ranges,
ipam_address,
ipv4,
label,
primary,
purpose;

DELETE examples

Deletes a configuration profile interface from a specific configuration profile, on a specific Linode.

- To access this operation, your user needs the read_write grant for the Linode.

- A successful request triggers a linode_config_update event.

- You can't delete an active configuration profile interface. First, you need to shut down the associated Linode or restart it using another configuration profile.

Learn more...

Learn more...

DELETE FROM linode.linode.config_profile_interfaces;

Lifecycle Methods

Reorders the existing Interfaces of a Configuration Profile.

- The User accessing this operation must have read_write grants to the Linode.

Learn more...

Learn more...

EXEC linode.linode.config_profile_interfaces.post_linode_config_interfaces 
@@json=
'{
"ids": "{{ ids }}"
}';