ibm.getIsVpcAddressPrefixes
Explore with Pulumi AI
Retrieve information of an existing IBM Cloud address prefix collection. For more information, about VPC address prefix, see address prefixes.
Note:
VPC infrastructure services are a regional specific based endpoint, by default targets to us-south
. Please make sure to target right region in the provider block as shown in the provider.tf
file, if VPC service is created in region other than us-south
.
provider.tf
import * as pulumi from "@pulumi/pulumi";
import pulumi
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
return await Deployment.RunAsync(() =>
{
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
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) {
}
}
{}
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const example = ibm.getIsVpcAddressPrefixes({
vpc: ibm_is_vpc.example.id,
name: "example-address-prefix",
});
import pulumi
import pulumi_ibm as ibm
example = ibm.get_is_vpc_address_prefixes(vpc=ibm_is_vpc["example"]["id"],
name="example-address-prefix")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ibm.GetIsVpcAddressPrefixes(ctx, &ibm.GetIsVpcAddressPrefixesArgs{
Vpc: ibm_is_vpc.Example.Id,
Name: pulumi.StringRef("example-address-prefix"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;
return await Deployment.RunAsync(() =>
{
var example = Ibm.GetIsVpcAddressPrefixes.Invoke(new()
{
Vpc = ibm_is_vpc.Example.Id,
Name = "example-address-prefix",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.IbmFunctions;
import com.pulumi.ibm.inputs.GetIsVpcAddressPrefixesArgs;
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 example = IbmFunctions.getIsVpcAddressPrefixes(GetIsVpcAddressPrefixesArgs.builder()
.vpc(ibm_is_vpc.example().id())
.name("example-address-prefix")
.build());
}
}
variables:
example:
fn::invoke:
function: ibm:getIsVpcAddressPrefixes
arguments:
vpc: ${ibm_is_vpc.example.id}
name: example-address-prefix
Using getIsVpcAddressPrefixes
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 getIsVpcAddressPrefixes(args: GetIsVpcAddressPrefixesArgs, opts?: InvokeOptions): Promise<GetIsVpcAddressPrefixesResult>
function getIsVpcAddressPrefixesOutput(args: GetIsVpcAddressPrefixesOutputArgs, opts?: InvokeOptions): Output<GetIsVpcAddressPrefixesResult>
def get_is_vpc_address_prefixes(id: Optional[str] = None,
name: Optional[str] = None,
vpc: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetIsVpcAddressPrefixesResult
def get_is_vpc_address_prefixes_output(id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
vpc: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetIsVpcAddressPrefixesResult]
func GetIsVpcAddressPrefixes(ctx *Context, args *GetIsVpcAddressPrefixesArgs, opts ...InvokeOption) (*GetIsVpcAddressPrefixesResult, error)
func GetIsVpcAddressPrefixesOutput(ctx *Context, args *GetIsVpcAddressPrefixesOutputArgs, opts ...InvokeOption) GetIsVpcAddressPrefixesResultOutput
> Note: This function is named GetIsVpcAddressPrefixes
in the Go SDK.
public static class GetIsVpcAddressPrefixes
{
public static Task<GetIsVpcAddressPrefixesResult> InvokeAsync(GetIsVpcAddressPrefixesArgs args, InvokeOptions? opts = null)
public static Output<GetIsVpcAddressPrefixesResult> Invoke(GetIsVpcAddressPrefixesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetIsVpcAddressPrefixesResult> getIsVpcAddressPrefixes(GetIsVpcAddressPrefixesArgs args, InvokeOptions options)
public static Output<GetIsVpcAddressPrefixesResult> getIsVpcAddressPrefixes(GetIsVpcAddressPrefixesArgs args, InvokeOptions options)
fn::invoke:
function: ibm:index/getIsVpcAddressPrefixes:getIsVpcAddressPrefixes
arguments:
# arguments dictionary
The following arguments are supported:
getIsVpcAddressPrefixes Result
The following output properties are available:
- Address
Prefixes List<GetIs Vpc Address Prefixes Address Prefix> - (List) Collection of the address prefixes.
- Id string
- (String) The unique identifier of the AddressPrefixCollection.
- Vpc string
- Name string
- (String) The globally unique name for this zone.
- Address
Prefixes []GetIs Vpc Address Prefixes Address Prefix - (List) Collection of the address prefixes.
- Id string
- (String) The unique identifier of the AddressPrefixCollection.
- Vpc string
- Name string
- (String) The globally unique name for this zone.
- address
Prefixes List<GetIs Vpc Address Prefixes Address Prefix> - (List) Collection of the address prefixes.
- id String
- (String) The unique identifier of the AddressPrefixCollection.
- vpc String
- name String
- (String) The globally unique name for this zone.
- address
Prefixes GetIs Vpc Address Prefixes Address Prefix[] - (List) Collection of the address prefixes.
- id string
- (String) The unique identifier of the AddressPrefixCollection.
- vpc string
- name string
- (String) The globally unique name for this zone.
- address_
prefixes Sequence[GetIs Vpc Address Prefixes Address Prefix] - (List) Collection of the address prefixes.
- id str
- (String) The unique identifier of the AddressPrefixCollection.
- vpc str
- name str
- (String) The globally unique name for this zone.
- address
Prefixes List<Property Map> - (List) Collection of the address prefixes.
- id String
- (String) The unique identifier of the AddressPrefixCollection.
- vpc String
- name String
- (String) The globally unique name for this zone.
Supporting Types
GetIsVpcAddressPrefixesAddressPrefix
- Cidr string
- (String) The CIDR block for this prefix.
- Created
At string - (Timestamp) The date and time that the prefix was created.
- Has
Subnets bool - (String) Indicates whether subnets exist with addresses from this prefix.
- Href string
- (String) The URL for this zone.
- Id string
- (String) The unique identifier of the AddressPrefixCollection.
- Is
Default bool - (String) Indicates whether this is the default prefix for this zone in this VPC. If a default prefix was automatically created when the VPC was created, the prefix is automatically named using a hyphenated list of randomly-selected words, but may be updated with a user-specified name.
- Name string
- The unique user-defined name within the VPC the address prefix.
- Zones
List<Get
Is Vpc Address Prefixes Address Prefix Zone> - (List) The zone this address prefix resides in.
- Cidr string
- (String) The CIDR block for this prefix.
- Created
At string - (Timestamp) The date and time that the prefix was created.
- Has
Subnets bool - (String) Indicates whether subnets exist with addresses from this prefix.
- Href string
- (String) The URL for this zone.
- Id string
- (String) The unique identifier of the AddressPrefixCollection.
- Is
Default bool - (String) Indicates whether this is the default prefix for this zone in this VPC. If a default prefix was automatically created when the VPC was created, the prefix is automatically named using a hyphenated list of randomly-selected words, but may be updated with a user-specified name.
- Name string
- The unique user-defined name within the VPC the address prefix.
- Zones
[]Get
Is Vpc Address Prefixes Address Prefix Zone - (List) The zone this address prefix resides in.
- cidr String
- (String) The CIDR block for this prefix.
- created
At String - (Timestamp) The date and time that the prefix was created.
- has
Subnets Boolean - (String) Indicates whether subnets exist with addresses from this prefix.
- href String
- (String) The URL for this zone.
- id String
- (String) The unique identifier of the AddressPrefixCollection.
- is
Default Boolean - (String) Indicates whether this is the default prefix for this zone in this VPC. If a default prefix was automatically created when the VPC was created, the prefix is automatically named using a hyphenated list of randomly-selected words, but may be updated with a user-specified name.
- name String
- The unique user-defined name within the VPC the address prefix.
- zones
List<Get
Is Vpc Address Prefixes Address Prefix Zone> - (List) The zone this address prefix resides in.
- cidr string
- (String) The CIDR block for this prefix.
- created
At string - (Timestamp) The date and time that the prefix was created.
- has
Subnets boolean - (String) Indicates whether subnets exist with addresses from this prefix.
- href string
- (String) The URL for this zone.
- id string
- (String) The unique identifier of the AddressPrefixCollection.
- is
Default boolean - (String) Indicates whether this is the default prefix for this zone in this VPC. If a default prefix was automatically created when the VPC was created, the prefix is automatically named using a hyphenated list of randomly-selected words, but may be updated with a user-specified name.
- name string
- The unique user-defined name within the VPC the address prefix.
- zones
Get
Is Vpc Address Prefixes Address Prefix Zone[] - (List) The zone this address prefix resides in.
- cidr str
- (String) The CIDR block for this prefix.
- created_
at str - (Timestamp) The date and time that the prefix was created.
- has_
subnets bool - (String) Indicates whether subnets exist with addresses from this prefix.
- href str
- (String) The URL for this zone.
- id str
- (String) The unique identifier of the AddressPrefixCollection.
- is_
default bool - (String) Indicates whether this is the default prefix for this zone in this VPC. If a default prefix was automatically created when the VPC was created, the prefix is automatically named using a hyphenated list of randomly-selected words, but may be updated with a user-specified name.
- name str
- The unique user-defined name within the VPC the address prefix.
- zones
Sequence[Get
Is Vpc Address Prefixes Address Prefix Zone] - (List) The zone this address prefix resides in.
- cidr String
- (String) The CIDR block for this prefix.
- created
At String - (Timestamp) The date and time that the prefix was created.
- has
Subnets Boolean - (String) Indicates whether subnets exist with addresses from this prefix.
- href String
- (String) The URL for this zone.
- id String
- (String) The unique identifier of the AddressPrefixCollection.
- is
Default Boolean - (String) Indicates whether this is the default prefix for this zone in this VPC. If a default prefix was automatically created when the VPC was created, the prefix is automatically named using a hyphenated list of randomly-selected words, but may be updated with a user-specified name.
- name String
- The unique user-defined name within the VPC the address prefix.
- zones List<Property Map>
- (List) The zone this address prefix resides in.
GetIsVpcAddressPrefixesAddressPrefixZone
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.