ibm.getIsSubnetReservedIp
Explore with Pulumi AI
Retrieve information of an existing reserved IP in a subnet as a read only data source. For more information, about associated reserved IP subnet, see binding and unbinding a reserved IP address.
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.getIsSubnetReservedIp({
subnet: ibm_is_subnet.example.id,
reservedIp: ibm_is_subnet_reserved_ip.example.reserved_ip,
});
import pulumi
import pulumi_ibm as ibm
example = ibm.get_is_subnet_reserved_ip(subnet=ibm_is_subnet["example"]["id"],
reserved_ip=ibm_is_subnet_reserved_ip["example"]["reserved_ip"])
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.LookupIsSubnetReservedIp(ctx, &ibm.LookupIsSubnetReservedIpArgs{
Subnet: ibm_is_subnet.Example.Id,
ReservedIp: ibm_is_subnet_reserved_ip.Example.Reserved_ip,
}, 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.GetIsSubnetReservedIp.Invoke(new()
{
Subnet = ibm_is_subnet.Example.Id,
ReservedIp = ibm_is_subnet_reserved_ip.Example.Reserved_ip,
});
});
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.GetIsSubnetReservedIpArgs;
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.getIsSubnetReservedIp(GetIsSubnetReservedIpArgs.builder()
.subnet(ibm_is_subnet.example().id())
.reservedIp(ibm_is_subnet_reserved_ip.example().reserved_ip())
.build());
}
}
variables:
example:
fn::invoke:
function: ibm:getIsSubnetReservedIp
arguments:
subnet: ${ibm_is_subnet.example.id}
reservedIp: ${ibm_is_subnet_reserved_ip.example.reserved_ip}
Using getIsSubnetReservedIp
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 getIsSubnetReservedIp(args: GetIsSubnetReservedIpArgs, opts?: InvokeOptions): Promise<GetIsSubnetReservedIpResult>
function getIsSubnetReservedIpOutput(args: GetIsSubnetReservedIpOutputArgs, opts?: InvokeOptions): Output<GetIsSubnetReservedIpResult>
def get_is_subnet_reserved_ip(id: Optional[str] = None,
reserved_ip: Optional[str] = None,
subnet: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetIsSubnetReservedIpResult
def get_is_subnet_reserved_ip_output(id: Optional[pulumi.Input[str]] = None,
reserved_ip: Optional[pulumi.Input[str]] = None,
subnet: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetIsSubnetReservedIpResult]
func LookupIsSubnetReservedIp(ctx *Context, args *LookupIsSubnetReservedIpArgs, opts ...InvokeOption) (*LookupIsSubnetReservedIpResult, error)
func LookupIsSubnetReservedIpOutput(ctx *Context, args *LookupIsSubnetReservedIpOutputArgs, opts ...InvokeOption) LookupIsSubnetReservedIpResultOutput
> Note: This function is named LookupIsSubnetReservedIp
in the Go SDK.
public static class GetIsSubnetReservedIp
{
public static Task<GetIsSubnetReservedIpResult> InvokeAsync(GetIsSubnetReservedIpArgs args, InvokeOptions? opts = null)
public static Output<GetIsSubnetReservedIpResult> Invoke(GetIsSubnetReservedIpInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetIsSubnetReservedIpResult> getIsSubnetReservedIp(GetIsSubnetReservedIpArgs args, InvokeOptions options)
public static Output<GetIsSubnetReservedIpResult> getIsSubnetReservedIp(GetIsSubnetReservedIpArgs args, InvokeOptions options)
fn::invoke:
function: ibm:index/getIsSubnetReservedIp:getIsSubnetReservedIp
arguments:
# arguments dictionary
The following arguments are supported:
- Reserved
Ip string - The ID for the reserved IP.
- Subnet string
- The ID for the subnet.
- Id string
- (String) The unique identifier for this endpoint gateway.
- Reserved
Ip string - The ID for the reserved IP.
- Subnet string
- The ID for the subnet.
- Id string
- (String) The unique identifier for this endpoint gateway.
- reserved
Ip String - The ID for the reserved IP.
- subnet String
- The ID for the subnet.
- id String
- (String) The unique identifier for this endpoint gateway.
- reserved
Ip string - The ID for the reserved IP.
- subnet string
- The ID for the subnet.
- id string
- (String) The unique identifier for this endpoint gateway.
- reserved_
ip str - The ID for the reserved IP.
- subnet str
- The ID for the subnet.
- id str
- (String) The unique identifier for this endpoint gateway.
- reserved
Ip String - The ID for the reserved IP.
- subnet String
- The ID for the subnet.
- id String
- (String) The unique identifier for this endpoint gateway.
getIsSubnetReservedIp Result
The following output properties are available:
- Address string
- Auto
Delete bool - (String) The auto_delete boolean for reserved IP.
- Created
At string - (String) The creation timestamp for the reserved IP.
- Href string
- (String) The URL for this endpoint gateway.
- Id string
- (String) The unique identifier for this endpoint gateway.
- Lifecycle
State string - (String) The lifecycle state of the reserved IP. [ deleting, failed, pending, stable, suspended, updating, waiting ]
- Name string
- (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
- Owner string
- (String) The owner of the reserved IP.
- Reserved
Ip string - (String) The ID for the reserved IP.
- Resource
Type string - (String) The resource type.
- Subnet string
- (String) The ID of the subnet for the reserved IP.
- Target string
- (String) The ID of the target for the reserved IP.
- Target
Crn string - (String) The crn of the target for the reserved IP.
- Target
References List<GetIs Subnet Reserved Ip Target Reference> - (List) The target this reserved IP is bound to. If absent, this reserved IP is provider-owned or unbound.
- Address string
- Auto
Delete bool - (String) The auto_delete boolean for reserved IP.
- Created
At string - (String) The creation timestamp for the reserved IP.
- Href string
- (String) The URL for this endpoint gateway.
- Id string
- (String) The unique identifier for this endpoint gateway.
- Lifecycle
State string - (String) The lifecycle state of the reserved IP. [ deleting, failed, pending, stable, suspended, updating, waiting ]
- Name string
- (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
- Owner string
- (String) The owner of the reserved IP.
- Reserved
Ip string - (String) The ID for the reserved IP.
- Resource
Type string - (String) The resource type.
- Subnet string
- (String) The ID of the subnet for the reserved IP.
- Target string
- (String) The ID of the target for the reserved IP.
- Target
Crn string - (String) The crn of the target for the reserved IP.
- Target
References []GetIs Subnet Reserved Ip Target Reference - (List) The target this reserved IP is bound to. If absent, this reserved IP is provider-owned or unbound.
- address String
- auto
Delete Boolean - (String) The auto_delete boolean for reserved IP.
- created
At String - (String) The creation timestamp for the reserved IP.
- href String
- (String) The URL for this endpoint gateway.
- id String
- (String) The unique identifier for this endpoint gateway.
- lifecycle
State String - (String) The lifecycle state of the reserved IP. [ deleting, failed, pending, stable, suspended, updating, waiting ]
- name String
- (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
- owner String
- (String) The owner of the reserved IP.
- reserved
Ip String - (String) The ID for the reserved IP.
- resource
Type String - (String) The resource type.
- subnet String
- (String) The ID of the subnet for the reserved IP.
- target String
- (String) The ID of the target for the reserved IP.
- target
Crn String - (String) The crn of the target for the reserved IP.
- target
References List<GetIs Subnet Reserved Ip Target Reference> - (List) The target this reserved IP is bound to. If absent, this reserved IP is provider-owned or unbound.
- address string
- auto
Delete boolean - (String) The auto_delete boolean for reserved IP.
- created
At string - (String) The creation timestamp for the reserved IP.
- href string
- (String) The URL for this endpoint gateway.
- id string
- (String) The unique identifier for this endpoint gateway.
- lifecycle
State string - (String) The lifecycle state of the reserved IP. [ deleting, failed, pending, stable, suspended, updating, waiting ]
- name string
- (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
- owner string
- (String) The owner of the reserved IP.
- reserved
Ip string - (String) The ID for the reserved IP.
- resource
Type string - (String) The resource type.
- subnet string
- (String) The ID of the subnet for the reserved IP.
- target string
- (String) The ID of the target for the reserved IP.
- target
Crn string - (String) The crn of the target for the reserved IP.
- target
References GetIs Subnet Reserved Ip Target Reference[] - (List) The target this reserved IP is bound to. If absent, this reserved IP is provider-owned or unbound.
- address str
- auto_
delete bool - (String) The auto_delete boolean for reserved IP.
- created_
at str - (String) The creation timestamp for the reserved IP.
- href str
- (String) The URL for this endpoint gateway.
- id str
- (String) The unique identifier for this endpoint gateway.
- lifecycle_
state str - (String) The lifecycle state of the reserved IP. [ deleting, failed, pending, stable, suspended, updating, waiting ]
- name str
- (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
- owner str
- (String) The owner of the reserved IP.
- reserved_
ip str - (String) The ID for the reserved IP.
- resource_
type str - (String) The resource type.
- subnet str
- (String) The ID of the subnet for the reserved IP.
- target str
- (String) The ID of the target for the reserved IP.
- target_
crn str - (String) The crn of the target for the reserved IP.
- target_
references Sequence[GetIs Subnet Reserved Ip Target Reference] - (List) The target this reserved IP is bound to. If absent, this reserved IP is provider-owned or unbound.
- address String
- auto
Delete Boolean - (String) The auto_delete boolean for reserved IP.
- created
At String - (String) The creation timestamp for the reserved IP.
- href String
- (String) The URL for this endpoint gateway.
- id String
- (String) The unique identifier for this endpoint gateway.
- lifecycle
State String - (String) The lifecycle state of the reserved IP. [ deleting, failed, pending, stable, suspended, updating, waiting ]
- name String
- (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
- owner String
- (String) The owner of the reserved IP.
- reserved
Ip String - (String) The ID for the reserved IP.
- resource
Type String - (String) The resource type.
- subnet String
- (String) The ID of the subnet for the reserved IP.
- target String
- (String) The ID of the target for the reserved IP.
- target
Crn String - (String) The crn of the target for the reserved IP.
- target
References List<Property Map> - (List) The target this reserved IP is bound to. If absent, this reserved IP is provider-owned or unbound.
Supporting Types
GetIsSubnetReservedIpTargetReference
- Crn string
- (String) The CRN for this endpoint gateway.
- Deleteds
List<Get
Is Subnet Reserved Ip Target Reference Deleted> - (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information.
- Href string
- (String) The URL for this endpoint gateway.
- Id string
- (String) The unique identifier for this endpoint gateway.
- Name string
- (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
- Resource
Type string - (String) The resource type.
- Crn string
- (String) The CRN for this endpoint gateway.
- Deleteds
[]Get
Is Subnet Reserved Ip Target Reference Deleted - (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information.
- Href string
- (String) The URL for this endpoint gateway.
- Id string
- (String) The unique identifier for this endpoint gateway.
- Name string
- (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
- Resource
Type string - (String) The resource type.
- crn String
- (String) The CRN for this endpoint gateway.
- deleteds
List<Get
Is Subnet Reserved Ip Target Reference Deleted> - (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information.
- href String
- (String) The URL for this endpoint gateway.
- id String
- (String) The unique identifier for this endpoint gateway.
- name String
- (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
- resource
Type String - (String) The resource type.
- crn string
- (String) The CRN for this endpoint gateway.
- deleteds
Get
Is Subnet Reserved Ip Target Reference Deleted[] - (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information.
- href string
- (String) The URL for this endpoint gateway.
- id string
- (String) The unique identifier for this endpoint gateway.
- name string
- (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
- resource
Type string - (String) The resource type.
- crn str
- (String) The CRN for this endpoint gateway.
- deleteds
Sequence[Get
Is Subnet Reserved Ip Target Reference Deleted] - (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information.
- href str
- (String) The URL for this endpoint gateway.
- id str
- (String) The unique identifier for this endpoint gateway.
- name str
- (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
- resource_
type str - (String) The resource type.
- crn String
- (String) The CRN for this endpoint gateway.
- deleteds List<Property Map>
- (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information.
- href String
- (String) The URL for this endpoint gateway.
- id String
- (String) The unique identifier for this endpoint gateway.
- name String
- (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
- resource
Type String - (String) The resource type.
GetIsSubnetReservedIpTargetReferenceDeleted
- More
Info string - (String) Link to documentation about deleted resources.
- More
Info string - (String) Link to documentation about deleted resources.
- more
Info String - (String) Link to documentation about deleted resources.
- more
Info string - (String) Link to documentation about deleted resources.
- more_
info str - (String) Link to documentation about deleted resources.
- more
Info String - (String) Link to documentation about deleted resources.
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.