vkcs.NetworkingAnycastip
Explore with Pulumi AI
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:
- Network
Id string - required string → ID of the external network to choose ip for anycast IP from.
- Associations
List<Networking
Anycastip Association> - set → List of port associations with anycast IP.
- Description string
- optional string → Description of the anycast IP.
- Health
Check NetworkingAnycastip Health Check - 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 string - required string → ID of the external network to choose ip for anycast IP from.
- Associations
[]Networking
Anycastip Association Args - set → List of port associations with anycast IP.
- Description string
- optional string → Description of the anycast IP.
- Health
Check NetworkingAnycastip Health Check Args - 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 String - required string → ID of the external network to choose ip for anycast IP from.
- associations
List<Networking
Anycastip Association> - set → List of port associations with anycast IP.
- description String
- optional string → Description of the anycast IP.
- health
Check NetworkingAnycastip Health Check - 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 string - required string → ID of the external network to choose ip for anycast IP from.
- associations
Networking
Anycastip Association[] - set → List of port associations with anycast IP.
- description string
- optional string → Description of the anycast IP.
- health
Check NetworkingAnycastip Health Check - 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[Networking
Anycastip Association Args] - set → List of port associations with anycast IP.
- description str
- optional string → Description of the anycast IP.
- health_
check NetworkingAnycastip Health Check Args - 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.
- network
Id 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.
- health
Check 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 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.
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.
- Associations
List<Networking
Anycastip Association> - set → List of port associations with anycast IP.
- Description string
- optional string → Description of the anycast IP.
- Health
Check NetworkingAnycastip Health Check - optional → Health check settings.
- Ip
Address string - string → Anycast IP address.
- Name string
- optional string → Name of the anycast IP.
- Network
Id 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. - Subnet
Id string - string → Anycast IP subnet id.
- Associations
[]Networking
Anycastip Association Args - set → List of port associations with anycast IP.
- Description string
- optional string → Description of the anycast IP.
- Health
Check NetworkingAnycastip Health Check Args - optional → Health check settings.
- Ip
Address string - string → Anycast IP address.
- Name string
- optional string → Name of the anycast IP.
- Network
Id 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. - Subnet
Id string - string → Anycast IP subnet id.
- associations
List<Networking
Anycastip Association> - set → List of port associations with anycast IP.
- description String
- optional string → Description of the anycast IP.
- health
Check NetworkingAnycastip Health Check - optional → Health check settings.
- ip
Address String - string → Anycast IP address.
- name String
- optional string → Name of the anycast IP.
- network
Id 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. - subnet
Id String - string → Anycast IP subnet id.
- associations
Networking
Anycastip Association[] - set → List of port associations with anycast IP.
- description string
- optional string → Description of the anycast IP.
- health
Check NetworkingAnycastip Health Check - optional → Health check settings.
- ip
Address string - string → Anycast IP address.
- name string
- optional string → Name of the anycast IP.
- network
Id 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. - subnet
Id string - string → Anycast IP subnet id.
- associations
Sequence[Networking
Anycastip Association Args] - set → List of port associations with anycast IP.
- description str
- optional string → Description of the anycast IP.
- health_
check NetworkingAnycastip Health Check Args - 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.
- health
Check Property Map - optional → Health check settings.
- ip
Address String - string → Anycast IP address.
- name String
- optional string → Name of the anycast IP.
- network
Id 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. - subnet
Id String - string → Anycast IP subnet id.
Supporting Types
NetworkingAnycastipAssociation, NetworkingAnycastipAssociationArgs
NetworkingAnycastipHealthCheck, NetworkingAnycastipHealthCheckArgs
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.