outscale 1.0.1 published on Thursday, Mar 13, 2025 by outscale
outscale.getSubnet
Explore with Pulumi AI
Provides information about a Subnet.
For more information on this resource, see the User Guide.
For more information on this resource actions, see the API documentation.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as outscale from "@pulumi/outscale";
const subnet01 = outscale.getSubnet({
    filters: [{
        name: "net_ids",
        values: ["vpc-12345678"],
    }],
});
import pulumi
import pulumi_outscale as outscale
subnet01 = outscale.get_subnet(filters=[{
    "name": "net_ids",
    "values": ["vpc-12345678"],
}])
package main
import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/outscale/outscale"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := outscale.LookupSubnet(ctx, &outscale.LookupSubnetArgs{
			Filters: []outscale.GetSubnetFilter{
				{
					Name: "net_ids",
					Values: []string{
						"vpc-12345678",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Outscale = Pulumi.Outscale;
return await Deployment.RunAsync(() => 
{
    var subnet01 = Outscale.GetSubnet.Invoke(new()
    {
        Filters = new[]
        {
            new Outscale.Inputs.GetSubnetFilterInputArgs
            {
                Name = "net_ids",
                Values = new[]
                {
                    "vpc-12345678",
                },
            },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.outscale.OutscaleFunctions;
import com.pulumi.outscale.inputs.GetSubnetArgs;
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 subnet01 = OutscaleFunctions.getSubnet(GetSubnetArgs.builder()
            .filters(GetSubnetFilterArgs.builder()
                .name("net_ids")
                .values("vpc-12345678")
                .build())
            .build());
    }
}
variables:
  subnet01:
    fn::invoke:
      function: outscale:getSubnet
      arguments:
        filters:
          - name: net_ids
            values:
              - vpc-12345678
Using getSubnet
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 getSubnet(args: GetSubnetArgs, opts?: InvokeOptions): Promise<GetSubnetResult>
function getSubnetOutput(args: GetSubnetOutputArgs, opts?: InvokeOptions): Output<GetSubnetResult>def get_subnet(filters: Optional[Sequence[GetSubnetFilter]] = None,
               id: Optional[str] = None,
               subnet_id: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetSubnetResult
def get_subnet_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetSubnetFilterArgs]]]] = None,
               id: Optional[pulumi.Input[str]] = None,
               subnet_id: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetSubnetResult]func LookupSubnet(ctx *Context, args *LookupSubnetArgs, opts ...InvokeOption) (*LookupSubnetResult, error)
func LookupSubnetOutput(ctx *Context, args *LookupSubnetOutputArgs, opts ...InvokeOption) LookupSubnetResultOutput> Note: This function is named LookupSubnet in the Go SDK.
public static class GetSubnet 
{
    public static Task<GetSubnetResult> InvokeAsync(GetSubnetArgs args, InvokeOptions? opts = null)
    public static Output<GetSubnetResult> Invoke(GetSubnetInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetSubnetResult> getSubnet(GetSubnetArgs args, InvokeOptions options)
public static Output<GetSubnetResult> getSubnet(GetSubnetArgs args, InvokeOptions options)
fn::invoke:
  function: outscale:index/getSubnet:getSubnet
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Filters
List<GetSubnet Filter> 
- A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
- Id string
- SubnetId string
- The ID of the Subnet.
- Filters
[]GetSubnet Filter 
- A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
- Id string
- SubnetId string
- The ID of the Subnet.
- filters
List<GetSubnet Filter> 
- A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
- id String
- subnetId String
- The ID of the Subnet.
- filters
GetSubnet Filter[] 
- A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
- id string
- subnetId string
- The ID of the Subnet.
- filters
Sequence[GetSubnet Filter] 
- A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
- id str
- subnet_id str
- The ID of the Subnet.
- filters List<Property Map>
- A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
- id String
- subnetId String
- The ID of the Subnet.
getSubnet Result
The following output properties are available:
- AvailableIps doubleCount 
- The number of available IPs in the Subnets.
- Id string
- IpRange string
- The IP range in the Subnet, in CIDR notation (for example, 10.0.0.0/16).
- MapPublic boolIp On Launch 
- If true, a public IP is assigned to the network interface cards (NICs) created in the specified Subnet.
- NetId string
- The ID of the Net in which the Subnet is.
- RequestId string
- State string
- The state of the Subnet (pending|available|deleted).
- SubnetId string
- The ID of the Subnet.
- SubregionName string
- The name of the Subregion in which the Subnet is located.
- 
List<GetSubnet Tag> 
- One or more tags associated with the Subnet.
- Filters
List<GetSubnet Filter> 
- AvailableIps float64Count 
- The number of available IPs in the Subnets.
- Id string
- IpRange string
- The IP range in the Subnet, in CIDR notation (for example, 10.0.0.0/16).
- MapPublic boolIp On Launch 
- If true, a public IP is assigned to the network interface cards (NICs) created in the specified Subnet.
- NetId string
- The ID of the Net in which the Subnet is.
- RequestId string
- State string
- The state of the Subnet (pending|available|deleted).
- SubnetId string
- The ID of the Subnet.
- SubregionName string
- The name of the Subregion in which the Subnet is located.
- 
[]GetSubnet Tag 
- One or more tags associated with the Subnet.
- Filters
[]GetSubnet Filter 
- availableIps DoubleCount 
- The number of available IPs in the Subnets.
- id String
- ipRange String
- The IP range in the Subnet, in CIDR notation (for example, 10.0.0.0/16).
- mapPublic BooleanIp On Launch 
- If true, a public IP is assigned to the network interface cards (NICs) created in the specified Subnet.
- netId String
- The ID of the Net in which the Subnet is.
- requestId String
- state String
- The state of the Subnet (pending|available|deleted).
- subnetId String
- The ID of the Subnet.
- subregionName String
- The name of the Subregion in which the Subnet is located.
- 
List<GetSubnet Tag> 
- One or more tags associated with the Subnet.
- filters
List<GetSubnet Filter> 
- availableIps numberCount 
- The number of available IPs in the Subnets.
- id string
- ipRange string
- The IP range in the Subnet, in CIDR notation (for example, 10.0.0.0/16).
- mapPublic booleanIp On Launch 
- If true, a public IP is assigned to the network interface cards (NICs) created in the specified Subnet.
- netId string
- The ID of the Net in which the Subnet is.
- requestId string
- state string
- The state of the Subnet (pending|available|deleted).
- subnetId string
- The ID of the Subnet.
- subregionName string
- The name of the Subregion in which the Subnet is located.
- 
GetSubnet Tag[] 
- One or more tags associated with the Subnet.
- filters
GetSubnet Filter[] 
- available_ips_ floatcount 
- The number of available IPs in the Subnets.
- id str
- ip_range str
- The IP range in the Subnet, in CIDR notation (for example, 10.0.0.0/16).
- map_public_ boolip_ on_ launch 
- If true, a public IP is assigned to the network interface cards (NICs) created in the specified Subnet.
- net_id str
- The ID of the Net in which the Subnet is.
- request_id str
- state str
- The state of the Subnet (pending|available|deleted).
- subnet_id str
- The ID of the Subnet.
- subregion_name str
- The name of the Subregion in which the Subnet is located.
- 
Sequence[GetSubnet Tag] 
- One or more tags associated with the Subnet.
- filters
Sequence[GetSubnet Filter] 
- availableIps NumberCount 
- The number of available IPs in the Subnets.
- id String
- ipRange String
- The IP range in the Subnet, in CIDR notation (for example, 10.0.0.0/16).
- mapPublic BooleanIp On Launch 
- If true, a public IP is assigned to the network interface cards (NICs) created in the specified Subnet.
- netId String
- The ID of the Net in which the Subnet is.
- requestId String
- state String
- The state of the Subnet (pending|available|deleted).
- subnetId String
- The ID of the Subnet.
- subregionName String
- The name of the Subregion in which the Subnet is located.
- List<Property Map>
- One or more tags associated with the Subnet.
- filters List<Property Map>
Supporting Types
GetSubnetFilter  
GetSubnetTag  
Package Details
- Repository
- outscale outscale/terraform-provider-outscale
- License
- Notes
- This Pulumi package is based on the outscaleTerraform Provider.