title: "AddressGroup" title_tag: "huaweicloud.Vpc.AddressGroup" meta_desc: "Documentation for the huaweicloud.Vpc.AddressGroup resource with examples, input properties, output properties, lookup functions, and supporting types." layout: api no_edit_this_page: true


Manages a VPC IP address group resource within HuaweiCloud.

## Example Usage
using System.Collections.Generic;
using Pulumi;
using Huaweicloud = Pulumi.Huaweicloud;

return await Deployment.RunAsync(() => 
{
    var test = new Huaweicloud.Vpc.AddressGroup("test", new()
    {
        Addresses = new[]
        {
            "192.168.10.10",
            "192.168.1.1-192.168.1.50",
        },
    });

});
package main

import (
    "github.com/huaweicloud/pulumi-huaweicloud/sdk/go/huaweicloud/Vpc"
    "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := Vpc.NewAddressGroup(ctx, "test", &Vpc.AddressGroupArgs{
            Addresses: pulumi.StringArray{
                pulumi.String("192.168.10.10"),
                pulumi.String("192.168.1.1-192.168.1.50"),
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.huaweicloud.Vpc.AddressGroup;
import com.pulumi.huaweicloud.Vpc.AddressGroupArgs;
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 test = new AddressGroup("test", AddressGroupArgs.builder()        
            .addresses(            
                "192.168.10.10",
                "192.168.1.1-192.168.1.50")
            .build());

    }
}
import pulumi
import pulumi_huaweicloud as huaweicloud

test = huaweicloud.vpc.AddressGroup("test", addresses=[
    "192.168.10.10",
    "192.168.1.1-192.168.1.50",
])
import * as pulumi from "@pulumi/pulumi";
import * as huaweicloud from "@pulumi/huaweicloud";

const test = new huaweicloud.Vpc.AddressGroup("test", {
    addresses: [
        "192.168.10.10",
        "192.168.1.1-192.168.1.50",
    ],
});
resources:
  test:
    type: huaweicloud:Vpc:AddressGroup
    properties:
      addresses:
        - 192.168.10.10
        - 192.168.1.1-192.168.1.50

Create AddressGroup Resource {#create}

new AddressGroup(name: string, args: AddressGroupArgs, opts?: CustomResourceOptions);
@overload
def AddressGroup(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 addresses: Optional[Sequence[str]] = None,
                 description: Optional[str] = None,
                 name: Optional[str] = None,
                 region: Optional[str] = None)
@overload
def AddressGroup(resource_name: str,
                 args: AddressGroupArgs,
                 opts: Optional[ResourceOptions] = None)
func NewAddressGroup(ctx *Context, name string, args AddressGroupArgs, opts ...ResourceOption) (*AddressGroup, error)
public AddressGroup(string name, AddressGroupArgs args, CustomResourceOptions? opts = null)
public AddressGroup(String name, AddressGroupArgs args)
public AddressGroup(String name, AddressGroupArgs args, CustomResourceOptions options)
type: huaweicloud:Vpc:AddressGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args AddressGroupArgs
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 AddressGroupArgs
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 AddressGroupArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AddressGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args AddressGroupArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

AddressGroup Resource Properties {#properties}

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The AddressGroup resource accepts the following input properties:

Addresses List<string>

Specifies an array of one or more IPv4 addresses. The address can be a single IP address (such as 192.168.10.10), IP address range (such as 192.168.1.1-192.168.1.50) or IP address CIDR (such as 192.168.0.0/16). The maximum length is 20.

Description string

Specifies the supplementary information about the IP address group. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).

Name string

Specifies the IP address group name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), hyphens (-) and periods (.).

Region string

Specifies tThe region in which to create the IP address group. If omitted, the provider-level region will be used. Changing this creates a new address group.

Addresses []string

Specifies an array of one or more IPv4 addresses. The address can be a single IP address (such as 192.168.10.10), IP address range (such as 192.168.1.1-192.168.1.50) or IP address CIDR (such as 192.168.0.0/16). The maximum length is 20.

Description string

Specifies the supplementary information about the IP address group. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).

Name string

Specifies the IP address group name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), hyphens (-) and periods (.).

Region string

Specifies tThe region in which to create the IP address group. If omitted, the provider-level region will be used. Changing this creates a new address group.

addresses List<String>

Specifies an array of one or more IPv4 addresses. The address can be a single IP address (such as 192.168.10.10), IP address range (such as 192.168.1.1-192.168.1.50) or IP address CIDR (such as 192.168.0.0/16). The maximum length is 20.

description String

Specifies the supplementary information about the IP address group. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).

name String

Specifies the IP address group name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), hyphens (-) and periods (.).

region String

Specifies tThe region in which to create the IP address group. If omitted, the provider-level region will be used. Changing this creates a new address group.

addresses string[]

Specifies an array of one or more IPv4 addresses. The address can be a single IP address (such as 192.168.10.10), IP address range (such as 192.168.1.1-192.168.1.50) or IP address CIDR (such as 192.168.0.0/16). The maximum length is 20.

description string

Specifies the supplementary information about the IP address group. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).

name string

Specifies the IP address group name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), hyphens (-) and periods (.).

region string

Specifies tThe region in which to create the IP address group. If omitted, the provider-level region will be used. Changing this creates a new address group.

addresses Sequence[str]

Specifies an array of one or more IPv4 addresses. The address can be a single IP address (such as 192.168.10.10), IP address range (such as 192.168.1.1-192.168.1.50) or IP address CIDR (such as 192.168.0.0/16). The maximum length is 20.

description str

Specifies the supplementary information about the IP address group. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).

name str

Specifies the IP address group name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), hyphens (-) and periods (.).

region str

Specifies tThe region in which to create the IP address group. If omitted, the provider-level region will be used. Changing this creates a new address group.

