alicloud.vpc.Ipv6Address
Explore with Pulumi AI
Provides a VPC Ipv6 Address resource.
For information about VPC Ipv6 Address and how to use it, see What is Ipv6 Address.
NOTE: Available since v1.216.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const default = alicloud.resourcemanager.getResourceGroups({});
const defaultGetZones = alicloud.getZones({
availableResourceCreation: "VSwitch",
});
const vpc = new alicloud.vpc.Network("vpc", {
ipv6Isp: "BGP",
cidrBlock: "172.168.0.0/16",
enableIpv6: true,
vpcName: name,
});
const vswich = new alicloud.vpc.Switch("vswich", {
vpcId: vpc.id,
cidrBlock: "172.168.0.0/24",
zoneId: defaultGetZones.then(defaultGetZones => defaultGetZones.zones?.[0]?.id),
vswitchName: name,
ipv6CidrBlockMask: 1,
});
const defaultIpv6Address = new alicloud.vpc.Ipv6Address("default", {
resourceGroupId: _default.then(_default => _default.ids?.[0]),
vswitchId: vswich.id,
ipv6AddressDescription: "create_description",
ipv6AddressName: name,
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = alicloud.resourcemanager.get_resource_groups()
default_get_zones = alicloud.get_zones(available_resource_creation="VSwitch")
vpc = alicloud.vpc.Network("vpc",
ipv6_isp="BGP",
cidr_block="172.168.0.0/16",
enable_ipv6=True,
vpc_name=name)
vswich = alicloud.vpc.Switch("vswich",
vpc_id=vpc.id,
cidr_block="172.168.0.0/24",
zone_id=default_get_zones.zones[0].id,
vswitch_name=name,
ipv6_cidr_block_mask=1)
default_ipv6_address = alicloud.vpc.Ipv6Address("default",
resource_group_id=default.ids[0],
vswitch_id=vswich.id,
ipv6_address_description="create_description",
ipv6_address_name=name)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_default, err := resourcemanager.GetResourceGroups(ctx, nil, nil)
if err != nil {
return err
}
defaultGetZones, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
AvailableResourceCreation: pulumi.StringRef("VSwitch"),
}, nil)
if err != nil {
return err
}
vpc, err := vpc.NewNetwork(ctx, "vpc", &vpc.NetworkArgs{
Ipv6Isp: pulumi.String("BGP"),
CidrBlock: pulumi.String("172.168.0.0/16"),
EnableIpv6: pulumi.Bool(true),
VpcName: pulumi.String(name),
})
if err != nil {
return err
}
vswich, err := vpc.NewSwitch(ctx, "vswich", &vpc.SwitchArgs{
VpcId: vpc.ID(),
CidrBlock: pulumi.String("172.168.0.0/24"),
ZoneId: pulumi.String(defaultGetZones.Zones[0].Id),
VswitchName: pulumi.String(name),
Ipv6CidrBlockMask: pulumi.Int(1),
})
if err != nil {
return err
}
_, err = vpc.NewIpv6Address(ctx, "default", &vpc.Ipv6AddressArgs{
ResourceGroupId: pulumi.String(_default.Ids[0]),
VswitchId: vswich.ID(),
Ipv6AddressDescription: pulumi.String("create_description"),
Ipv6AddressName: pulumi.String(name),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var @default = AliCloud.ResourceManager.GetResourceGroups.Invoke();
var defaultGetZones = AliCloud.GetZones.Invoke(new()
{
AvailableResourceCreation = "VSwitch",
});
var vpc = new AliCloud.Vpc.Network("vpc", new()
{
Ipv6Isp = "BGP",
CidrBlock = "172.168.0.0/16",
EnableIpv6 = true,
VpcName = name,
});
var vswich = new AliCloud.Vpc.Switch("vswich", new()
{
VpcId = vpc.Id,
CidrBlock = "172.168.0.0/24",
ZoneId = defaultGetZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
VswitchName = name,
Ipv6CidrBlockMask = 1,
});
var defaultIpv6Address = new AliCloud.Vpc.Ipv6Address("default", new()
{
ResourceGroupId = @default.Apply(@default => @default.Apply(getResourceGroupsResult => getResourceGroupsResult.Ids[0])),
VswitchId = vswich.Id,
Ipv6AddressDescription = "create_description",
Ipv6AddressName = name,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.resourcemanager.ResourcemanagerFunctions;
import com.pulumi.alicloud.resourcemanager.inputs.GetResourceGroupsArgs;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.inputs.GetZonesArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.alicloud.vpc.Ipv6Address;
import com.pulumi.alicloud.vpc.Ipv6AddressArgs;
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) {
final var config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
final var default = ResourcemanagerFunctions.getResourceGroups();
final var defaultGetZones = AlicloudFunctions.getZones(GetZonesArgs.builder()
.availableResourceCreation("VSwitch")
.build());
var vpc = new Network("vpc", NetworkArgs.builder()
.ipv6Isp("BGP")
.cidrBlock("172.168.0.0/16")
.enableIpv6(true)
.vpcName(name)
.build());
var vswich = new Switch("vswich", SwitchArgs.builder()
.vpcId(vpc.id())
.cidrBlock("172.168.0.0/24")
.zoneId(defaultGetZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
.vswitchName(name)
.ipv6CidrBlockMask("1")
.build());
var defaultIpv6Address = new Ipv6Address("defaultIpv6Address", Ipv6AddressArgs.builder()
.resourceGroupId(default_.ids()[0])
.vswitchId(vswich.id())
.ipv6AddressDescription("create_description")
.ipv6AddressName(name)
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
vpc:
type: alicloud:vpc:Network
properties:
ipv6Isp: BGP
cidrBlock: 172.168.0.0/16
enableIpv6: true
vpcName: ${name}
vswich:
type: alicloud:vpc:Switch
properties:
vpcId: ${vpc.id}
cidrBlock: 172.168.0.0/24
zoneId: ${defaultGetZones.zones[0].id}
vswitchName: ${name}
ipv6CidrBlockMask: '1'
defaultIpv6Address:
type: alicloud:vpc:Ipv6Address
name: default
properties:
resourceGroupId: ${default.ids[0]}
vswitchId: ${vswich.id}
ipv6AddressDescription: create_description
ipv6AddressName: ${name}
variables:
default:
fn::invoke:
Function: alicloud:resourcemanager:getResourceGroups
Arguments: {}
defaultGetZones:
fn::invoke:
Function: alicloud:getZones
Arguments:
availableResourceCreation: VSwitch
Create Ipv6Address Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Ipv6Address(name: string, args: Ipv6AddressArgs, opts?: CustomResourceOptions);
@overload
def Ipv6Address(resource_name: str,
args: Ipv6AddressArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Ipv6Address(resource_name: str,
opts: Optional[ResourceOptions] = None,
vswitch_id: Optional[str] = None,
ipv6_address_description: Optional[str] = None,
ipv6_address_name: Optional[str] = None,
resource_group_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)
func NewIpv6Address(ctx *Context, name string, args Ipv6AddressArgs, opts ...ResourceOption) (*Ipv6Address, error)
public Ipv6Address(string name, Ipv6AddressArgs args, CustomResourceOptions? opts = null)
public Ipv6Address(String name, Ipv6AddressArgs args)
public Ipv6Address(String name, Ipv6AddressArgs args, CustomResourceOptions options)
type: alicloud:vpc:Ipv6Address
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 Ipv6AddressArgs
- 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 Ipv6AddressArgs
- 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 Ipv6AddressArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args Ipv6AddressArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args Ipv6AddressArgs
- 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 ipv6AddressResource = new AliCloud.Vpc.Ipv6Address("ipv6AddressResource", new()
{
VswitchId = "string",
Ipv6AddressDescription = "string",
Ipv6AddressName = "string",
ResourceGroupId = "string",
Tags =
{
{ "string", "string" },
},
});
example, err := vpc.NewIpv6Address(ctx, "ipv6AddressResource", &vpc.Ipv6AddressArgs{
VswitchId: pulumi.String("string"),
Ipv6AddressDescription: pulumi.String("string"),
Ipv6AddressName: pulumi.String("string"),
ResourceGroupId: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var ipv6AddressResource = new Ipv6Address("ipv6AddressResource", Ipv6AddressArgs.builder()
.vswitchId("string")
.ipv6AddressDescription("string")
.ipv6AddressName("string")
.resourceGroupId("string")
.tags(Map.of("string", "string"))
.build());
ipv6_address_resource = alicloud.vpc.Ipv6Address("ipv6AddressResource",
vswitch_id="string",
ipv6_address_description="string",
ipv6_address_name="string",
resource_group_id="string",
tags={
"string": "string",
})
const ipv6AddressResource = new alicloud.vpc.Ipv6Address("ipv6AddressResource", {
vswitchId: "string",
ipv6AddressDescription: "string",
ipv6AddressName: "string",
resourceGroupId: "string",
tags: {
string: "string",
},
});
type: alicloud:vpc:Ipv6Address
properties:
ipv6AddressDescription: string
ipv6AddressName: string
resourceGroupId: string
tags:
string: string
vswitchId: string
Ipv6Address Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Ipv6Address resource accepts the following input properties:
- Vswitch
Id string - The VSwitchId of the IPv6 address.
- Ipv6Address
Description string - The description of the IPv6 Address. The description must be 2 to 256 characters in length. It cannot start with http:// or https://.
- Ipv6Address
Name string - The name of the IPv6 Address. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.
- Resource
Group stringId - The ID of the resource group to which the instance belongs.
- Dictionary<string, string>
- The tags for the resource.
- Vswitch
Id string - The VSwitchId of the IPv6 address.
- Ipv6Address
Description string - The description of the IPv6 Address. The description must be 2 to 256 characters in length. It cannot start with http:// or https://.
- Ipv6Address
Name string - The name of the IPv6 Address. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.
- Resource
Group stringId - The ID of the resource group to which the instance belongs.
- map[string]string
- The tags for the resource.
- vswitch
Id String - The VSwitchId of the IPv6 address.
- ipv6Address
Description String - The description of the IPv6 Address. The description must be 2 to 256 characters in length. It cannot start with http:// or https://.
- ipv6Address
Name String - The name of the IPv6 Address. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.
- resource
Group StringId - The ID of the resource group to which the instance belongs.
- Map<String,String>
- The tags for the resource.
- vswitch
Id string - The VSwitchId of the IPv6 address.
- ipv6Address
Description string - The description of the IPv6 Address. The description must be 2 to 256 characters in length. It cannot start with http:// or https://.
- ipv6Address
Name string - The name of the IPv6 Address. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.
- resource
Group stringId - The ID of the resource group to which the instance belongs.
- {[key: string]: string}
- The tags for the resource.
- vswitch_
id str - The VSwitchId of the IPv6 address.
- ipv6_
address_ strdescription - The description of the IPv6 Address. The description must be 2 to 256 characters in length. It cannot start with http:// or https://.
- ipv6_
address_ strname - The name of the IPv6 Address. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.
- resource_
group_ strid - The ID of the resource group to which the instance belongs.
- Mapping[str, str]
- The tags for the resource.
- vswitch
Id String - The VSwitchId of the IPv6 address.
- ipv6Address
Description String - The description of the IPv6 Address. The description must be 2 to 256 characters in length. It cannot start with http:// or https://.
- ipv6Address
Name String - The name of the IPv6 Address. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.
- resource
Group StringId - The ID of the resource group to which the instance belongs.
- Map<String>
- The tags for the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the Ipv6Address resource produces the following output properties:
- Address string
- IPv6 address.
- Create
Time string - The creation time of the resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- The status of the resource. Available, Pending and Deleting.
- Create
Time string - The creation time of the resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ipv6Address string
- IPv6 address.
- Status string
- The status of the resource. Available, Pending and Deleting.
- create
Time String - The creation time of the resource.
- id String
- The provider-assigned unique ID for this managed resource.
- ipv6Address String
- IPv6 address.
- status String
- The status of the resource. Available, Pending and Deleting.
- create
Time string - The creation time of the resource.
- id string
- The provider-assigned unique ID for this managed resource.
- ipv6Address string
- IPv6 address.
- status string
- The status of the resource. Available, Pending and Deleting.
- create_
time str - The creation time of the resource.
- id str
- The provider-assigned unique ID for this managed resource.
- ipv6_
address str - IPv6 address.
- status str
- The status of the resource. Available, Pending and Deleting.
- create
Time String - The creation time of the resource.
- id String
- The provider-assigned unique ID for this managed resource.
- ipv6Address String
- IPv6 address.
- status String
- The status of the resource. Available, Pending and Deleting.
Look up Existing Ipv6Address Resource
Get an existing Ipv6Address 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?: Ipv6AddressState, opts?: CustomResourceOptions): Ipv6Address
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
create_time: Optional[str] = None,
ipv6_address: Optional[str] = None,
ipv6_address_description: Optional[str] = None,
ipv6_address_name: Optional[str] = None,
resource_group_id: Optional[str] = None,
status: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
vswitch_id: Optional[str] = None) -> Ipv6Address
func GetIpv6Address(ctx *Context, name string, id IDInput, state *Ipv6AddressState, opts ...ResourceOption) (*Ipv6Address, error)
public static Ipv6Address Get(string name, Input<string> id, Ipv6AddressState? state, CustomResourceOptions? opts = null)
public static Ipv6Address get(String name, Output<String> id, Ipv6AddressState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Address string
- IPv6 address.
- Create
Time string - The creation time of the resource.
- Ipv6Address
Description string - The description of the IPv6 Address. The description must be 2 to 256 characters in length. It cannot start with http:// or https://.
- Ipv6Address
Name string - The name of the IPv6 Address. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.
- Resource
Group stringId - The ID of the resource group to which the instance belongs.
- Status string
- The status of the resource. Available, Pending and Deleting.
- Dictionary<string, string>
- The tags for the resource.
- Vswitch
Id string - The VSwitchId of the IPv6 address.
- Create
Time string - The creation time of the resource.
- Ipv6Address string
- IPv6 address.
- Ipv6Address
Description string - The description of the IPv6 Address. The description must be 2 to 256 characters in length. It cannot start with http:// or https://.
- Ipv6Address
Name string - The name of the IPv6 Address. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.
- Resource
Group stringId - The ID of the resource group to which the instance belongs.
- Status string
- The status of the resource. Available, Pending and Deleting.
- map[string]string
- The tags for the resource.
- Vswitch
Id string - The VSwitchId of the IPv6 address.
- create
Time String - The creation time of the resource.
- ipv6Address String
- IPv6 address.
- ipv6Address
Description String - The description of the IPv6 Address. The description must be 2 to 256 characters in length. It cannot start with http:// or https://.
- ipv6Address
Name String - The name of the IPv6 Address. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.
- resource
Group StringId - The ID of the resource group to which the instance belongs.
- status String
- The status of the resource. Available, Pending and Deleting.
- Map<String,String>
- The tags for the resource.
- vswitch
Id String - The VSwitchId of the IPv6 address.
- create
Time string - The creation time of the resource.
- ipv6Address string
- IPv6 address.
- ipv6Address
Description string - The description of the IPv6 Address. The description must be 2 to 256 characters in length. It cannot start with http:// or https://.
- ipv6Address
Name string - The name of the IPv6 Address. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.
- resource
Group stringId - The ID of the resource group to which the instance belongs.
- status string
- The status of the resource. Available, Pending and Deleting.
- {[key: string]: string}
- The tags for the resource.
- vswitch
Id string - The VSwitchId of the IPv6 address.
- create_
time str - The creation time of the resource.
- ipv6_
address str - IPv6 address.
- ipv6_
address_ strdescription - The description of the IPv6 Address. The description must be 2 to 256 characters in length. It cannot start with http:// or https://.
- ipv6_
address_ strname - The name of the IPv6 Address. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.
- resource_
group_ strid - The ID of the resource group to which the instance belongs.
- status str
- The status of the resource. Available, Pending and Deleting.
- Mapping[str, str]
- The tags for the resource.
- vswitch_
id str - The VSwitchId of the IPv6 address.
- create
Time String - The creation time of the resource.
- ipv6Address String
- IPv6 address.
- ipv6Address
Description String - The description of the IPv6 Address. The description must be 2 to 256 characters in length. It cannot start with http:// or https://.
- ipv6Address
Name String - The name of the IPv6 Address. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.
- resource
Group StringId - The ID of the resource group to which the instance belongs.
- status String
- The status of the resource. Available, Pending and Deleting.
- Map<String>
- The tags for the resource.
- vswitch
Id String - The VSwitchId of the IPv6 address.
Import
VPC Ipv6 Address can be imported using the id, e.g.
$ pulumi import alicloud:vpc/ipv6Address:Ipv6Address example <id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.