1. Packages
  2. Openstack Provider
  3. API Docs
  4. networking
  5. getAddressScope
OpenStack v5.0.3 published on Wednesday, Feb 12, 2025 by Pulumi

openstack.networking.getAddressScope

Explore with Pulumi AI

OpenStack v5.0.3 published on Wednesday, Feb 12, 2025 by Pulumi

Use this data source to get the ID of an available OpenStack address-scope.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const publicAddressscope = openstack.networking.getAddressScope({
    name: "public_addressscope",
    shared: true,
    ipVersion: 4,
});
Copy
import pulumi
import pulumi_openstack as openstack

public_addressscope = openstack.networking.get_address_scope(name="public_addressscope",
    shared=True,
    ip_version=4)
Copy
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.LookupAddressScope(ctx, &networking.LookupAddressScopeArgs{
			Name:      pulumi.StringRef("public_addressscope"),
			Shared:    pulumi.BoolRef(true),
			IpVersion: pulumi.IntRef(4),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;

return await Deployment.RunAsync(() => 
{
    var publicAddressscope = OpenStack.Networking.GetAddressScope.Invoke(new()
    {
        Name = "public_addressscope",
        Shared = true,
        IpVersion = 4,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.openstack.networking.NetworkingFunctions;
import com.pulumi.openstack.networking.inputs.GetAddressScopeArgs;
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 publicAddressscope = NetworkingFunctions.getAddressScope(GetAddressScopeArgs.builder()
            .name("public_addressscope")
            .shared(true)
            .ipVersion(4)
            .build());

    }
}
Copy
variables:
  publicAddressscope:
    fn::invoke:
      function: openstack:networking:getAddressScope
      arguments:
        name: public_addressscope
        shared: true
        ipVersion: 4
Copy

Using getAddressScope

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getAddressScope(args: GetAddressScopeArgs, opts?: InvokeOptions): Promise<GetAddressScopeResult>
function getAddressScopeOutput(args: GetAddressScopeOutputArgs, opts?: InvokeOptions): Output<GetAddressScopeResult>
Copy
def get_address_scope(ip_version: Optional[int] = None,
                      name: Optional[str] = None,
                      project_id: Optional[str] = None,
                      region: Optional[str] = None,
                      shared: Optional[bool] = None,
                      opts: Optional[InvokeOptions] = None) -> GetAddressScopeResult
def get_address_scope_output(ip_version: Optional[pulumi.Input[int]] = None,
                      name: Optional[pulumi.Input[str]] = None,
                      project_id: Optional[pulumi.Input[str]] = None,
                      region: Optional[pulumi.Input[str]] = None,
                      shared: Optional[pulumi.Input[bool]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetAddressScopeResult]
Copy
func LookupAddressScope(ctx *Context, args *LookupAddressScopeArgs, opts ...InvokeOption) (*LookupAddressScopeResult, error)
func LookupAddressScopeOutput(ctx *Context, args *LookupAddressScopeOutputArgs, opts ...InvokeOption) LookupAddressScopeResultOutput
Copy

> Note: This function is named LookupAddressScope in the Go SDK.

public static class GetAddressScope 
{
    public static Task<GetAddressScopeResult> InvokeAsync(GetAddressScopeArgs args, InvokeOptions? opts = null)
    public static Output<GetAddressScopeResult> Invoke(GetAddressScopeInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetAddressScopeResult> getAddressScope(GetAddressScopeArgs args, InvokeOptions options)
public static Output<GetAddressScopeResult> getAddressScope(GetAddressScopeArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: openstack:networking/getAddressScope:getAddressScope
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

IpVersion int
IP version.
Name string
Name of the address-scope.
ProjectId string
The owner of the address-scope.
Region string
The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve address-scopes. If omitted, the region argument of the provider is used.
Shared bool
Indicates whether this address-scope is shared across all projects.
IpVersion int
IP version.
Name string
Name of the address-scope.
ProjectId string
The owner of the address-scope.
Region string
The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve address-scopes. If omitted, the region argument of the provider is used.
Shared bool
Indicates whether this address-scope is shared across all projects.
ipVersion Integer
IP version.
name String
Name of the address-scope.
projectId String
The owner of the address-scope.
region String
The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve address-scopes. If omitted, the region argument of the provider is used.
shared Boolean
Indicates whether this address-scope is shared across all projects.
ipVersion number
IP version.
name string
Name of the address-scope.
projectId string
The owner of the address-scope.
region string
The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve address-scopes. If omitted, the region argument of the provider is used.
shared boolean
Indicates whether this address-scope is shared across all projects.
ip_version int
IP version.
name str
Name of the address-scope.
project_id str
The owner of the address-scope.
region str
The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve address-scopes. If omitted, the region argument of the provider is used.
shared bool
Indicates whether this address-scope is shared across all projects.
ipVersion Number
IP version.
name String
Name of the address-scope.
projectId String
The owner of the address-scope.
region String
The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve address-scopes. If omitted, the region argument of the provider is used.
shared Boolean
Indicates whether this address-scope is shared across all projects.

getAddressScope Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
IpVersion int
See Argument Reference above.
Name string
See Argument Reference above.
ProjectId string
See Argument Reference above.
Region string
Shared bool
See Argument Reference above.
Id string
The provider-assigned unique ID for this managed resource.
IpVersion int
See Argument Reference above.
Name string
See Argument Reference above.
ProjectId string
See Argument Reference above.
Region string
Shared bool
See Argument Reference above.
id String
The provider-assigned unique ID for this managed resource.
ipVersion Integer
See Argument Reference above.
name String
See Argument Reference above.
projectId String
See Argument Reference above.
region String
shared Boolean
See Argument Reference above.
id string
The provider-assigned unique ID for this managed resource.
ipVersion number
See Argument Reference above.
name string
See Argument Reference above.
projectId string
See Argument Reference above.
region string
shared boolean
See Argument Reference above.
id str
The provider-assigned unique ID for this managed resource.
ip_version int
See Argument Reference above.
name str
See Argument Reference above.
project_id str
See Argument Reference above.
region str
shared bool
See Argument Reference above.
id String
The provider-assigned unique ID for this managed resource.
ipVersion Number
See Argument Reference above.
name String
See Argument Reference above.
projectId String
See Argument Reference above.
region String
shared Boolean
See Argument Reference above.

Package Details

Repository
OpenStack pulumi/pulumi-openstack
License
Apache-2.0
Notes
This Pulumi package is based on the openstack Terraform Provider.
OpenStack v5.0.3 published on Wednesday, Feb 12, 2025 by Pulumi