1. Packages
  2. Vkcs Provider
  3. API Docs
  4. NetworkingAnycastip
vkcs 0.10.0 published on Monday, May 19, 2025 by vk-cs

vkcs.NetworkingAnycastip

Explore with Pulumi AI

vkcs logo
vkcs 0.10.0 published on Monday, May 19, 2025 by vk-cs

    Example Usage

    Anycast IP association with two octavia loadbalancers

    import * as pulumi from "@pulumi/pulumi";
    import * as vkcs from "@pulumi/vkcs";
    
    const anycastip = new vkcs.NetworkingAnycastip("anycastip", {
        description: "app-tf-example",
        networkId: data.vkcs_networking_network.extnet.id,
        associations: [
            {
                id: vkcs_lb_loadbalancer.app1.vip_port_id,
                type: "octavia",
            },
            {
                id: vkcs_lb_loadbalancer.app2.vip_port_id,
                type: "octavia",
            },
        ],
    });
    
    import pulumi
    import pulumi_vkcs as vkcs
    
    anycastip = vkcs.NetworkingAnycastip("anycastip",
        description="app-tf-example",
        network_id=data["vkcs_networking_network"]["extnet"]["id"],
        associations=[
            {
                "id": vkcs_lb_loadbalancer["app1"]["vip_port_id"],
                "type": "octavia",
            },
            {
                "id": vkcs_lb_loadbalancer["app2"]["vip_port_id"],
                "type": "octavia",
            },
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vkcs/vkcs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vkcs.NewNetworkingAnycastip(ctx, "anycastip", &vkcs.NetworkingAnycastipArgs{
    			Description: pulumi.String("app-tf-example"),
    			NetworkId:   pulumi.Any(data.Vkcs_networking_network.Extnet.Id),
    			Associations: vkcs.NetworkingAnycastipAssociationArray{
    				&vkcs.NetworkingAnycastipAssociationArgs{
    					Id:   pulumi.Any(vkcs_lb_loadbalancer.App1.Vip_port_id),
    					Type: pulumi.String("octavia"),
    				},
    				&vkcs.NetworkingAnycastipAssociationArgs{
    					Id:   pulumi.Any(vkcs_lb_loadbalancer.App2.Vip_port_id),
    					Type: pulumi.String("octavia"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vkcs = Pulumi.Vkcs;
    
    return await Deployment.RunAsync(() => 
    {
        var anycastip = new Vkcs.NetworkingAnycastip("anycastip", new()
        {
            Description = "app-tf-example",
            NetworkId = data.Vkcs_networking_network.Extnet.Id,
            Associations = new[]
            {
                new Vkcs.Inputs.NetworkingAnycastipAssociationArgs
                {
                    Id = vkcs_lb_loadbalancer.App1.Vip_port_id,
                    Type = "octavia",
                },
                new Vkcs.Inputs.NetworkingAnycastipAssociationArgs
                {
                    Id = vkcs_lb_loadbalancer.App2.Vip_port_id,
                    Type = "octavia",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vkcs.NetworkingAnycastip;
    import com.pulumi.vkcs.NetworkingAnycastipArgs;
    import com.pulumi.vkcs.inputs.NetworkingAnycastipAssociationArgs;
    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) {
            var anycastip = new NetworkingAnycastip("anycastip", NetworkingAnycastipArgs.builder()
                .description("app-tf-example")
                .networkId(data.vkcs_networking_network().extnet().id())
                .associations(            
                    NetworkingAnycastipAssociationArgs.builder()
                        .id(vkcs_lb_loadbalancer.app1().vip_port_id())
                        .type("octavia")
                        .build(),
                    NetworkingAnycastipAssociationArgs.builder()
                        .id(vkcs_lb_loadbalancer.app2().vip_port_id())
                        .type("octavia")
                        .build())
                .build());
    
        }
    }
    
    resources:
      anycastip:
        type: vkcs:NetworkingAnycastip
        properties:
          description: app-tf-example
          networkId: ${data.vkcs_networking_network.extnet.id}
          associations:
            - id: ${vkcs_lb_loadbalancer.app1.vip_port_id}
              type: octavia
            - id: ${vkcs_lb_loadbalancer.app2.vip_port_id}
              type: octavia
    

    Create NetworkingAnycastip Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new NetworkingAnycastip(name: string, args: NetworkingAnycastipArgs, opts?: CustomResourceOptions);
    @overload
    def NetworkingAnycastip(resource_name: str,
                            args: NetworkingAnycastipArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def NetworkingAnycastip(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            network_id: Optional[str] = None,
                            associations: Optional[Sequence[NetworkingAnycastipAssociationArgs]] = None,
                            description: Optional[str] = None,
                            health_check: Optional[NetworkingAnycastipHealthCheckArgs] = None,
                            name: Optional[str] = None,
                            region: Optional[str] = None)
    func NewNetworkingAnycastip(ctx *Context, name string, args NetworkingAnycastipArgs, opts ...ResourceOption) (*NetworkingAnycastip, error)
    public NetworkingAnycastip(string name, NetworkingAnycastipArgs args, CustomResourceOptions? opts = null)
    public NetworkingAnycastip(String name, NetworkingAnycastipArgs args)
    public NetworkingAnycastip(String name, NetworkingAnycastipArgs args, CustomResourceOptions options)
    
    type: vkcs:NetworkingAnycastip
    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 NetworkingAnycastipArgs
    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 NetworkingAnycastipArgs
    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 NetworkingAnycastipArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NetworkingAnycastipArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NetworkingAnycastipArgs
    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 networkingAnycastipResource = new Vkcs.NetworkingAnycastip("networkingAnycastipResource", new()
    {
        NetworkId = "string",
        Associations = new[]
        {
            new Vkcs.Inputs.NetworkingAnycastipAssociationArgs
            {
                Id = "string",
                Type = "string",
            },
        },
        Description = "string",
        HealthCheck = new Vkcs.Inputs.NetworkingAnycastipHealthCheckArgs
        {
            Port = 0,
            Type = "string",
        },
        Name = "string",
        Region = "string",
    });
    
    example, err := vkcs.NewNetworkingAnycastip(ctx, "networkingAnycastipResource", &vkcs.NetworkingAnycastipArgs{
    	NetworkId: pulumi.String("string"),
    	Associations: vkcs.NetworkingAnycastipAssociationArray{
    		&vkcs.NetworkingAnycastipAssociationArgs{
    			Id:   pulumi.String("string"),
    			Type: pulumi.String("string"),
    		},
    	},
    	Description: pulumi.String("string"),
    	HealthCheck: &vkcs.NetworkingAnycastipHealthCheckArgs{
    		Port: pulumi.Float64(0),
    		Type: pulumi.String("string"),
    	},
    	Name:   pulumi.String("string"),
    	Region: pulumi.String("string"),
    })
    
    var networkingAnycastipResource = new NetworkingAnycastip("networkingAnycastipResource", NetworkingAnycastipArgs.builder()
        .networkId("string")
        .associations(NetworkingAnycastipAssociationArgs.builder()
            .id("string")
            .type("string")
            .build())
        .description("string")
        .healthCheck(NetworkingAnycastipHealthCheckArgs.builder()
            .port(0.0)
            .type("string")
            .build())
        .name("string")
        .region("string")
        .build());
    
    networking_anycastip_resource = vkcs.NetworkingAnycastip("networkingAnycastipResource",
        network_id="string",
        associations=[{
            "id": "string",
            "type": "string",
        }],
        description="string",
        health_check={
            "port": 0,
            "type": "string",
        },
        name="string",
        region="string")
    
    const networkingAnycastipResource = new vkcs.NetworkingAnycastip("networkingAnycastipResource", {
        networkId: "string",
        associations: [{
            id: "string",
            type: "string",
        }],
        description: "string",
        healthCheck: {
            port: 0,
            type: "string",
        },
        name: "string",
        region: "string",
    });
    
    type: vkcs:NetworkingAnycastip
    properties:
        associations:
            - id: string
              type: string
        description: string
        healthCheck:
            port: 0
            type: string
        name: string
        networkId: string
        region: string
    

    NetworkingAnycastip 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 NetworkingAnycastip resource accepts the following input properties:

    NetworkId string
    required string → ID of the external network to choose ip for anycast IP from.
    Associations List<NetworkingAnycastipAssociation>
    set → List of port associations with anycast IP.
    Description string
    optional string → Description of the anycast IP.
    HealthCheck NetworkingAnycastipHealthCheck
    optional → Health check settings.
    Name string
    optional string → Name of the anycast IP.
    Region string
    optional string → The region in which to obtain the Networking client. If omitted, the region argument of the provider is used. Changing this creates a new resource.
    NetworkId string
    required string → ID of the external network to choose ip for anycast IP from.
    Associations []NetworkingAnycastipAssociationArgs
    set → List of port associations with anycast IP.
    Description string
    optional string → Description of the anycast IP.
    HealthCheck NetworkingAnycastipHealthCheckArgs
    optional → Health check settings.
    Name string
    optional string → Name of the anycast IP.
    Region string
    optional string → The region in which to obtain the Networking client. If omitted, the region argument of the provider is used. Changing this creates a new resource.
    networkId String
    required string → ID of the external network to choose ip for anycast IP from.
    associations List<NetworkingAnycastipAssociation>
    set → List of port associations with anycast IP.
    description String
    optional string → Description of the anycast IP.
    healthCheck NetworkingAnycastipHealthCheck
    optional → Health check settings.
    name String
    optional string → Name of the anycast IP.
    region String
    optional string → The region in which to obtain the Networking client. If omitted, the region argument of the provider is used. Changing this creates a new resource.
    networkId string
    required string → ID of the external network to choose ip for anycast IP from.
    associations NetworkingAnycastipAssociation[]
    set → List of port associations with anycast IP.
    description string
    optional string → Description of the anycast IP.
    healthCheck NetworkingAnycastipHealthCheck
    optional → Health check settings.
    name string
    optional string → Name of the anycast IP.
    region string
    optional string → The region in which to obtain the Networking client. If omitted, the region argument of the provider is used. Changing this creates a new resource.
    network_id str
    required string → ID of the external network to choose ip for anycast IP from.
    associations Sequence[NetworkingAnycastipAssociationArgs]
    set → List of port associations with anycast IP.
    description str
    optional string → Description of the anycast IP.
    health_check NetworkingAnycastipHealthCheckArgs
    optional → Health check settings.
    name str
    optional string → Name of the anycast IP.
    region str
    optional string → The region in which to obtain the Networking client. If omitted, the region argument of the provider is used. Changing this creates a new resource.
    networkId String
    required string → ID of the external network to choose ip for anycast IP from.
    associations List<Property Map>
    set → List of port associations with anycast IP.
    description String
    optional string → Description of the anycast IP.
    healthCheck Property Map
    optional → Health check settings.
    name String
    optional string → Name of the anycast IP.
    region String
    optional string → The region in which to obtain the Networking client. If omitted, the region argument of the provider is used. Changing this creates a new resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the NetworkingAnycastip resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    IpAddress string
    string → Anycast IP address.
    SubnetId string
    string → Anycast IP subnet id.
    Id string
    The provider-assigned unique ID for this managed resource.
    IpAddress string
    string → Anycast IP address.
    SubnetId string
    string → Anycast IP subnet id.
    id String
    The provider-assigned unique ID for this managed resource.
    ipAddress String
    string → Anycast IP address.
    subnetId String
    string → Anycast IP subnet id.
    id string
    The provider-assigned unique ID for this managed resource.
    ipAddress string
    string → Anycast IP address.
    subnetId string
    string → Anycast IP subnet id.
    id str
    The provider-assigned unique ID for this managed resource.
    ip_address str
    string → Anycast IP address.
    subnet_id str
    string → Anycast IP subnet id.
    id String
    The provider-assigned unique ID for this managed resource.
    ipAddress String
    string → Anycast IP address.
    subnetId String
    string → Anycast IP subnet id.

    Look up Existing NetworkingAnycastip Resource

    Get an existing NetworkingAnycastip 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?: NetworkingAnycastipState, opts?: CustomResourceOptions): NetworkingAnycastip
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            associations: Optional[Sequence[NetworkingAnycastipAssociationArgs]] = None,
            description: Optional[str] = None,
            health_check: Optional[NetworkingAnycastipHealthCheckArgs] = None,
            ip_address: Optional[str] = None,
            name: Optional[str] = None,
            network_id: Optional[str] = None,
            region: Optional[str] = None,
            subnet_id: Optional[str] = None) -> NetworkingAnycastip
    func GetNetworkingAnycastip(ctx *Context, name string, id IDInput, state *NetworkingAnycastipState, opts ...ResourceOption) (*NetworkingAnycastip, error)
    public static NetworkingAnycastip Get(string name, Input<string> id, NetworkingAnycastipState? state, CustomResourceOptions? opts = null)
    public static NetworkingAnycastip get(String name, Output<String> id, NetworkingAnycastipState state, CustomResourceOptions options)
    resources:  _:    type: vkcs:NetworkingAnycastip    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.
    The following state arguments are supported:
    Associations List<NetworkingAnycastipAssociation>
    set → List of port associations with anycast IP.
    Description string
    optional string → Description of the anycast IP.
    HealthCheck NetworkingAnycastipHealthCheck
    optional → Health check settings.
    IpAddress string
    string → Anycast IP address.
    Name string
    optional string → Name of the anycast IP.
    NetworkId string
    required string → ID of the external network to choose ip for anycast IP from.
    Region string
    optional string → The region in which to obtain the Networking client. If omitted, the region argument of the provider is used. Changing this creates a new resource.
    SubnetId string
    string → Anycast IP subnet id.
    Associations []NetworkingAnycastipAssociationArgs
    set → List of port associations with anycast IP.
    Description string
    optional string → Description of the anycast IP.
    HealthCheck NetworkingAnycastipHealthCheckArgs
    optional → Health check settings.
    IpAddress string
    string → Anycast IP address.
    Name string
    optional string → Name of the anycast IP.
    NetworkId string
    required string → ID of the external network to choose ip for anycast IP from.
    Region string
    optional string → The region in which to obtain the Networking client. If omitted, the region argument of the provider is used. Changing this creates a new resource.
    SubnetId string
    string → Anycast IP subnet id.
    associations List<NetworkingAnycastipAssociation>
    set → List of port associations with anycast IP.
    description String
    optional string → Description of the anycast IP.
    healthCheck NetworkingAnycastipHealthCheck
    optional → Health check settings.
    ipAddress String
    string → Anycast IP address.
    name String
    optional string → Name of the anycast IP.
    networkId String
    required string → ID of the external network to choose ip for anycast IP from.
    region String
    optional string → The region in which to obtain the Networking client. If omitted, the region argument of the provider is used. Changing this creates a new resource.
    subnetId String
    string → Anycast IP subnet id.
    associations NetworkingAnycastipAssociation[]
    set → List of port associations with anycast IP.
    description string
    optional string → Description of the anycast IP.
    healthCheck NetworkingAnycastipHealthCheck
    optional → Health check settings.
    ipAddress string
    string → Anycast IP address.
    name string
    optional string → Name of the anycast IP.
    networkId string
    required string → ID of the external network to choose ip for anycast IP from.
    region string
    optional string → The region in which to obtain the Networking client. If omitted, the region argument of the provider is used. Changing this creates a new resource.
    subnetId string
    string → Anycast IP subnet id.
    associations Sequence[NetworkingAnycastipAssociationArgs]
    set → List of port associations with anycast IP.
    description str
    optional string → Description of the anycast IP.
    health_check NetworkingAnycastipHealthCheckArgs
    optional → Health check settings.
    ip_address str
    string → Anycast IP address.
    name str
    optional string → Name of the anycast IP.
    network_id str
    required string → ID of the external network to choose ip for anycast IP from.
    region str
    optional string → The region in which to obtain the Networking client. If omitted, the region argument of the provider is used. Changing this creates a new resource.
    subnet_id str
    string → Anycast IP subnet id.
    associations List<Property Map>
    set → List of port associations with anycast IP.
    description String
    optional string → Description of the anycast IP.
    healthCheck Property Map
    optional → Health check settings.
    ipAddress String
    string → Anycast IP address.
    name String
    optional string → Name of the anycast IP.
    networkId String
    required string → ID of the external network to choose ip for anycast IP from.
    region String
    optional string → The region in which to obtain the Networking client. If omitted, the region argument of the provider is used. Changing this creates a new resource.
    subnetId String
    string → Anycast IP subnet id.

    Supporting Types

    NetworkingAnycastipAssociation, NetworkingAnycastipAssociationArgs

    Id string
    required string → ID of port / dc interface / octavia loadbalancer vip port.
    Type string
    required string → Type of association. Can be one of: port, dc_interface, octavia.
    Id string
    required string → ID of port / dc interface / octavia loadbalancer vip port.
    Type string
    required string → Type of association. Can be one of: port, dc_interface, octavia.
    id String
    required string → ID of port / dc interface / octavia loadbalancer vip port.
    type String
    required string → Type of association. Can be one of: port, dc_interface, octavia.
    id string
    required string → ID of port / dc interface / octavia loadbalancer vip port.
    type string
    required string → Type of association. Can be one of: port, dc_interface, octavia.
    id str
    required string → ID of port / dc interface / octavia loadbalancer vip port.
    type str
    required string → Type of association. Can be one of: port, dc_interface, octavia.
    id String
    required string → ID of port / dc interface / octavia loadbalancer vip port.
    type String
    required string → Type of association. Can be one of: port, dc_interface, octavia.

    NetworkingAnycastipHealthCheck, NetworkingAnycastipHealthCheckArgs

    Port double
    optional number → Port for check to connect to.
    Type string
    optional string → Check type. Can be one of: TCP, ICMP.
    Port float64
    optional number → Port for check to connect to.
    Type string
    optional string → Check type. Can be one of: TCP, ICMP.
    port Double
    optional number → Port for check to connect to.
    type String
    optional string → Check type. Can be one of: TCP, ICMP.
    port number
    optional number → Port for check to connect to.
    type string
    optional string → Check type. Can be one of: TCP, ICMP.
    port float
    optional number → Port for check to connect to.
    type str
    optional string → Check type. Can be one of: TCP, ICMP.
    port Number
    optional number → Port for check to connect to.
    type String
    optional string → Check type. Can be one of: TCP, ICMP.

    Import

    Anycast IPs can be imported using the id, e.g.

    $ pulumi import vkcs:index/networkingAnycastip:NetworkingAnycastip anycastip_1 bfbed405-dd89-41d9-aa97-6e335161146d
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    vkcs vk-cs/terraform-provider-vkcs
    License
    Notes
    This Pulumi package is based on the vkcs Terraform Provider.
    vkcs logo
    vkcs 0.10.0 published on Monday, May 19, 2025 by vk-cs