openstack.networking.getAddressScope

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

Example Usage

using System.Collections.Generic;
using Pulumi;
using OpenStack = Pulumi.OpenStack;

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

});
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.LookupAddressScope(ctx, &networking.LookupAddressScopeArgs{
			IpVersion: pulumi.IntRef(4),
			Name:      pulumi.StringRef("public_addressscope"),
			Shared:    pulumi.BoolRef(true),
		}, nil)
		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.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()
            .ipVersion(4)
            .name("public_addressscope")
            .shared(true)
            .build());

    }
}
import pulumi
import pulumi_openstack as openstack

public_addressscope = openstack.networking.get_address_scope(ip_version=4,
    name="public_addressscope",
    shared=True)
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const publicAddressscope = openstack.networking.getAddressScope({
    ipVersion: 4,
    name: "public_addressscope",
    shared: true,
});
variables:
  publicAddressscope:
    fn::invoke:
      Function: openstack:networking:getAddressScope
      Arguments:
        ipVersion: 4
        name: public_addressscope
        shared: true

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>
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]
func LookupAddressScope(ctx *Context, args *LookupAddressScopeArgs, opts ...InvokeOption) (*LookupAddressScopeResult, error)
func LookupAddressScopeOutput(ctx *Context, args *LookupAddressScopeOutputArgs, opts ...InvokeOption) LookupAddressScopeResultOutput

> 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)
}
public static CompletableFuture<GetAddressScopeResult> getAddressScope(GetAddressScopeArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: openstack:networking/getAddressScope:getAddressScope
  arguments:
    # arguments dictionary

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.