1. Packages
  2. OpenStack
  3. API Docs
  4. networking
  5. AddressScope
OpenStack v3.13.3 published on Friday, Aug 11, 2023 by Pulumi

openstack.networking.AddressScope

Explore with Pulumi AI

openstack logo
OpenStack v3.13.3 published on Friday, Aug 11, 2023 by Pulumi

    Manages a V2 Neutron addressscope resource within OpenStack.

    Example Usage

    Create an Address-scope

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var addressscope1 = new OpenStack.Networking.AddressScope("addressscope1", new()
        {
            IpVersion = 6,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/networking"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := networking.NewAddressScope(ctx, "addressscope1", &networking.AddressScopeArgs{
    			IpVersion: pulumi.Int(6),
    		})
    		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.openstack.networking.AddressScope;
    import com.pulumi.openstack.networking.AddressScopeArgs;
    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 addressscope1 = new AddressScope("addressscope1", AddressScopeArgs.builder()        
                .ipVersion(6)
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_openstack as openstack
    
    addressscope1 = openstack.networking.AddressScope("addressscope1", ip_version=6)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const addressscope1 = new openstack.networking.AddressScope("addressscope1", {ipVersion: 6});
    
    resources:
      addressscope1:
        type: openstack:networking:AddressScope
        properties:
          ipVersion: 6
    

    Create a Subnet Pool from an Address-scope

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var addressscope1 = new OpenStack.Networking.AddressScope("addressscope1", new()
        {
            IpVersion = 6,
        });
    
        var subnetpool1 = new OpenStack.Networking.SubnetPool("subnetpool1", new()
        {
            Prefixes = new[]
            {
                "fdf7:b13d:dead:beef::/64",
                "fd65:86cc:a334:39b7::/64",
            },
            AddressScopeId = addressscope1.Id,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/networking"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		addressscope1, err := networking.NewAddressScope(ctx, "addressscope1", &networking.AddressScopeArgs{
    			IpVersion: pulumi.Int(6),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = networking.NewSubnetPool(ctx, "subnetpool1", &networking.SubnetPoolArgs{
    			Prefixes: pulumi.StringArray{
    				pulumi.String("fdf7:b13d:dead:beef::/64"),
    				pulumi.String("fd65:86cc:a334:39b7::/64"),
    			},
    			AddressScopeId: addressscope1.ID(),
    		})
    		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.openstack.networking.AddressScope;
    import com.pulumi.openstack.networking.AddressScopeArgs;
    import com.pulumi.openstack.networking.SubnetPool;
    import com.pulumi.openstack.networking.SubnetPoolArgs;
    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 addressscope1 = new AddressScope("addressscope1", AddressScopeArgs.builder()        
                .ipVersion(6)
                .build());
    
            var subnetpool1 = new SubnetPool("subnetpool1", SubnetPoolArgs.builder()        
                .prefixes(            
                    "fdf7:b13d:dead:beef::/64",
                    "fd65:86cc:a334:39b7::/64")
                .addressScopeId(addressscope1.id())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_openstack as openstack
    
    addressscope1 = openstack.networking.AddressScope("addressscope1", ip_version=6)
    subnetpool1 = openstack.networking.SubnetPool("subnetpool1",
        prefixes=[
            "fdf7:b13d:dead:beef::/64",
            "fd65:86cc:a334:39b7::/64",
        ],
        address_scope_id=addressscope1.id)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const addressscope1 = new openstack.networking.AddressScope("addressscope1", {ipVersion: 6});
    const subnetpool1 = new openstack.networking.SubnetPool("subnetpool1", {
        prefixes: [
            "fdf7:b13d:dead:beef::/64",
            "fd65:86cc:a334:39b7::/64",
        ],
        addressScopeId: addressscope1.id,
    });
    
    resources:
      addressscope1:
        type: openstack:networking:AddressScope
        properties:
          ipVersion: 6
      subnetpool1:
        type: openstack:networking:SubnetPool
        properties:
          prefixes:
            - fdf7:b13d:dead:beef::/64
            - fd65:86cc:a334:39b7::/64
          addressScopeId: ${addressscope1.id}
    

    Create AddressScope Resource

    new AddressScope(name: string, args?: AddressScopeArgs, opts?: CustomResourceOptions);
    @overload
    def AddressScope(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     ip_version: Optional[int] = None,
                     name: Optional[str] = None,
                     project_id: Optional[str] = None,
                     region: Optional[str] = None,
                     shared: Optional[bool] = None)
    @overload
    def AddressScope(resource_name: str,
                     args: Optional[AddressScopeArgs] = None,
                     opts: Optional[ResourceOptions] = None)
    func NewAddressScope(ctx *Context, name string, args *AddressScopeArgs, opts ...ResourceOption) (*AddressScope, error)
    public AddressScope(string name, AddressScopeArgs? args = null, CustomResourceOptions? opts = null)
    public AddressScope(String name, AddressScopeArgs args)
    public AddressScope(String name, AddressScopeArgs args, CustomResourceOptions options)
    
    type: openstack:networking:AddressScope
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args AddressScopeArgs
    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 AddressScopeArgs
    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 AddressScopeArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AddressScopeArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AddressScopeArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    IpVersion int

    IP version, either 4 (default) or 6. Changing this creates a new address-scope.

    Name string

    The name of the address-scope. Changing this updates the name of the existing address-scope.

    ProjectId string

    The owner of the address-scope. Required if admin wants to create a address-scope for another project. Changing this creates a new address-scope.

    Region string

    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron address-scope. If omitted, the region argument of the provider is used. Changing this creates a new address-scope.

    Shared bool

    Indicates whether this address-scope is shared across all projects. Changing this updates the shared status of the existing address-scope.

    IpVersion int

    IP version, either 4 (default) or 6. Changing this creates a new address-scope.

    Name string

    The name of the address-scope. Changing this updates the name of the existing address-scope.

    ProjectId string

    The owner of the address-scope. Required if admin wants to create a address-scope for another project. Changing this creates a new address-scope.

    Region string

    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron address-scope. If omitted, the region argument of the provider is used. Changing this creates a new address-scope.

    Shared bool

    Indicates whether this address-scope is shared across all projects. Changing this updates the shared status of the existing address-scope.

    ipVersion Integer

    IP version, either 4 (default) or 6. Changing this creates a new address-scope.

    name String

    The name of the address-scope. Changing this updates the name of the existing address-scope.

    projectId String

    The owner of the address-scope. Required if admin wants to create a address-scope for another project. Changing this creates a new address-scope.

    region String

    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron address-scope. If omitted, the region argument of the provider is used. Changing this creates a new address-scope.

    shared Boolean

    Indicates whether this address-scope is shared across all projects. Changing this updates the shared status of the existing address-scope.

    ipVersion number

    IP version, either 4 (default) or 6. Changing this creates a new address-scope.

    name string

    The name of the address-scope. Changing this updates the name of the existing address-scope.

    projectId string

    The owner of the address-scope. Required if admin wants to create a address-scope for another project. Changing this creates a new address-scope.

    region string

    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron address-scope. If omitted, the region argument of the provider is used. Changing this creates a new address-scope.

    shared boolean

    Indicates whether this address-scope is shared across all projects. Changing this updates the shared status of the existing address-scope.

    ip_version int

    IP version, either 4 (default) or 6. Changing this creates a new address-scope.

    name str

    The name of the address-scope. Changing this updates the name of the existing address-scope.

    project_id str

    The owner of the address-scope. Required if admin wants to create a address-scope for another project. Changing this creates a new address-scope.

    region str

    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron address-scope. If omitted, the region argument of the provider is used. Changing this creates a new address-scope.

    shared bool

    Indicates whether this address-scope is shared across all projects. Changing this updates the shared status of the existing address-scope.

    ipVersion Number

    IP version, either 4 (default) or 6. Changing this creates a new address-scope.

    name String

    The name of the address-scope. Changing this updates the name of the existing address-scope.

    projectId String

    The owner of the address-scope. Required if admin wants to create a address-scope for another project. Changing this creates a new address-scope.

    region String

    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron address-scope. If omitted, the region argument of the provider is used. Changing this creates a new address-scope.

    shared Boolean

    Indicates whether this address-scope is shared across all projects. Changing this updates the shared status of the existing address-scope.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the AddressScope 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 AddressScope Resource

    Get an existing AddressScope 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?: AddressScopeState, opts?: CustomResourceOptions): AddressScope
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            ip_version: Optional[int] = None,
            name: Optional[str] = None,
            project_id: Optional[str] = None,
            region: Optional[str] = None,
            shared: Optional[bool] = None) -> AddressScope
    func GetAddressScope(ctx *Context, name string, id IDInput, state *AddressScopeState, opts ...ResourceOption) (*AddressScope, error)
    public static AddressScope Get(string name, Input<string> id, AddressScopeState? state, CustomResourceOptions? opts = null)
    public static AddressScope get(String name, Output<String> id, AddressScopeState 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:
    IpVersion int

    IP version, either 4 (default) or 6. Changing this creates a new address-scope.

    Name string

    The name of the address-scope. Changing this updates the name of the existing address-scope.

    ProjectId string

    The owner of the address-scope. Required if admin wants to create a address-scope for another project. Changing this creates a new address-scope.

    Region string

    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron address-scope. If omitted, the region argument of the provider is used. Changing this creates a new address-scope.

    Shared bool

    Indicates whether this address-scope is shared across all projects. Changing this updates the shared status of the existing address-scope.

    IpVersion int

    IP version, either 4 (default) or 6. Changing this creates a new address-scope.

    Name string

    The name of the address-scope. Changing this updates the name of the existing address-scope.

    ProjectId string

    The owner of the address-scope. Required if admin wants to create a address-scope for another project. Changing this creates a new address-scope.

    Region string

    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron address-scope. If omitted, the region argument of the provider is used. Changing this creates a new address-scope.

    Shared bool

    Indicates whether this address-scope is shared across all projects. Changing this updates the shared status of the existing address-scope.

    ipVersion Integer

    IP version, either 4 (default) or 6. Changing this creates a new address-scope.

    name String

    The name of the address-scope. Changing this updates the name of the existing address-scope.

    projectId String

    The owner of the address-scope. Required if admin wants to create a address-scope for another project. Changing this creates a new address-scope.

    region String

    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron address-scope. If omitted, the region argument of the provider is used. Changing this creates a new address-scope.

    shared Boolean

    Indicates whether this address-scope is shared across all projects. Changing this updates the shared status of the existing address-scope.

    ipVersion number

    IP version, either 4 (default) or 6. Changing this creates a new address-scope.

    name string

    The name of the address-scope. Changing this updates the name of the existing address-scope.

    projectId string

    The owner of the address-scope. Required if admin wants to create a address-scope for another project. Changing this creates a new address-scope.

    region string

    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron address-scope. If omitted, the region argument of the provider is used. Changing this creates a new address-scope.

    shared boolean

    Indicates whether this address-scope is shared across all projects. Changing this updates the shared status of the existing address-scope.

    ip_version int

    IP version, either 4 (default) or 6. Changing this creates a new address-scope.

    name str

    The name of the address-scope. Changing this updates the name of the existing address-scope.

    project_id str

    The owner of the address-scope. Required if admin wants to create a address-scope for another project. Changing this creates a new address-scope.

    region str

    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron address-scope. If omitted, the region argument of the provider is used. Changing this creates a new address-scope.

    shared bool

    Indicates whether this address-scope is shared across all projects. Changing this updates the shared status of the existing address-scope.

    ipVersion Number

    IP version, either 4 (default) or 6. Changing this creates a new address-scope.

    name String

    The name of the address-scope. Changing this updates the name of the existing address-scope.

    projectId String

    The owner of the address-scope. Required if admin wants to create a address-scope for another project. Changing this creates a new address-scope.

    region String

    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron address-scope. If omitted, the region argument of the provider is used. Changing this creates a new address-scope.

    shared Boolean

    Indicates whether this address-scope is shared across all projects. Changing this updates the shared status of the existing address-scope.

    Import

    Address-scopes can be imported using the id, e.g.

     $ pulumi import openstack:networking/addressScope:AddressScope addressscope_1 9cc35860-522a-4d35-974d-51d4b011801e
    

    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 v3.13.3 published on Friday, Aug 11, 2023 by Pulumi