published on Friday, Mar 13, 2026 by Pulumi
published on Friday, Mar 13, 2026 by Pulumi
Manages IPs shared to a Linode instance. For more information, see the Linode APIv4 docs.
Beta Notice IPv6 sharing is currently available through early access. To use early access resources, the
api_versionprovider argument must be set tov4beta. To learn more, see the early access documentation.
Notice This resource should only be defined once per-instance and should not be used alongside the
shared_ipv4field inlinode.Instance.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";
// Create a single primary node
const primaryInstance = new linode.Instance("primary", {
label: "node-primary",
type: "g6-nanode-1",
region: "eu-central",
});
// Allocate an IP under the primary node
const primary = new linode.InstanceIp("primary", {linodeId: primaryInstance.id});
// Create a secondary node
const secondary = new linode.Instance("secondary", {
label: "node-secondary",
type: "g6-nanode-1",
region: "eu-central",
});
// Share the IP with the secondary node
const share_primary = new linode.InstanceSharedIps("share-primary", {
linodeId: secondary.id,
addresses: [primary.address],
});
import pulumi
import pulumi_linode as linode
# Create a single primary node
primary_instance = linode.Instance("primary",
label="node-primary",
type="g6-nanode-1",
region="eu-central")
# Allocate an IP under the primary node
primary = linode.InstanceIp("primary", linode_id=primary_instance.id)
# Create a secondary node
secondary = linode.Instance("secondary",
label="node-secondary",
type="g6-nanode-1",
region="eu-central")
# Share the IP with the secondary node
share_primary = linode.InstanceSharedIps("share-primary",
linode_id=secondary.id,
addresses=[primary.address])
package main
import (
"github.com/pulumi/pulumi-linode/sdk/v5/go/linode"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create a single primary node
primaryInstance, err := linode.NewInstance(ctx, "primary", &linode.InstanceArgs{
Label: pulumi.String("node-primary"),
Type: pulumi.String("g6-nanode-1"),
Region: pulumi.String("eu-central"),
})
if err != nil {
return err
}
// Allocate an IP under the primary node
primary, err := linode.NewInstanceIp(ctx, "primary", &linode.InstanceIpArgs{
LinodeId: primaryInstance.ID(),
})
if err != nil {
return err
}
// Create a secondary node
secondary, err := linode.NewInstance(ctx, "secondary", &linode.InstanceArgs{
Label: pulumi.String("node-secondary"),
Type: pulumi.String("g6-nanode-1"),
Region: pulumi.String("eu-central"),
})
if err != nil {
return err
}
// Share the IP with the secondary node
_, err = linode.NewInstanceSharedIps(ctx, "share-primary", &linode.InstanceSharedIpsArgs{
LinodeId: secondary.ID(),
Addresses: pulumi.StringArray{
primary.Address,
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Linode = Pulumi.Linode;
return await Deployment.RunAsync(() =>
{
// Create a single primary node
var primaryInstance = new Linode.Instance("primary", new()
{
Label = "node-primary",
Type = "g6-nanode-1",
Region = "eu-central",
});
// Allocate an IP under the primary node
var primary = new Linode.InstanceIp("primary", new()
{
LinodeId = primaryInstance.Id,
});
// Create a secondary node
var secondary = new Linode.Instance("secondary", new()
{
Label = "node-secondary",
Type = "g6-nanode-1",
Region = "eu-central",
});
// Share the IP with the secondary node
var share_primary = new Linode.InstanceSharedIps("share-primary", new()
{
LinodeId = secondary.Id,
Addresses = new[]
{
primary.Address,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.linode.Instance;
import com.pulumi.linode.InstanceArgs;
import com.pulumi.linode.InstanceIp;
import com.pulumi.linode.InstanceIpArgs;
import com.pulumi.linode.InstanceSharedIps;
import com.pulumi.linode.InstanceSharedIpsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
// Create a single primary node
var primaryInstance = new Instance("primaryInstance", InstanceArgs.builder()
.label("node-primary")
.type("g6-nanode-1")
.region("eu-central")
.build());
// Allocate an IP under the primary node
var primary = new InstanceIp("primary", InstanceIpArgs.builder()
.linodeId(primaryInstance.id())
.build());
// Create a secondary node
var secondary = new Instance("secondary", InstanceArgs.builder()
.label("node-secondary")
.type("g6-nanode-1")
.region("eu-central")
.build());
// Share the IP with the secondary node
var share_primary = new InstanceSharedIps("share-primary", InstanceSharedIpsArgs.builder()
.linodeId(secondary.id())
.addresses(primary.address())
.build());
}
}
resources:
# Share the IP with the secondary node
share-primary:
type: linode:InstanceSharedIps
properties:
linodeId: ${secondary.id}
addresses:
- ${primary.address}
# Allocate an IP under the primary node
primary:
type: linode:InstanceIp
properties:
linodeId: ${primaryInstance.id}
# Create a single primary node
primaryInstance:
type: linode:Instance
name: primary
properties:
label: node-primary
type: g6-nanode-1
region: eu-central
# Create a secondary node
secondary:
type: linode:Instance
properties:
label: node-secondary
type: g6-nanode-1
region: eu-central
Create InstanceSharedIps Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new InstanceSharedIps(name: string, args: InstanceSharedIpsArgs, opts?: CustomResourceOptions);@overload
def InstanceSharedIps(resource_name: str,
args: InstanceSharedIpsArgs,
opts: Optional[ResourceOptions] = None)
@overload
def InstanceSharedIps(resource_name: str,
opts: Optional[ResourceOptions] = None,
addresses: Optional[Sequence[str]] = None,
linode_id: Optional[int] = None)func NewInstanceSharedIps(ctx *Context, name string, args InstanceSharedIpsArgs, opts ...ResourceOption) (*InstanceSharedIps, error)public InstanceSharedIps(string name, InstanceSharedIpsArgs args, CustomResourceOptions? opts = null)
public InstanceSharedIps(String name, InstanceSharedIpsArgs args)
public InstanceSharedIps(String name, InstanceSharedIpsArgs args, CustomResourceOptions options)
type: linode:InstanceSharedIps
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args InstanceSharedIpsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args InstanceSharedIpsArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args InstanceSharedIpsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InstanceSharedIpsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args InstanceSharedIpsArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var instanceSharedIpsResource = new Linode.InstanceSharedIps("instanceSharedIpsResource", new()
{
Addresses = new[]
{
"string",
},
LinodeId = 0,
});
example, err := linode.NewInstanceSharedIps(ctx, "instanceSharedIpsResource", &linode.InstanceSharedIpsArgs{
Addresses: pulumi.StringArray{
pulumi.String("string"),
},
LinodeId: pulumi.Int(0),
})
var instanceSharedIpsResource = new InstanceSharedIps("instanceSharedIpsResource", InstanceSharedIpsArgs.builder()
.addresses("string")
.linodeId(0)
.build());
instance_shared_ips_resource = linode.InstanceSharedIps("instanceSharedIpsResource",
addresses=["string"],
linode_id=0)
const instanceSharedIpsResource = new linode.InstanceSharedIps("instanceSharedIpsResource", {
addresses: ["string"],
linodeId: 0,
});
type: linode:InstanceSharedIps
properties:
addresses:
- string
linodeId: 0
InstanceSharedIps Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The InstanceSharedIps resource accepts the following input properties:
Outputs
All input properties are implicitly available as output properties. Additionally, the InstanceSharedIps resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing InstanceSharedIps Resource
Get an existing InstanceSharedIps resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: InstanceSharedIpsState, opts?: CustomResourceOptions): InstanceSharedIps@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
addresses: Optional[Sequence[str]] = None,
linode_id: Optional[int] = None) -> InstanceSharedIpsfunc GetInstanceSharedIps(ctx *Context, name string, id IDInput, state *InstanceSharedIpsState, opts ...ResourceOption) (*InstanceSharedIps, error)public static InstanceSharedIps Get(string name, Input<string> id, InstanceSharedIpsState? state, CustomResourceOptions? opts = null)public static InstanceSharedIps get(String name, Output<String> id, InstanceSharedIpsState state, CustomResourceOptions options)resources: _: type: linode:InstanceSharedIps get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
Package Details
- Repository
- Linode pulumi/pulumi-linode
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
linodeTerraform Provider.
published on Friday, Mar 13, 2026 by Pulumi