addresses List<String>

Specifies an array of one or more IPv4 addresses. The address can be a single IP address (such as 192.168.10.10), IP address range (such as 192.168.1.1-192.168.1.50) or IP address CIDR (such as 192.168.0.0/16). The maximum length is 20.

description String

Specifies the supplementary information about the IP address group. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).

name String

Specifies the IP address group name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), hyphens (-) and periods (.).

region String

Specifies tThe region in which to create the IP address group. If omitted, the provider-level region will be used. Changing this creates a new address group.

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

IpVersion int

The IP version of the address group. The value is 4.

Id string

The provider-assigned unique ID for this managed resource.

IpVersion int

The IP version of the address group. The value is 4.

id String

The provider-assigned unique ID for this managed resource.

ipVersion Integer

The IP version of the address group. The value is 4.

id string

The provider-assigned unique ID for this managed resource.

ipVersion number

The IP version of the address group. The value is 4.

id str

The provider-assigned unique ID for this managed resource.

ip_version int

The IP version of the address group. The value is 4.

id String

The provider-assigned unique ID for this managed resource.

ipVersion Number

The IP version of the address group. The value is 4.

Look up Existing AddressGroup Resource {#look-up}

Get an existing AddressGroup 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?: AddressGroupState, opts?: CustomResourceOptions): AddressGroup
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        addresses: Optional[Sequence[str]] = None,
        description: Optional[str] = None,
        ip_version: Optional[int] = None,
        name: Optional[str] = None,
        region: Optional[str] = None) -> AddressGroup
func GetAddressGroup(ctx *Context, name string, id IDInput, state *AddressGroupState, opts ...ResourceOption) (*AddressGroup, error)
public static AddressGroup Get(string name, Input<string> id, AddressGroupState? state, CustomResourceOptions? opts = null)
public static AddressGroup get(String name, Output<String> id, AddressGroupState 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.
The following state arguments are supported:
Addresses List<string>

Specifies an array of one or more IPv4 addresses. The address can be a single IP address (such as 192.168.10.10), IP address range (such as 192.168.1.1-192.168.1.50) or IP address CIDR (such as 192.168.0.0/16). The maximum length is 20.

Description string

Specifies the supplementary information about the IP address group. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).

IpVersion int

The IP version of the address group. The value is 4.

Name string

Specifies the IP address group name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), hyphens (-) and periods (.).

Region string

Specifies tThe region in which to create the IP address group. If omitted, the provider-level region will be used. Changing this creates a new address group.

Addresses []string

Specifies an array of one or more IPv4 addresses. The address can be a single IP address (such as 192.168.10.10), IP address range (such as 192.168.1.1-192.168.1.50) or IP address CIDR (such as 192.168.0.0/16). The maximum length is 20.

Description string

Specifies the supplementary information about the IP address group. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).

IpVersion int

The IP version of the address group. The value is 4.

Name string

Specifies the IP address group name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), hyphens (-) and periods (.).

Region string

Specifies tThe region in which to create the IP address group. If omitted, the provider-level region will be used. Changing this creates a new address group.

addresses List<String>

Specifies an array of one or more IPv4 addresses. The address can be a single IP address (such as 192.168.10.10), IP address range (such as 192.168.1.1-192.168.1.50) or IP address CIDR (such as 192.168.0.0/16). The maximum length is 20.

description String

Specifies the supplementary information about the IP address group. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).

ipVersion Integer

The IP version of the address group. The value is 4.

name String

Specifies the IP address group name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), hyphens (-) and periods (.).

region String

Specifies tThe region in which to create the IP address group. If omitted, the provider-level region will be used. Changing this creates a new address group.

addresses string[]

Specifies an array of one or more IPv4 addresses. The address can be a single IP address (such as 192.168.10.10), IP address range (such as 192.168.1.1-192.168.1.50) or IP address CIDR (such as 192.168.0.0/16). The maximum length is 20.

description string

Specifies the supplementary information about the IP address group. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).

ipVersion number

The IP version of the address group. The value is 4.

name string

Specifies the IP address group name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), hyphens (-) and periods (.).

region string

Specifies tThe region in which to create the IP address group. If omitted, the provider-level region will be used. Changing this creates a new address group.

addresses Sequence[str]

Specifies an array of one or more IPv4 addresses. The address can be a single IP address (such as 192.168.10.10), IP address range (such as 192.168.1.1-192.168.1.50) or IP address CIDR (such as 192.168.0.0/16). The maximum length is 20.

description str

Specifies the supplementary information about the IP address group. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).

ip_version int

The IP version of the address group. The value is 4.

name str

Specifies the IP address group name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), hyphens (-) and periods (.).

region str

Specifies tThe region in which to create the IP address group. If omitted, the provider-level region will be used. Changing this creates a new address group.

addresses List<String>

Specifies an array of one or more IPv4 addresses. The address can be a single IP address (such as 192.168.10.10), IP address range (such as 192.168.1.1-192.168.1.50) or IP address CIDR (such as 192.168.0.0/16). The maximum length is 20.

description String

Specifies the supplementary information about the IP address group. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).

ipVersion Number

The IP version of the address group. The value is 4.

name String

Specifies the IP address group name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), hyphens (-) and periods (.).

region String

Specifies tThe region in which to create the IP address group. If omitted, the provider-level region will be used. Changing this creates a new address group.

Import

IP address groups can be imported using the id, e.g.

 $ pulumi import huaweicloud:Vpc/addressGroup:AddressGroup test bc96f6b0-ca2c-42ee-b719-0f26bc9c8661

Package Details

Repository
https://github.com/huaweicloud/pulumi-huaweicloud
License
Apache-2.0
Notes

This Pulumi package is based on the huaweicloud Terraform Provider.