opentelekomcloud.NetworkingVipV2
Explore with Pulumi AI
Manages a V2 vip resource within OpenTelekomCloud.
Note: Corresponding data source for V2 vip resource is
data_source/networking_port_v2
wherevip_id
can be provided toport_id
along with other arguments.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const network1 = new opentelekomcloud.NetworkingNetworkV2("network1", {adminStateUp: "true"});
const subnet1 = new opentelekomcloud.NetworkingSubnetV2("subnet1", {
cidr: "192.168.199.0/24",
ipVersion: 4,
networkId: network1.networkingNetworkV2Id,
});
const router1 = new opentelekomcloud.NetworkingRouterV2("router1", {externalGateway: "0a2228f2-7f8a-45f1-8e09-9039e1d09975"});
const routerInterface1 = new opentelekomcloud.NetworkingRouterInterfaceV2("routerInterface1", {
routerId: router1.networkingRouterV2Id,
subnetId: subnet1.networkingSubnetV2Id,
});
const vip1 = new opentelekomcloud.NetworkingVipV2("vip1", {
networkId: network1.networkingNetworkV2Id,
subnetId: subnet1.networkingSubnetV2Id,
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
network1 = opentelekomcloud.NetworkingNetworkV2("network1", admin_state_up="true")
subnet1 = opentelekomcloud.NetworkingSubnetV2("subnet1",
cidr="192.168.199.0/24",
ip_version=4,
network_id=network1.networking_network_v2_id)
router1 = opentelekomcloud.NetworkingRouterV2("router1", external_gateway="0a2228f2-7f8a-45f1-8e09-9039e1d09975")
router_interface1 = opentelekomcloud.NetworkingRouterInterfaceV2("routerInterface1",
router_id=router1.networking_router_v2_id,
subnet_id=subnet1.networking_subnet_v2_id)
vip1 = opentelekomcloud.NetworkingVipV2("vip1",
network_id=network1.networking_network_v2_id,
subnet_id=subnet1.networking_subnet_v2_id)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
network1, err := opentelekomcloud.NewNetworkingNetworkV2(ctx, "network1", &opentelekomcloud.NetworkingNetworkV2Args{
AdminStateUp: pulumi.String("true"),
})
if err != nil {
return err
}
subnet1, err := opentelekomcloud.NewNetworkingSubnetV2(ctx, "subnet1", &opentelekomcloud.NetworkingSubnetV2Args{
Cidr: pulumi.String("192.168.199.0/24"),
IpVersion: pulumi.Float64(4),
NetworkId: network1.NetworkingNetworkV2Id,
})
if err != nil {
return err
}
router1, err := opentelekomcloud.NewNetworkingRouterV2(ctx, "router1", &opentelekomcloud.NetworkingRouterV2Args{
ExternalGateway: pulumi.String("0a2228f2-7f8a-45f1-8e09-9039e1d09975"),
})
if err != nil {
return err
}
_, err = opentelekomcloud.NewNetworkingRouterInterfaceV2(ctx, "routerInterface1", &opentelekomcloud.NetworkingRouterInterfaceV2Args{
RouterId: router1.NetworkingRouterV2Id,
SubnetId: subnet1.NetworkingSubnetV2Id,
})
if err != nil {
return err
}
_, err = opentelekomcloud.NewNetworkingVipV2(ctx, "vip1", &opentelekomcloud.NetworkingVipV2Args{
NetworkId: network1.NetworkingNetworkV2Id,
SubnetId: subnet1.NetworkingSubnetV2Id,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var network1 = new Opentelekomcloud.NetworkingNetworkV2("network1", new()
{
AdminStateUp = "true",
});
var subnet1 = new Opentelekomcloud.NetworkingSubnetV2("subnet1", new()
{
Cidr = "192.168.199.0/24",
IpVersion = 4,
NetworkId = network1.NetworkingNetworkV2Id,
});
var router1 = new Opentelekomcloud.NetworkingRouterV2("router1", new()
{
ExternalGateway = "0a2228f2-7f8a-45f1-8e09-9039e1d09975",
});
var routerInterface1 = new Opentelekomcloud.NetworkingRouterInterfaceV2("routerInterface1", new()
{
RouterId = router1.NetworkingRouterV2Id,
SubnetId = subnet1.NetworkingSubnetV2Id,
});
var vip1 = new Opentelekomcloud.NetworkingVipV2("vip1", new()
{
NetworkId = network1.NetworkingNetworkV2Id,
SubnetId = subnet1.NetworkingSubnetV2Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.NetworkingNetworkV2;
import com.pulumi.opentelekomcloud.NetworkingNetworkV2Args;
import com.pulumi.opentelekomcloud.NetworkingSubnetV2;
import com.pulumi.opentelekomcloud.NetworkingSubnetV2Args;
import com.pulumi.opentelekomcloud.NetworkingRouterV2;
import com.pulumi.opentelekomcloud.NetworkingRouterV2Args;
import com.pulumi.opentelekomcloud.NetworkingRouterInterfaceV2;
import com.pulumi.opentelekomcloud.NetworkingRouterInterfaceV2Args;
import com.pulumi.opentelekomcloud.NetworkingVipV2;
import com.pulumi.opentelekomcloud.NetworkingVipV2Args;
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 network1 = new NetworkingNetworkV2("network1", NetworkingNetworkV2Args.builder()
.adminStateUp("true")
.build());
var subnet1 = new NetworkingSubnetV2("subnet1", NetworkingSubnetV2Args.builder()
.cidr("192.168.199.0/24")
.ipVersion(4)
.networkId(network1.networkingNetworkV2Id())
.build());
var router1 = new NetworkingRouterV2("router1", NetworkingRouterV2Args.builder()
.externalGateway("0a2228f2-7f8a-45f1-8e09-9039e1d09975")
.build());
var routerInterface1 = new NetworkingRouterInterfaceV2("routerInterface1", NetworkingRouterInterfaceV2Args.builder()
.routerId(router1.networkingRouterV2Id())
.subnetId(subnet1.networkingSubnetV2Id())
.build());
var vip1 = new NetworkingVipV2("vip1", NetworkingVipV2Args.builder()
.networkId(network1.networkingNetworkV2Id())
.subnetId(subnet1.networkingSubnetV2Id())
.build());
}
}
resources:
network1:
type: opentelekomcloud:NetworkingNetworkV2
properties:
adminStateUp: 'true'
subnet1:
type: opentelekomcloud:NetworkingSubnetV2
properties:
cidr: 192.168.199.0/24
ipVersion: 4
networkId: ${network1.networkingNetworkV2Id}
routerInterface1:
type: opentelekomcloud:NetworkingRouterInterfaceV2
properties:
routerId: ${router1.networkingRouterV2Id}
subnetId: ${subnet1.networkingSubnetV2Id}
router1:
type: opentelekomcloud:NetworkingRouterV2
properties:
externalGateway: 0a2228f2-7f8a-45f1-8e09-9039e1d09975
vip1:
type: opentelekomcloud:NetworkingVipV2
properties:
networkId: ${network1.networkingNetworkV2Id}
subnetId: ${subnet1.networkingSubnetV2Id}
Create NetworkingVipV2 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NetworkingVipV2(name: string, args: NetworkingVipV2Args, opts?: CustomResourceOptions);
@overload
def NetworkingVipV2(resource_name: str,
args: NetworkingVipV2Args,
opts: Optional[ResourceOptions] = None)
@overload
def NetworkingVipV2(resource_name: str,
opts: Optional[ResourceOptions] = None,
network_id: Optional[str] = None,
subnet_id: Optional[str] = None,
ip_address: Optional[str] = None,
name: Optional[str] = None,
networking_vip_v2_id: Optional[str] = None)
func NewNetworkingVipV2(ctx *Context, name string, args NetworkingVipV2Args, opts ...ResourceOption) (*NetworkingVipV2, error)
public NetworkingVipV2(string name, NetworkingVipV2Args args, CustomResourceOptions? opts = null)
public NetworkingVipV2(String name, NetworkingVipV2Args args)
public NetworkingVipV2(String name, NetworkingVipV2Args args, CustomResourceOptions options)
type: opentelekomcloud:NetworkingVipV2
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 NetworkingVipV2Args
- 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 NetworkingVipV2Args
- 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 NetworkingVipV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkingVipV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NetworkingVipV2Args
- 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 networkingVipV2Resource = new Opentelekomcloud.NetworkingVipV2("networkingVipV2Resource", new()
{
NetworkId = "string",
SubnetId = "string",
IpAddress = "string",
Name = "string",
NetworkingVipV2Id = "string",
});
example, err := opentelekomcloud.NewNetworkingVipV2(ctx, "networkingVipV2Resource", &opentelekomcloud.NetworkingVipV2Args{
NetworkId: pulumi.String("string"),
SubnetId: pulumi.String("string"),
IpAddress: pulumi.String("string"),
Name: pulumi.String("string"),
NetworkingVipV2Id: pulumi.String("string"),
})
var networkingVipV2Resource = new NetworkingVipV2("networkingVipV2Resource", NetworkingVipV2Args.builder()
.networkId("string")
.subnetId("string")
.ipAddress("string")
.name("string")
.networkingVipV2Id("string")
.build());
networking_vip_v2_resource = opentelekomcloud.NetworkingVipV2("networkingVipV2Resource",
network_id="string",
subnet_id="string",
ip_address="string",
name="string",
networking_vip_v2_id="string")
const networkingVipV2Resource = new opentelekomcloud.NetworkingVipV2("networkingVipV2Resource", {
networkId: "string",
subnetId: "string",
ipAddress: "string",
name: "string",
networkingVipV2Id: "string",
});
type: opentelekomcloud:NetworkingVipV2
properties:
ipAddress: string
name: string
networkId: string
networkingVipV2Id: string
subnetId: string
NetworkingVipV2 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 NetworkingVipV2 resource accepts the following input properties:
- Network
Id string - The ID of the network to attach the vip to. Changing this creates a new vip.
- Subnet
Id string - Subnet in which to allocate IP address for this vip. Changing this creates a new vip.
- Ip
Address string - IP address desired in the subnet for this vip.
If you don't specify
ip_address
, an available IP address from the specified subnet will be allocated to this vip. - Name string
- A unique name for the vip.
- Networking
Vip stringV2Id - The ID of the vip.
- Network
Id string - The ID of the network to attach the vip to. Changing this creates a new vip.
- Subnet
Id string - Subnet in which to allocate IP address for this vip. Changing this creates a new vip.
- Ip
Address string - IP address desired in the subnet for this vip.
If you don't specify
ip_address
, an available IP address from the specified subnet will be allocated to this vip. - Name string
- A unique name for the vip.
- Networking
Vip stringV2Id - The ID of the vip.
- network
Id String - The ID of the network to attach the vip to. Changing this creates a new vip.
- subnet
Id String - Subnet in which to allocate IP address for this vip. Changing this creates a new vip.
- ip
Address String - IP address desired in the subnet for this vip.
If you don't specify
ip_address
, an available IP address from the specified subnet will be allocated to this vip. - name String
- A unique name for the vip.
- networking
Vip StringV2Id - The ID of the vip.
- network
Id string - The ID of the network to attach the vip to. Changing this creates a new vip.
- subnet
Id string - Subnet in which to allocate IP address for this vip. Changing this creates a new vip.
- ip
Address string - IP address desired in the subnet for this vip.
If you don't specify
ip_address
, an available IP address from the specified subnet will be allocated to this vip. - name string
- A unique name for the vip.
- networking
Vip stringV2Id - The ID of the vip.
- network_
id str - The ID of the network to attach the vip to. Changing this creates a new vip.
- subnet_
id str - Subnet in which to allocate IP address for this vip. Changing this creates a new vip.
- ip_
address str - IP address desired in the subnet for this vip.
If you don't specify
ip_address
, an available IP address from the specified subnet will be allocated to this vip. - name str
- A unique name for the vip.
- networking_
vip_ strv2_ id - The ID of the vip.
- network
Id String - The ID of the network to attach the vip to. Changing this creates a new vip.
- subnet
Id String - Subnet in which to allocate IP address for this vip. Changing this creates a new vip.
- ip
Address String - IP address desired in the subnet for this vip.
If you don't specify
ip_address
, an available IP address from the specified subnet will be allocated to this vip. - name String
- A unique name for the vip.
- networking
Vip StringV2Id - The ID of the vip.
Outputs
All input properties are implicitly available as output properties. Additionally, the NetworkingVipV2 resource produces the following output properties:
- Device
Owner string - The device owner of the vip.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- The status of vip.
- Tenant
Id string - The tenant ID of the vip.
- Device
Owner string - The device owner of the vip.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- The status of vip.
- Tenant
Id string - The tenant ID of the vip.
- device
Owner String - The device owner of the vip.
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- The status of vip.
- tenant
Id String - The tenant ID of the vip.
- device
Owner string - The device owner of the vip.
- id string
- The provider-assigned unique ID for this managed resource.
- status string
- The status of vip.
- tenant
Id string - The tenant ID of the vip.
- device_
owner str - The device owner of the vip.
- id str
- The provider-assigned unique ID for this managed resource.
- status str
- The status of vip.
- tenant_
id str - The tenant ID of the vip.
- device
Owner String - The device owner of the vip.
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- The status of vip.
- tenant
Id String - The tenant ID of the vip.
Look up Existing NetworkingVipV2 Resource
Get an existing NetworkingVipV2 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?: NetworkingVipV2State, opts?: CustomResourceOptions): NetworkingVipV2
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
device_owner: Optional[str] = None,
ip_address: Optional[str] = None,
name: Optional[str] = None,
network_id: Optional[str] = None,
networking_vip_v2_id: Optional[str] = None,
status: Optional[str] = None,
subnet_id: Optional[str] = None,
tenant_id: Optional[str] = None) -> NetworkingVipV2
func GetNetworkingVipV2(ctx *Context, name string, id IDInput, state *NetworkingVipV2State, opts ...ResourceOption) (*NetworkingVipV2, error)
public static NetworkingVipV2 Get(string name, Input<string> id, NetworkingVipV2State? state, CustomResourceOptions? opts = null)
public static NetworkingVipV2 get(String name, Output<String> id, NetworkingVipV2State state, CustomResourceOptions options)
resources: _: type: opentelekomcloud:NetworkingVipV2 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.
- Device
Owner string - The device owner of the vip.
- Ip
Address string - IP address desired in the subnet for this vip.
If you don't specify
ip_address
, an available IP address from the specified subnet will be allocated to this vip. - Name string
- A unique name for the vip.
- Network
Id string - The ID of the network to attach the vip to. Changing this creates a new vip.
- Networking
Vip stringV2Id - The ID of the vip.
- Status string
- The status of vip.
- Subnet
Id string - Subnet in which to allocate IP address for this vip. Changing this creates a new vip.
- Tenant
Id string - The tenant ID of the vip.
- Device
Owner string - The device owner of the vip.
- Ip
Address string - IP address desired in the subnet for this vip.
If you don't specify
ip_address
, an available IP address from the specified subnet will be allocated to this vip. - Name string
- A unique name for the vip.
- Network
Id string - The ID of the network to attach the vip to. Changing this creates a new vip.
- Networking
Vip stringV2Id - The ID of the vip.
- Status string
- The status of vip.
- Subnet
Id string - Subnet in which to allocate IP address for this vip. Changing this creates a new vip.
- Tenant
Id string - The tenant ID of the vip.
- device
Owner String - The device owner of the vip.
- ip
Address String - IP address desired in the subnet for this vip.
If you don't specify
ip_address
, an available IP address from the specified subnet will be allocated to this vip. - name String
- A unique name for the vip.
- network
Id String - The ID of the network to attach the vip to. Changing this creates a new vip.
- networking
Vip StringV2Id - The ID of the vip.
- status String
- The status of vip.
- subnet
Id String - Subnet in which to allocate IP address for this vip. Changing this creates a new vip.
- tenant
Id String - The tenant ID of the vip.
- device
Owner string - The device owner of the vip.
- ip
Address string - IP address desired in the subnet for this vip.
If you don't specify
ip_address
, an available IP address from the specified subnet will be allocated to this vip. - name string
- A unique name for the vip.
- network
Id string - The ID of the network to attach the vip to. Changing this creates a new vip.
- networking
Vip stringV2Id - The ID of the vip.
- status string
- The status of vip.
- subnet
Id string - Subnet in which to allocate IP address for this vip. Changing this creates a new vip.
- tenant
Id string - The tenant ID of the vip.
- device_
owner str - The device owner of the vip.
- ip_
address str - IP address desired in the subnet for this vip.
If you don't specify
ip_address
, an available IP address from the specified subnet will be allocated to this vip. - name str
- A unique name for the vip.
- network_
id str - The ID of the network to attach the vip to. Changing this creates a new vip.
- networking_
vip_ strv2_ id - The ID of the vip.
- status str
- The status of vip.
- subnet_
id str - Subnet in which to allocate IP address for this vip. Changing this creates a new vip.
- tenant_
id str - The tenant ID of the vip.
- device
Owner String - The device owner of the vip.
- ip
Address String - IP address desired in the subnet for this vip.
If you don't specify
ip_address
, an available IP address from the specified subnet will be allocated to this vip. - name String
- A unique name for the vip.
- network
Id String - The ID of the network to attach the vip to. Changing this creates a new vip.
- networking
Vip StringV2Id - The ID of the vip.
- status String
- The status of vip.
- subnet
Id String - Subnet in which to allocate IP address for this vip. Changing this creates a new vip.
- tenant
Id String - The tenant ID of the vip.
Package Details
- Repository
- opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
- License
- Notes
- This Pulumi package is based on the
opentelekomcloud
Terraform Provider.