1. Packages
  2. Openstack Provider
  3. API Docs
  4. networking
  5. AddressGroupV2
OpenStack v5.3.2 published on Friday, Jul 18, 2025 by Pulumi

openstack.networking.AddressGroupV2

Explore with Pulumi AI

openstack logo
OpenStack v5.3.2 published on Friday, Jul 18, 2025 by Pulumi

    Manages a V2 neutron address group resource within OpenStack.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const group1 = new openstack.networking.AddressGroupV2("group_1", {
        name: "group_1",
        description: "My neutron address group",
        addresses: [
            "192.168.0.1/32",
            "2001:db8::1/128",
        ],
    });
    
    import pulumi
    import pulumi_openstack as openstack
    
    group1 = openstack.networking.AddressGroupV2("group_1",
        name="group_1",
        description="My neutron address group",
        addresses=[
            "192.168.0.1/32",
            "2001:db8::1/128",
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack/networking"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := networking.NewAddressGroupV2(ctx, "group_1", &networking.AddressGroupV2Args{
    			Name:        pulumi.String("group_1"),
    			Description: pulumi.String("My neutron address group"),
    			Addresses: pulumi.StringArray{
    				pulumi.String("192.168.0.1/32"),
    				pulumi.String("2001:db8::1/128"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var group1 = new OpenStack.Networking.AddressGroupV2("group_1", new()
        {
            Name = "group_1",
            Description = "My neutron address group",
            Addresses = new[]
            {
                "192.168.0.1/32",
                "2001:db8::1/128",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.openstack.networking.AddressGroupV2;
    import com.pulumi.openstack.networking.AddressGroupV2Args;
    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 group1 = new AddressGroupV2("group1", AddressGroupV2Args.builder()
                .name("group_1")
                .description("My neutron address group")
                .addresses(            
                    "192.168.0.1/32",
                    "2001:db8::1/128")
                .build());
    
        }
    }
    
    resources:
      group1:
        type: openstack:networking:AddressGroupV2
        name: group_1
        properties:
          name: group_1
          description: My neutron address group
          addresses:
            - 192.168.0.1/32
            - 2001:db8::1/128
    

    Create AddressGroupV2 Resource

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

    Constructor syntax

    new AddressGroupV2(name: string, args: AddressGroupV2Args, opts?: CustomResourceOptions);
    @overload
    def AddressGroupV2(resource_name: str,
                       args: AddressGroupV2Args,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def AddressGroupV2(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       addresses: Optional[Sequence[str]] = None,
                       description: Optional[str] = None,
                       name: Optional[str] = None,
                       project_id: Optional[str] = None,
                       region: Optional[str] = None)
    func NewAddressGroupV2(ctx *Context, name string, args AddressGroupV2Args, opts ...ResourceOption) (*AddressGroupV2, error)
    public AddressGroupV2(string name, AddressGroupV2Args args, CustomResourceOptions? opts = null)
    public AddressGroupV2(String name, AddressGroupV2Args args)
    public AddressGroupV2(String name, AddressGroupV2Args args, CustomResourceOptions options)
    
    type: openstack:networking:AddressGroupV2
    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 AddressGroupV2Args
    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 AddressGroupV2Args
    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 AddressGroupV2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AddressGroupV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AddressGroupV2Args
    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 addressGroupV2Resource = new OpenStack.Networking.AddressGroupV2("addressGroupV2Resource", new()
    {
        Addresses = new[]
        {
            "string",
        },
        Description = "string",
        Name = "string",
        ProjectId = "string",
        Region = "string",
    });
    
    example, err := networking.NewAddressGroupV2(ctx, "addressGroupV2Resource", &networking.AddressGroupV2Args{
    	Addresses: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	ProjectId:   pulumi.String("string"),
    	Region:      pulumi.String("string"),
    })
    
    var addressGroupV2Resource = new AddressGroupV2("addressGroupV2Resource", AddressGroupV2Args.builder()
        .addresses("string")
        .description("string")
        .name("string")
        .projectId("string")
        .region("string")
        .build());
    
    address_group_v2_resource = openstack.networking.AddressGroupV2("addressGroupV2Resource",
        addresses=["string"],
        description="string",
        name="string",
        project_id="string",
        region="string")
    
    const addressGroupV2Resource = new openstack.networking.AddressGroupV2("addressGroupV2Resource", {
        addresses: ["string"],
        description: "string",
        name: "string",
        projectId: "string",
        region: "string",
    });
    
    type: openstack:networking:AddressGroupV2
    properties:
        addresses:
            - string
        description: string
        name: string
        projectId: string
        region: string
    

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

    Addresses List<string>
    A list of CIDR blocks that define the addresses in the address group. Each address must be a valid IPv4 or IPv6 CIDR block.
    Description string
    A description of the address group.
    Name string
    A name of the address group.
    ProjectId string
    The owner of the address group. Required if admin wants to create a group for a specific project. Changing this creates a new address group.
    Region string
    The region in which to obtain the V2 networking client. If omitted, the region argument of the provider is used. Changing this creates a new address group.
    Addresses []string
    A list of CIDR blocks that define the addresses in the address group. Each address must be a valid IPv4 or IPv6 CIDR block.
    Description string
    A description of the address group.
    Name string
    A name of the address group.
    ProjectId string
    The owner of the address group. Required if admin wants to create a group for a specific project. Changing this creates a new address group.
    Region string
    The region in which to obtain the V2 networking client. If omitted, the region argument of the provider is used. Changing this creates a new address group.
    addresses List<String>
    A list of CIDR blocks that define the addresses in the address group. Each address must be a valid IPv4 or IPv6 CIDR block.
    description String
    A description of the address group.
    name String
    A name of the address group.
    projectId String
    The owner of the address group. Required if admin wants to create a group for a specific project. Changing this creates a new address group.
    region String
    The region in which to obtain the V2 networking client. If omitted, the region argument of the provider is used. Changing this creates a new address group.
    addresses string[]
    A list of CIDR blocks that define the addresses in the address group. Each address must be a valid IPv4 or IPv6 CIDR block.
    description string
    A description of the address group.
    name string
    A name of the address group.
    projectId string
    The owner of the address group. Required if admin wants to create a group for a specific project. Changing this creates a new address group.
    region string
    The region in which to obtain the V2 networking client. If omitted, the region argument of the provider is used. Changing this creates a new address group.
    addresses Sequence[str]
    A list of CIDR blocks that define the addresses in the address group. Each address must be a valid IPv4 or IPv6 CIDR block.
    description str
    A description of the address group.
    name str
    A name of the address group.
    project_id str
    The owner of the address group. Required if admin wants to create a group for a specific project. Changing this creates a new address group.
    region str
    The region in which to obtain the V2 networking client. If omitted, the region argument of the provider is used. Changing this creates a new address group.
    addresses List<String>
    A list of CIDR blocks that define the addresses in the address group. Each address must be a valid IPv4 or IPv6 CIDR block.
    description String
    A description of the address group.
    name String
    A name of the address group.
    projectId String
    The owner of the address group. Required if admin wants to create a group for a specific project. Changing this creates a new address group.
    region String
    The region in which to obtain the V2 networking client. If omitted, the region argument of the provider is used. Changing this creates a new address group.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing AddressGroupV2 Resource

    Get an existing AddressGroupV2 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?: AddressGroupV2State, opts?: CustomResourceOptions): AddressGroupV2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            addresses: Optional[Sequence[str]] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            project_id: Optional[str] = None,
            region: Optional[str] = None) -> AddressGroupV2
    func GetAddressGroupV2(ctx *Context, name string, id IDInput, state *AddressGroupV2State, opts ...ResourceOption) (*AddressGroupV2, error)
    public static AddressGroupV2 Get(string name, Input<string> id, AddressGroupV2State? state, CustomResourceOptions? opts = null)
    public static AddressGroupV2 get(String name, Output<String> id, AddressGroupV2State state, CustomResourceOptions options)
    resources:  _:    type: openstack:networking:AddressGroupV2    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:
    Addresses List<string>
    A list of CIDR blocks that define the addresses in the address group. Each address must be a valid IPv4 or IPv6 CIDR block.
    Description string
    A description of the address group.
    Name string
    A name of the address group.
    ProjectId string
    The owner of the address group. Required if admin wants to create a group for a specific project. Changing this creates a new address group.
    Region string
    The region in which to obtain the V2 networking client. If omitted, the region argument of the provider is used. Changing this creates a new address group.
    Addresses []string
    A list of CIDR blocks that define the addresses in the address group. Each address must be a valid IPv4 or IPv6 CIDR block.
    Description string
    A description of the address group.
    Name string
    A name of the address group.
    ProjectId string
    The owner of the address group. Required if admin wants to create a group for a specific project. Changing this creates a new address group.
    Region string
    The region in which to obtain the V2 networking client. If omitted, the region argument of the provider is used. Changing this creates a new address group.
    addresses List<String>
    A list of CIDR blocks that define the addresses in the address group. Each address must be a valid IPv4 or IPv6 CIDR block.
    description String
    A description of the address group.
    name String
    A name of the address group.
    projectId String
    The owner of the address group. Required if admin wants to create a group for a specific project. Changing this creates a new address group.
    region String
    The region in which to obtain the V2 networking client. If omitted, the region argument of the provider is used. Changing this creates a new address group.
    addresses string[]
    A list of CIDR blocks that define the addresses in the address group. Each address must be a valid IPv4 or IPv6 CIDR block.
    description string
    A description of the address group.
    name string
    A name of the address group.
    projectId string
    The owner of the address group. Required if admin wants to create a group for a specific project. Changing this creates a new address group.
    region string
    The region in which to obtain the V2 networking client. If omitted, the region argument of the provider is used. Changing this creates a new address group.
    addresses Sequence[str]
    A list of CIDR blocks that define the addresses in the address group. Each address must be a valid IPv4 or IPv6 CIDR block.
    description str
    A description of the address group.
    name str
    A name of the address group.
    project_id str
    The owner of the address group. Required if admin wants to create a group for a specific project. Changing this creates a new address group.
    region str
    The region in which to obtain the V2 networking client. If omitted, the region argument of the provider is used. Changing this creates a new address group.
    addresses List<String>
    A list of CIDR blocks that define the addresses in the address group. Each address must be a valid IPv4 or IPv6 CIDR block.
    description String
    A description of the address group.
    name String
    A name of the address group.
    projectId String
    The owner of the address group. Required if admin wants to create a group for a specific project. Changing this creates a new address group.
    region String
    The region in which to obtain the V2 networking client. If omitted, the region argument of the provider is used. Changing this creates a new address group.

    Import

    Address Groups can be imported using the id, e.g.

    $ pulumi import openstack:networking/addressGroupV2:AddressGroupV2 group_1 782fef9c-d03c-400a-9735-2f9af5681cb3
    

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

    Package Details

    Repository
    OpenStack pulumi/pulumi-openstack
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the openstack Terraform Provider.
    openstack logo
    OpenStack v5.3.2 published on Friday, Jul 18, 2025 by Pulumi