openstack.networking.AddressScope
Explore with Pulumi AI
Manages a V2 Neutron addressscope resource within OpenStack.
Example Usage
Create an Address-scope
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const addressscope1 = new openstack.networking.AddressScope("addressscope_1", {
name: "addressscope_1",
ipVersion: 6,
});
import pulumi
import pulumi_openstack as openstack
addressscope1 = openstack.networking.AddressScope("addressscope_1",
name="addressscope_1",
ip_version=6)
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.NewAddressScope(ctx, "addressscope_1", &networking.AddressScopeArgs{
Name: pulumi.String("addressscope_1"),
IpVersion: pulumi.Int(6),
})
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 addressscope1 = new OpenStack.Networking.AddressScope("addressscope_1", new()
{
Name = "addressscope_1",
IpVersion = 6,
});
});
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()
.name("addressscope_1")
.ipVersion(6)
.build());
}
}
resources:
addressscope1:
type: openstack:networking:AddressScope
name: addressscope_1
properties:
name: addressscope_1
ipVersion: 6
Create a Subnet Pool from an Address-scope
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const addressscope1 = new openstack.networking.AddressScope("addressscope_1", {
name: "addressscope_1",
ipVersion: 6,
});
const subnetpool1 = new openstack.networking.SubnetPool("subnetpool_1", {
name: "subnetpool_1",
prefixes: [
"fdf7:b13d:dead:beef::/64",
"fd65:86cc:a334:39b7::/64",
],
addressScopeId: addressscope1.id,
});
import pulumi
import pulumi_openstack as openstack
addressscope1 = openstack.networking.AddressScope("addressscope_1",
name="addressscope_1",
ip_version=6)
subnetpool1 = openstack.networking.SubnetPool("subnetpool_1",
name="subnetpool_1",
prefixes=[
"fdf7:b13d:dead:beef::/64",
"fd65:86cc:a334:39b7::/64",
],
address_scope_id=addressscope1.id)
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 {
addressscope1, err := networking.NewAddressScope(ctx, "addressscope_1", &networking.AddressScopeArgs{
Name: pulumi.String("addressscope_1"),
IpVersion: pulumi.Int(6),
})
if err != nil {
return err
}
_, err = networking.NewSubnetPool(ctx, "subnetpool_1", &networking.SubnetPoolArgs{
Name: pulumi.String("subnetpool_1"),
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
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;
return await Deployment.RunAsync(() =>
{
var addressscope1 = new OpenStack.Networking.AddressScope("addressscope_1", new()
{
Name = "addressscope_1",
IpVersion = 6,
});
var subnetpool1 = new OpenStack.Networking.SubnetPool("subnetpool_1", new()
{
Name = "subnetpool_1",
Prefixes = new[]
{
"fdf7:b13d:dead:beef::/64",
"fd65:86cc:a334:39b7::/64",
},
AddressScopeId = addressscope1.Id,
});
});
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()
.name("addressscope_1")
.ipVersion(6)
.build());
var subnetpool1 = new SubnetPool("subnetpool1", SubnetPoolArgs.builder()
.name("subnetpool_1")
.prefixes(
"fdf7:b13d:dead:beef::/64",
"fd65:86cc:a334:39b7::/64")
.addressScopeId(addressscope1.id())
.build());
}
}
resources:
addressscope1:
type: openstack:networking:AddressScope
name: addressscope_1
properties:
name: addressscope_1
ipVersion: 6
subnetpool1:
type: openstack:networking:SubnetPool
name: subnetpool_1
properties:
name: subnetpool_1
prefixes:
- fdf7:b13d:dead:beef::/64
- fd65:86cc:a334:39b7::/64
addressScopeId: ${addressscope1.id}
Create AddressScope Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AddressScope(name: string, args?: AddressScopeArgs, opts?: CustomResourceOptions);
@overload
def AddressScope(resource_name: str,
args: Optional[AddressScopeArgs] = None,
opts: Optional[ResourceOptions] = None)
@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)
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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var addressScopeResource = new OpenStack.Networking.AddressScope("addressScopeResource", new()
{
IpVersion = 0,
Name = "string",
ProjectId = "string",
Region = "string",
Shared = false,
});
example, err := networking.NewAddressScope(ctx, "addressScopeResource", &networking.AddressScopeArgs{
IpVersion: pulumi.Int(0),
Name: pulumi.String("string"),
ProjectId: pulumi.String("string"),
Region: pulumi.String("string"),
Shared: pulumi.Bool(false),
})
var addressScopeResource = new AddressScope("addressScopeResource", AddressScopeArgs.builder()
.ipVersion(0)
.name("string")
.projectId("string")
.region("string")
.shared(false)
.build());
address_scope_resource = openstack.networking.AddressScope("addressScopeResource",
ip_version=0,
name="string",
project_id="string",
region="string",
shared=False)
const addressScopeResource = new openstack.networking.AddressScope("addressScopeResource", {
ipVersion: 0,
name: "string",
projectId: "string",
region: "string",
shared: false,
});
type: openstack:networking:AddressScope
properties:
ipVersion: 0
name: string
projectId: string
region: string
shared: false
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The AddressScope resource accepts the following input properties:
- Ip
Version 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.
- Project
Id 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. - bool
- 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 string
- The name of the address-scope. Changing this updates the name of the existing address-scope.
- Project
Id 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. - bool
- Indicates whether this address-scope is shared across all projects. Changing this updates the shared status of the existing address-scope.
- ip
Version 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.
- project
Id 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. - Boolean
- Indicates whether this address-scope is shared across all projects. Changing this updates the shared status of the existing address-scope.
- ip
Version 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.
- project
Id 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. - 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. - bool
- Indicates whether this address-scope is shared across all projects. Changing this updates the shared status of the existing address-scope.
- ip
Version 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.
- project
Id 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. - 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.
- Ip
Version 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.
- Project
Id 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. - bool
- 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 string
- The name of the address-scope. Changing this updates the name of the existing address-scope.
- Project
Id 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. - bool
- Indicates whether this address-scope is shared across all projects. Changing this updates the shared status of the existing address-scope.
- ip
Version 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.
- project
Id 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. - Boolean
- Indicates whether this address-scope is shared across all projects. Changing this updates the shared status of the existing address-scope.
- ip
Version 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.
- project
Id 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. - 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. - bool
- Indicates whether this address-scope is shared across all projects. Changing this updates the shared status of the existing address-scope.
- ip
Version 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.
- project
Id 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. - 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
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.