Try AWS Native preview for resources not in the classic version.
aws.ec2.getSubnet
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
aws.ec2.Subnet
provides details about a specific VPC subnet.
This resource can prove useful when a module accepts a subnet ID as an input variable and needs to, for example, determine the ID of the VPC that the subnet belongs to.
Example Usage
The following example shows how one might accept a subnet ID as a variable and use this data source to obtain the data necessary to create a security group that allows connections from hosts in that subnet.
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const config = new pulumi.Config();
const subnetId = config.requireObject("subnetId");
const selected = aws.ec2.getSubnet({
id: subnetId,
});
const subnet = new aws.ec2.SecurityGroup("subnet", {
vpcId: selected.then(selected => selected.vpcId),
ingress: [{
cidrBlocks: [selected.then(selected => selected.cidrBlock)],
fromPort: 80,
toPort: 80,
protocol: "tcp",
}],
});
import pulumi
import pulumi_aws as aws
config = pulumi.Config()
subnet_id = config.require_object("subnetId")
selected = aws.ec2.get_subnet(id=subnet_id)
subnet = aws.ec2.SecurityGroup("subnet",
vpc_id=selected.vpc_id,
ingress=[{
"cidrBlocks": [selected.cidr_block],
"fromPort": 80,
"toPort": 80,
"protocol": "tcp",
}])
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
subnetId := cfg.RequireObject("subnetId")
selected, err := ec2.LookupSubnet(ctx, &ec2.LookupSubnetArgs{
Id: pulumi.StringRef(subnetId),
}, nil)
if err != nil {
return err
}
_, err = ec2.NewSecurityGroup(ctx, "subnet", &ec2.SecurityGroupArgs{
VpcId: pulumi.String(selected.VpcId),
Ingress: ec2.SecurityGroupIngressArray{
&ec2.SecurityGroupIngressArgs{
CidrBlocks: pulumi.StringArray{
pulumi.String(selected.CidrBlock),
},
FromPort: pulumi.Int(80),
ToPort: pulumi.Int(80),
Protocol: pulumi.String("tcp"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var subnetId = config.RequireObject<dynamic>("subnetId");
var selected = Aws.Ec2.GetSubnet.Invoke(new()
{
Id = subnetId,
});
var subnet = new Aws.Ec2.SecurityGroup("subnet", new()
{
VpcId = selected.Apply(getSubnetResult => getSubnetResult.VpcId),
Ingress = new[]
{
new Aws.Ec2.Inputs.SecurityGroupIngressArgs
{
CidrBlocks = new[]
{
selected.Apply(getSubnetResult => getSubnetResult.CidrBlock),
},
FromPort = 80,
ToPort = 80,
Protocol = "tcp",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Ec2Functions;
import com.pulumi.aws.ec2.inputs.GetSubnetArgs;
import com.pulumi.aws.ec2.SecurityGroup;
import com.pulumi.aws.ec2.SecurityGroupArgs;
import com.pulumi.aws.ec2.inputs.SecurityGroupIngressArgs;
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 config = ctx.config();
final var subnetId = config.get("subnetId");
final var selected = Ec2Functions.getSubnet(GetSubnetArgs.builder()
.id(subnetId)
.build());
var subnet = new SecurityGroup("subnet", SecurityGroupArgs.builder()
.vpcId(selected.applyValue(getSubnetResult -> getSubnetResult.vpcId()))
.ingress(SecurityGroupIngressArgs.builder()
.cidrBlocks(selected.applyValue(getSubnetResult -> getSubnetResult.cidrBlock()))
.fromPort(80)
.toPort(80)
.protocol("tcp")
.build())
.build());
}
}
configuration:
subnetId:
type: dynamic
resources:
subnet:
type: aws:ec2:SecurityGroup
properties:
vpcId: ${selected.vpcId}
ingress:
- cidrBlocks:
- ${selected.cidrBlock}
fromPort: 80
toPort: 80
protocol: tcp
variables:
selected:
fn::invoke:
Function: aws:ec2:getSubnet
Arguments:
id: ${subnetId}
Filter Example
If you want to match against tag Name
, use:
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const selected = aws.ec2.getSubnet({
filters: [{
name: "tag:Name",
values: ["yakdriver"],
}],
});
import pulumi
import pulumi_aws as aws
selected = aws.ec2.get_subnet(filters=[{
"name": "tag:Name",
"values": ["yakdriver"],
}])
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ec2.LookupSubnet(ctx, &ec2.LookupSubnetArgs{
Filters: []ec2.GetSubnetFilter{
{
Name: "tag:Name",
Values: []string{
"yakdriver",
},
},
},
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var selected = Aws.Ec2.GetSubnet.Invoke(new()
{
Filters = new[]
{
new Aws.Ec2.Inputs.GetSubnetFilterInputArgs
{
Name = "tag:Name",
Values = new[]
{
"yakdriver",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Ec2Functions;
import com.pulumi.aws.ec2.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 selected = Ec2Functions.getSubnet(GetSubnetArgs.builder()
.filters(GetSubnetFilterArgs.builder()
.name("tag:Name")
.values("yakdriver")
.build())
.build());
}
}
variables:
selected:
fn::invoke:
Function: aws:ec2:getSubnet
Arguments:
filters:
- name: tag:Name
values:
- yakdriver
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(availability_zone: Optional[str] = None,
availability_zone_id: Optional[str] = None,
cidr_block: Optional[str] = None,
default_for_az: Optional[bool] = None,
filters: Optional[Sequence[GetSubnetFilter]] = None,
id: Optional[str] = None,
ipv6_cidr_block: Optional[str] = None,
state: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
vpc_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSubnetResult
def get_subnet_output(availability_zone: Optional[pulumi.Input[str]] = None,
availability_zone_id: Optional[pulumi.Input[str]] = None,
cidr_block: Optional[pulumi.Input[str]] = None,
default_for_az: Optional[pulumi.Input[bool]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetSubnetFilterArgs]]]] = None,
id: Optional[pulumi.Input[str]] = None,
ipv6_cidr_block: Optional[pulumi.Input[str]] = None,
state: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
vpc_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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws:ec2/getSubnet:getSubnet
arguments:
# arguments dictionary
The following arguments are supported:
- Availability
Zone string - Availability zone where the subnet must reside.
- Availability
Zone stringId - ID of the Availability Zone for the subnet. This argument is not supported in all regions or partitions. If necessary, use
availability_zone
instead. - Cidr
Block string - CIDR block of the desired subnet.
- Default
For boolAz - Whether the desired subnet must be the default subnet for its associated availability zone.
- Filters
List<Get
Subnet Filter> - Configuration block. Detailed below.
- Id string
- ID of the specific subnet to retrieve.
- Ipv6Cidr
Block string - IPv6 CIDR block of the desired subnet.
- State string
- State that the desired subnet must have.
- Dictionary<string, string>
- Map of tags, each pair of which must exactly match a pair on the desired subnet.
- Vpc
Id string - ID of the VPC that the desired subnet belongs to.
- Availability
Zone string - Availability zone where the subnet must reside.
- Availability
Zone stringId - ID of the Availability Zone for the subnet. This argument is not supported in all regions or partitions. If necessary, use
availability_zone
instead. - Cidr
Block string - CIDR block of the desired subnet.
- Default
For boolAz - Whether the desired subnet must be the default subnet for its associated availability zone.
- Filters
[]Get
Subnet Filter - Configuration block. Detailed below.
- Id string
- ID of the specific subnet to retrieve.
- Ipv6Cidr
Block string - IPv6 CIDR block of the desired subnet.
- State string
- State that the desired subnet must have.
- map[string]string
- Map of tags, each pair of which must exactly match a pair on the desired subnet.
- Vpc
Id string - ID of the VPC that the desired subnet belongs to.
- availability
Zone String - Availability zone where the subnet must reside.
- availability
Zone StringId - ID of the Availability Zone for the subnet. This argument is not supported in all regions or partitions. If necessary, use
availability_zone
instead. - cidr
Block String - CIDR block of the desired subnet.
- default
For BooleanAz - Whether the desired subnet must be the default subnet for its associated availability zone.
- filters
List<Get
Subnet Filter> - Configuration block. Detailed below.
- id String
- ID of the specific subnet to retrieve.
- ipv6Cidr
Block String - IPv6 CIDR block of the desired subnet.
- state String
- State that the desired subnet must have.
- Map<String,String>
- Map of tags, each pair of which must exactly match a pair on the desired subnet.
- vpc
Id String - ID of the VPC that the desired subnet belongs to.
- availability
Zone string - Availability zone where the subnet must reside.
- availability
Zone stringId - ID of the Availability Zone for the subnet. This argument is not supported in all regions or partitions. If necessary, use
availability_zone
instead. - cidr
Block string - CIDR block of the desired subnet.
- default
For booleanAz - Whether the desired subnet must be the default subnet for its associated availability zone.
- filters
Get
Subnet Filter[] - Configuration block. Detailed below.
- id string
- ID of the specific subnet to retrieve.
- ipv6Cidr
Block string - IPv6 CIDR block of the desired subnet.
- state string
- State that the desired subnet must have.
- {[key: string]: string}
- Map of tags, each pair of which must exactly match a pair on the desired subnet.
- vpc
Id string - ID of the VPC that the desired subnet belongs to.
- availability_
zone str - Availability zone where the subnet must reside.
- availability_
zone_ strid - ID of the Availability Zone for the subnet. This argument is not supported in all regions or partitions. If necessary, use
availability_zone
instead. - cidr_
block str - CIDR block of the desired subnet.
- default_
for_ boolaz - Whether the desired subnet must be the default subnet for its associated availability zone.
- filters
Sequence[Get
Subnet Filter] - Configuration block. Detailed below.
- id str
- ID of the specific subnet to retrieve.
- ipv6_
cidr_ strblock - IPv6 CIDR block of the desired subnet.
- state str
- State that the desired subnet must have.
- Mapping[str, str]
- Map of tags, each pair of which must exactly match a pair on the desired subnet.
- vpc_
id str - ID of the VPC that the desired subnet belongs to.
- availability
Zone String - Availability zone where the subnet must reside.
- availability
Zone StringId - ID of the Availability Zone for the subnet. This argument is not supported in all regions or partitions. If necessary, use
availability_zone
instead. - cidr
Block String - CIDR block of the desired subnet.
- default
For BooleanAz - Whether the desired subnet must be the default subnet for its associated availability zone.
- filters List<Property Map>
- Configuration block. Detailed below.
- id String
- ID of the specific subnet to retrieve.
- ipv6Cidr
Block String - IPv6 CIDR block of the desired subnet.
- state String
- State that the desired subnet must have.
- Map<String>
- Map of tags, each pair of which must exactly match a pair on the desired subnet.
- vpc
Id String - ID of the VPC that the desired subnet belongs to.
getSubnet Result
The following output properties are available:
- Arn string
- ARN of the subnet.
- Assign
Ipv6Address boolOn Creation - Whether an IPv6 address is assigned on creation.
- Availability
Zone string - Availability
Zone stringId - Available
Ip intAddress Count - Available IP addresses of the subnet.
- Cidr
Block string - Customer
Owned stringIpv4Pool - Identifier of customer owned IPv4 address pool.
- Default
For boolAz - Enable
Dns64 bool - Whether DNS queries made to the Amazon-provided DNS Resolver in this subnet return synthetic IPv6 addresses for IPv4-only destinations.
- Enable
Lni intAt Device Index - Indicates the device position for local network interfaces in this subnet. For example, 1 indicates local network interfaces in this subnet are the secondary network interface (eth1). A local network interface cannot be the primary network interface (eth0).
- Enable
Resource boolName Dns ARecord On Launch - Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
- Enable
Resource boolName Dns Aaaa Record On Launch - Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
- Id string
- Ipv6Cidr
Block string - Ipv6Cidr
Block stringAssociation Id - Association ID of the IPv6 CIDR block.
- Ipv6Native bool
- Whether this is an IPv6-only subnet.
- Map
Customer boolOwned Ip On Launch - Whether customer owned IP addresses are assigned on network interface creation.
- Map
Public boolIp On Launch - Whether public IP addresses are assigned on instance launch.
- Outpost
Arn string - ARN of the Outpost.
- Owner
Id string - ID of the AWS account that owns the subnet.
- Private
Dns stringHostname Type On Launch - The type of hostnames assigned to instances in the subnet at launch.
- State string
- Dictionary<string, string>
- Vpc
Id string - Filters
List<Get
Subnet Filter>
- Arn string
- ARN of the subnet.
- Assign
Ipv6Address boolOn Creation - Whether an IPv6 address is assigned on creation.
- Availability
Zone string - Availability
Zone stringId - Available
Ip intAddress Count - Available IP addresses of the subnet.
- Cidr
Block string - Customer
Owned stringIpv4Pool - Identifier of customer owned IPv4 address pool.
- Default
For boolAz - Enable
Dns64 bool - Whether DNS queries made to the Amazon-provided DNS Resolver in this subnet return synthetic IPv6 addresses for IPv4-only destinations.
- Enable
Lni intAt Device Index - Indicates the device position for local network interfaces in this subnet. For example, 1 indicates local network interfaces in this subnet are the secondary network interface (eth1). A local network interface cannot be the primary network interface (eth0).
- Enable
Resource boolName Dns ARecord On Launch - Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
- Enable
Resource boolName Dns Aaaa Record On Launch - Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
- Id string
- Ipv6Cidr
Block string - Ipv6Cidr
Block stringAssociation Id - Association ID of the IPv6 CIDR block.
- Ipv6Native bool
- Whether this is an IPv6-only subnet.
- Map
Customer boolOwned Ip On Launch - Whether customer owned IP addresses are assigned on network interface creation.
- Map
Public boolIp On Launch - Whether public IP addresses are assigned on instance launch.
- Outpost
Arn string - ARN of the Outpost.
- Owner
Id string - ID of the AWS account that owns the subnet.
- Private
Dns stringHostname Type On Launch - The type of hostnames assigned to instances in the subnet at launch.
- State string
- map[string]string
- Vpc
Id string - Filters
[]Get
Subnet Filter
- arn String
- ARN of the subnet.
- assign
Ipv6Address BooleanOn Creation - Whether an IPv6 address is assigned on creation.
- availability
Zone String - availability
Zone StringId - available
Ip IntegerAddress Count - Available IP addresses of the subnet.
- cidr
Block String - customer
Owned StringIpv4Pool - Identifier of customer owned IPv4 address pool.
- default
For BooleanAz - enable
Dns64 Boolean - Whether DNS queries made to the Amazon-provided DNS Resolver in this subnet return synthetic IPv6 addresses for IPv4-only destinations.
- enable
Lni IntegerAt Device Index - Indicates the device position for local network interfaces in this subnet. For example, 1 indicates local network interfaces in this subnet are the secondary network interface (eth1). A local network interface cannot be the primary network interface (eth0).
- enable
Resource BooleanName Dns ARecord On Launch - Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
- enable
Resource BooleanName Dns Aaaa Record On Launch - Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
- id String
- ipv6Cidr
Block String - ipv6Cidr
Block StringAssociation Id - Association ID of the IPv6 CIDR block.
- ipv6Native Boolean
- Whether this is an IPv6-only subnet.
- map
Customer BooleanOwned Ip On Launch - Whether customer owned IP addresses are assigned on network interface creation.
- map
Public BooleanIp On Launch - Whether public IP addresses are assigned on instance launch.
- outpost
Arn String - ARN of the Outpost.
- owner
Id String - ID of the AWS account that owns the subnet.
- private
Dns StringHostname Type On Launch - The type of hostnames assigned to instances in the subnet at launch.
- state String
- Map<String,String>
- vpc
Id String - filters
List<Get
Subnet Filter>
- arn string
- ARN of the subnet.
- assign
Ipv6Address booleanOn Creation - Whether an IPv6 address is assigned on creation.
- availability
Zone string - availability
Zone stringId - available
Ip numberAddress Count - Available IP addresses of the subnet.
- cidr
Block string - customer
Owned stringIpv4Pool - Identifier of customer owned IPv4 address pool.
- default
For booleanAz - enable
Dns64 boolean - Whether DNS queries made to the Amazon-provided DNS Resolver in this subnet return synthetic IPv6 addresses for IPv4-only destinations.
- enable
Lni numberAt Device Index - Indicates the device position for local network interfaces in this subnet. For example, 1 indicates local network interfaces in this subnet are the secondary network interface (eth1). A local network interface cannot be the primary network interface (eth0).
- enable
Resource booleanName Dns ARecord On Launch - Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
- enable
Resource booleanName Dns Aaaa Record On Launch - Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
- id string
- ipv6Cidr
Block string - ipv6Cidr
Block stringAssociation Id - Association ID of the IPv6 CIDR block.
- ipv6Native boolean
- Whether this is an IPv6-only subnet.
- map
Customer booleanOwned Ip On Launch - Whether customer owned IP addresses are assigned on network interface creation.
- map
Public booleanIp On Launch - Whether public IP addresses are assigned on instance launch.
- outpost
Arn string - ARN of the Outpost.
- owner
Id string - ID of the AWS account that owns the subnet.
- private
Dns stringHostname Type On Launch - The type of hostnames assigned to instances in the subnet at launch.
- state string
- {[key: string]: string}
- vpc
Id string - filters
Get
Subnet Filter[]
- arn str
- ARN of the subnet.
- assign_
ipv6_ booladdress_ on_ creation - Whether an IPv6 address is assigned on creation.
- availability_
zone str - availability_
zone_ strid - available_
ip_ intaddress_ count - Available IP addresses of the subnet.
- cidr_
block str - customer_
owned_ stripv4_ pool - Identifier of customer owned IPv4 address pool.
- default_
for_ boolaz - enable_
dns64 bool - Whether DNS queries made to the Amazon-provided DNS Resolver in this subnet return synthetic IPv6 addresses for IPv4-only destinations.
- enable_
lni_ intat_ device_ index - Indicates the device position for local network interfaces in this subnet. For example, 1 indicates local network interfaces in this subnet are the secondary network interface (eth1). A local network interface cannot be the primary network interface (eth0).
- enable_
resource_ boolname_ dns_ a_ record_ on_ launch - Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
- enable_
resource_ boolname_ dns_ aaaa_ record_ on_ launch - Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
- id str
- ipv6_
cidr_ strblock - ipv6_
cidr_ strblock_ association_ id - Association ID of the IPv6 CIDR block.
- ipv6_
native bool - Whether this is an IPv6-only subnet.
- map_
customer_ boolowned_ ip_ on_ launch - Whether customer owned IP addresses are assigned on network interface creation.
- map_
public_ boolip_ on_ launch - Whether public IP addresses are assigned on instance launch.
- outpost_
arn str - ARN of the Outpost.
- owner_
id str - ID of the AWS account that owns the subnet.
- private_
dns_ strhostname_ type_ on_ launch - The type of hostnames assigned to instances in the subnet at launch.
- state str
- Mapping[str, str]
- vpc_
id str - filters
Sequence[Get
Subnet Filter]
- arn String
- ARN of the subnet.
- assign
Ipv6Address BooleanOn Creation - Whether an IPv6 address is assigned on creation.
- availability
Zone String - availability
Zone StringId - available
Ip NumberAddress Count - Available IP addresses of the subnet.
- cidr
Block String - customer
Owned StringIpv4Pool - Identifier of customer owned IPv4 address pool.
- default
For BooleanAz - enable
Dns64 Boolean - Whether DNS queries made to the Amazon-provided DNS Resolver in this subnet return synthetic IPv6 addresses for IPv4-only destinations.
- enable
Lni NumberAt Device Index - Indicates the device position for local network interfaces in this subnet. For example, 1 indicates local network interfaces in this subnet are the secondary network interface (eth1). A local network interface cannot be the primary network interface (eth0).
- enable
Resource BooleanName Dns ARecord On Launch - Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
- enable
Resource BooleanName Dns Aaaa Record On Launch - Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
- id String
- ipv6Cidr
Block String - ipv6Cidr
Block StringAssociation Id - Association ID of the IPv6 CIDR block.
- ipv6Native Boolean
- Whether this is an IPv6-only subnet.
- map
Customer BooleanOwned Ip On Launch - Whether customer owned IP addresses are assigned on network interface creation.
- map
Public BooleanIp On Launch - Whether public IP addresses are assigned on instance launch.
- outpost
Arn String - ARN of the Outpost.
- owner
Id String - ID of the AWS account that owns the subnet.
- private
Dns StringHostname Type On Launch - The type of hostnames assigned to instances in the subnet at launch.
- state String
- Map<String>
- vpc
Id String - filters List<Property Map>
Supporting Types
GetSubnetFilter
- Name string
- Name of the field to filter by, as defined by the underlying AWS API.
- Values List<string>
- Set of values that are accepted for the given field. A subnet will be selected if any one of the given values matches.
- Name string
- Name of the field to filter by, as defined by the underlying AWS API.
- Values []string
- Set of values that are accepted for the given field. A subnet will be selected if any one of the given values matches.
- name String
- Name of the field to filter by, as defined by the underlying AWS API.
- values List<String>
- Set of values that are accepted for the given field. A subnet will be selected if any one of the given values matches.
- name string
- Name of the field to filter by, as defined by the underlying AWS API.
- values string[]
- Set of values that are accepted for the given field. A subnet will be selected if any one of the given values matches.
- name str
- Name of the field to filter by, as defined by the underlying AWS API.
- values Sequence[str]
- Set of values that are accepted for the given field. A subnet will be selected if any one of the given values matches.
- name String
- Name of the field to filter by, as defined by the underlying AWS API.
- values List<String>
- Set of values that are accepted for the given field. A subnet will be selected if any one of the given values matches.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.