Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi
oci.Core.getSubnets
Explore with Pulumi AI
This data source provides the list of Subnets in Oracle Cloud Infrastructure Core service.
Lists the subnets in the specified VCN and the specified compartment. If the VCN ID is not provided, then the list includes the subnets from all VCNs in the specified compartment.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testSubnets = oci.Core.getSubnets({
compartmentId: compartmentId,
displayName: subnetDisplayName,
state: subnetState,
vcnId: testVcn.id,
});
import pulumi
import pulumi_oci as oci
test_subnets = oci.Core.get_subnets(compartment_id=compartment_id,
display_name=subnet_display_name,
state=subnet_state,
vcn_id=test_vcn["id"])
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/core"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := core.GetSubnets(ctx, &core.GetSubnetsArgs{
CompartmentId: compartmentId,
DisplayName: pulumi.StringRef(subnetDisplayName),
State: pulumi.StringRef(subnetState),
VcnId: pulumi.StringRef(testVcn.Id),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testSubnets = Oci.Core.GetSubnets.Invoke(new()
{
CompartmentId = compartmentId,
DisplayName = subnetDisplayName,
State = subnetState,
VcnId = testVcn.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Core.CoreFunctions;
import com.pulumi.oci.Core.inputs.GetSubnetsArgs;
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 testSubnets = CoreFunctions.getSubnets(GetSubnetsArgs.builder()
.compartmentId(compartmentId)
.displayName(subnetDisplayName)
.state(subnetState)
.vcnId(testVcn.id())
.build());
}
}
variables:
testSubnets:
fn::invoke:
function: oci:Core:getSubnets
arguments:
compartmentId: ${compartmentId}
displayName: ${subnetDisplayName}
state: ${subnetState}
vcnId: ${testVcn.id}
Using getSubnets
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 getSubnets(args: GetSubnetsArgs, opts?: InvokeOptions): Promise<GetSubnetsResult>
function getSubnetsOutput(args: GetSubnetsOutputArgs, opts?: InvokeOptions): Output<GetSubnetsResult>
def get_subnets(compartment_id: Optional[str] = None,
display_name: Optional[str] = None,
filters: Optional[Sequence[_core.GetSubnetsFilter]] = None,
state: Optional[str] = None,
vcn_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSubnetsResult
def get_subnets_output(compartment_id: Optional[pulumi.Input[str]] = None,
display_name: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[_core.GetSubnetsFilterArgs]]]] = None,
state: Optional[pulumi.Input[str]] = None,
vcn_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSubnetsResult]
func GetSubnets(ctx *Context, args *GetSubnetsArgs, opts ...InvokeOption) (*GetSubnetsResult, error)
func GetSubnetsOutput(ctx *Context, args *GetSubnetsOutputArgs, opts ...InvokeOption) GetSubnetsResultOutput
> Note: This function is named GetSubnets
in the Go SDK.
public static class GetSubnets
{
public static Task<GetSubnetsResult> InvokeAsync(GetSubnetsArgs args, InvokeOptions? opts = null)
public static Output<GetSubnetsResult> Invoke(GetSubnetsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetSubnetsResult> getSubnets(GetSubnetsArgs args, InvokeOptions options)
public static Output<GetSubnetsResult> getSubnets(GetSubnetsArgs args, InvokeOptions options)
fn::invoke:
function: oci:Core/getSubnets:getSubnets
arguments:
# arguments dictionary
The following arguments are supported:
- Compartment
Id This property is required. string - The OCID of the compartment.
- Display
Name string - A filter to return only resources that match the given display name exactly.
- Filters
Changes to this property will trigger replacement.
Subnets Filter> - State string
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- Vcn
Id string - The OCID of the VCN.
- Compartment
Id This property is required. string - The OCID of the compartment.
- Display
Name string - A filter to return only resources that match the given display name exactly.
- Filters
Changes to this property will trigger replacement.
Subnets Filter - State string
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- Vcn
Id string - The OCID of the VCN.
- compartment
Id This property is required. String - The OCID of the compartment.
- display
Name String - A filter to return only resources that match the given display name exactly.
- filters
Changes to this property will trigger replacement.
Subnets Filter> - state String
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- vcn
Id String - The OCID of the VCN.
- compartment
Id This property is required. string - The OCID of the compartment.
- display
Name string - A filter to return only resources that match the given display name exactly.
- filters
Changes to this property will trigger replacement.
Subnets Filter[] - state string
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- vcn
Id string - The OCID of the VCN.
- compartment_
id This property is required. str - The OCID of the compartment.
- display_
name str - A filter to return only resources that match the given display name exactly.
- filters
Changes to this property will trigger replacement.
Get Subnets Filter] - state str
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- vcn_
id str - The OCID of the VCN.
- compartment
Id This property is required. String - The OCID of the compartment.
- display
Name String - A filter to return only resources that match the given display name exactly.
- filters
Changes to this property will trigger replacement.
- state String
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- vcn
Id String - The OCID of the VCN.
getSubnets Result
The following output properties are available:
- Compartment
Id string - The OCID of the compartment containing the subnet.
- Id string
- The provider-assigned unique ID for this managed resource.
- Subnets
List<Get
Subnets Subnet> - The list of subnets.
- Display
Name string - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- Filters
List<Get
Subnets Filter> - State string
- The subnet's current state.
- Vcn
Id string - The OCID of the VCN the subnet is in.
- Compartment
Id string - The OCID of the compartment containing the subnet.
- Id string
- The provider-assigned unique ID for this managed resource.
- Subnets
[]Get
Subnets Subnet - The list of subnets.
- Display
Name string - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- Filters
[]Get
Subnets Filter - State string
- The subnet's current state.
- Vcn
Id string - The OCID of the VCN the subnet is in.
- compartment
Id String - The OCID of the compartment containing the subnet.
- id String
- The provider-assigned unique ID for this managed resource.
- subnets
List<Get
Subnets Subnet> - The list of subnets.
- display
Name String - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- filters
List<Get
Subnets Filter> - state String
- The subnet's current state.
- vcn
Id String - The OCID of the VCN the subnet is in.
- compartment
Id string - The OCID of the compartment containing the subnet.
- id string
- The provider-assigned unique ID for this managed resource.
- subnets
Get
Subnets Subnet[] - The list of subnets.
- display
Name string - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- filters
Get
Subnets Filter[] - state string
- The subnet's current state.
- vcn
Id string - The OCID of the VCN the subnet is in.
- compartment_
id str - The OCID of the compartment containing the subnet.
- id str
- The provider-assigned unique ID for this managed resource.
- subnets
Sequence[core.
Get Subnets Subnet] - The list of subnets.
- display_
name str - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- filters
Sequence[core.
Get Subnets Filter] - state str
- The subnet's current state.
- vcn_
id str - The OCID of the VCN the subnet is in.
- compartment
Id String - The OCID of the compartment containing the subnet.
- id String
- The provider-assigned unique ID for this managed resource.
- subnets List<Property Map>
- The list of subnets.
- display
Name String - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- filters List<Property Map>
- state String
- The subnet's current state.
- vcn
Id String - The OCID of the VCN the subnet is in.
Supporting Types
GetSubnetsFilter
GetSubnetsSubnet
- Availability
Domain This property is required. string - The subnet's availability domain. This attribute will be null if this is a regional subnet instead of an AD-specific subnet. Oracle recommends creating regional subnets. Example:
Uocm:PHX-AD-1
- Cidr
Block This property is required. string - The subnet's CIDR block. Example:
10.0.1.0/24
- Compartment
Id This property is required. string - The OCID of the compartment.
This property is required. Dictionary<string, string>- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Dhcp
Options Id This property is required. string - The OCID of the set of DHCP options that the subnet uses.
- Display
Name This property is required. string - A filter to return only resources that match the given display name exactly.
- Dns
Label This property is required. string - A DNS label for the subnet, used in conjunction with the VNIC's hostname and VCN's DNS label to form a fully qualified domain name (FQDN) for each VNIC within this subnet (for example,
bminstance1.subnet123.vcn1.oraclevcn.com
). Must be an alphanumeric string that begins with a letter and is unique within the VCN. The value cannot be changed. This property is required. Dictionary<string, string>- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- Id
This property is required. string - The subnet's Oracle ID (OCID).
- Ipv6cidr
Block This property is required. string - For an IPv6-enabled subnet, this is the IPv6 prefix for the subnet's IP address space. The subnet size is always /64. See IPv6 Addresses. Example:
2001:0db8:0123:1111::/64
- Ipv6cidr
Blocks This property is required. List<string> - The list of all IPv6 prefixes (Oracle allocated IPv6 GUA, ULA or private IPv6 prefixes, BYOIPv6 prefixes) for the subnet.
- Ipv6virtual
Router Ip This property is required. string - For an IPv6-enabled subnet, this is the IPv6 address of the virtual router. Example:
2001:0db8:0123:1111:89ab:cdef:1234:5678
- Prohibit
Internet Ingress This property is required. bool - Whether to disallow ingress internet traffic to VNICs within this subnet. Defaults to false.
- Prohibit
Public Ip On Vnic This property is required. bool - Whether VNICs within this subnet can have public IP addresses. Defaults to false, which means VNICs created in this subnet will automatically be assigned public IP addresses unless specified otherwise during instance launch or VNIC creation (with the
assignPublicIp
flag in CreateVnicDetails). IfprohibitPublicIpOnVnic
is set to true, VNICs created in this subnet cannot have public IP addresses (that is, it's a private subnet). Example:true
- Route
Table Id This property is required. string - The OCID of the route table that the subnet uses.
- Security
List Ids This property is required. List<string> - The OCIDs of the security list or lists that the subnet uses. Remember that security lists are associated with the subnet, but the rules are applied to the individual VNICs in the subnet.
- State
This property is required. string - A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- Subnet
Domain Name This property is required. string - The subnet's domain name, which consists of the subnet's DNS label, the VCN's DNS label, and the
oraclevcn.com
domain. - Time
Created This property is required. string - The date and time the subnet was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- Vcn
Id This property is required. string - The OCID of the VCN.
- Virtual
Router Ip This property is required. string - The IP address of the virtual router. Example:
10.0.14.1
- Virtual
Router Mac This property is required. string - The MAC address of the virtual router. Example:
00:00:00:00:00:01
- Availability
Domain This property is required. string - The subnet's availability domain. This attribute will be null if this is a regional subnet instead of an AD-specific subnet. Oracle recommends creating regional subnets. Example:
Uocm:PHX-AD-1
- Cidr
Block This property is required. string - The subnet's CIDR block. Example:
10.0.1.0/24
- Compartment
Id This property is required. string - The OCID of the compartment.
This property is required. map[string]string- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Dhcp
Options Id This property is required. string - The OCID of the set of DHCP options that the subnet uses.
- Display
Name This property is required. string - A filter to return only resources that match the given display name exactly.
- Dns
Label This property is required. string - A DNS label for the subnet, used in conjunction with the VNIC's hostname and VCN's DNS label to form a fully qualified domain name (FQDN) for each VNIC within this subnet (for example,
bminstance1.subnet123.vcn1.oraclevcn.com
). Must be an alphanumeric string that begins with a letter and is unique within the VCN. The value cannot be changed. This property is required. map[string]string- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- Id
This property is required. string - The subnet's Oracle ID (OCID).
- Ipv6cidr
Block This property is required. string - For an IPv6-enabled subnet, this is the IPv6 prefix for the subnet's IP address space. The subnet size is always /64. See IPv6 Addresses. Example:
2001:0db8:0123:1111::/64
- Ipv6cidr
Blocks This property is required. []string - The list of all IPv6 prefixes (Oracle allocated IPv6 GUA, ULA or private IPv6 prefixes, BYOIPv6 prefixes) for the subnet.
- Ipv6virtual
Router Ip This property is required. string - For an IPv6-enabled subnet, this is the IPv6 address of the virtual router. Example:
2001:0db8:0123:1111:89ab:cdef:1234:5678
- Prohibit
Internet Ingress This property is required. bool - Whether to disallow ingress internet traffic to VNICs within this subnet. Defaults to false.
- Prohibit
Public Ip On Vnic This property is required. bool - Whether VNICs within this subnet can have public IP addresses. Defaults to false, which means VNICs created in this subnet will automatically be assigned public IP addresses unless specified otherwise during instance launch or VNIC creation (with the
assignPublicIp
flag in CreateVnicDetails). IfprohibitPublicIpOnVnic
is set to true, VNICs created in this subnet cannot have public IP addresses (that is, it's a private subnet). Example:true
- Route
Table Id This property is required. string - The OCID of the route table that the subnet uses.
- Security
List Ids This property is required. []string - The OCIDs of the security list or lists that the subnet uses. Remember that security lists are associated with the subnet, but the rules are applied to the individual VNICs in the subnet.
- State
This property is required. string - A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- Subnet
Domain Name This property is required. string - The subnet's domain name, which consists of the subnet's DNS label, the VCN's DNS label, and the
oraclevcn.com
domain. - Time
Created This property is required. string - The date and time the subnet was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- Vcn
Id This property is required. string - The OCID of the VCN.
- Virtual
Router Ip This property is required. string - The IP address of the virtual router. Example:
10.0.14.1
- Virtual
Router Mac This property is required. string - The MAC address of the virtual router. Example:
00:00:00:00:00:01
- availability
Domain This property is required. String - The subnet's availability domain. This attribute will be null if this is a regional subnet instead of an AD-specific subnet. Oracle recommends creating regional subnets. Example:
Uocm:PHX-AD-1
- cidr
Block This property is required. String - The subnet's CIDR block. Example:
10.0.1.0/24
- compartment
Id This property is required. String - The OCID of the compartment.
This property is required. Map<String,String>- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- dhcp
Options Id This property is required. String - The OCID of the set of DHCP options that the subnet uses.
- display
Name This property is required. String - A filter to return only resources that match the given display name exactly.
- dns
Label This property is required. String - A DNS label for the subnet, used in conjunction with the VNIC's hostname and VCN's DNS label to form a fully qualified domain name (FQDN) for each VNIC within this subnet (for example,
bminstance1.subnet123.vcn1.oraclevcn.com
). Must be an alphanumeric string that begins with a letter and is unique within the VCN. The value cannot be changed. This property is required. Map<String,String>- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- id
This property is required. String - The subnet's Oracle ID (OCID).
- ipv6cidr
Block This property is required. String - For an IPv6-enabled subnet, this is the IPv6 prefix for the subnet's IP address space. The subnet size is always /64. See IPv6 Addresses. Example:
2001:0db8:0123:1111::/64
- ipv6cidr
Blocks This property is required. List<String> - The list of all IPv6 prefixes (Oracle allocated IPv6 GUA, ULA or private IPv6 prefixes, BYOIPv6 prefixes) for the subnet.
- ipv6virtual
Router Ip This property is required. String - For an IPv6-enabled subnet, this is the IPv6 address of the virtual router. Example:
2001:0db8:0123:1111:89ab:cdef:1234:5678
- prohibit
Internet Ingress This property is required. Boolean - Whether to disallow ingress internet traffic to VNICs within this subnet. Defaults to false.
- prohibit
Public Ip On Vnic This property is required. Boolean - Whether VNICs within this subnet can have public IP addresses. Defaults to false, which means VNICs created in this subnet will automatically be assigned public IP addresses unless specified otherwise during instance launch or VNIC creation (with the
assignPublicIp
flag in CreateVnicDetails). IfprohibitPublicIpOnVnic
is set to true, VNICs created in this subnet cannot have public IP addresses (that is, it's a private subnet). Example:true
- route
Table Id This property is required. String - The OCID of the route table that the subnet uses.
- security
List Ids This property is required. List<String> - The OCIDs of the security list or lists that the subnet uses. Remember that security lists are associated with the subnet, but the rules are applied to the individual VNICs in the subnet.
- state
This property is required. String - A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- subnet
Domain Name This property is required. String - The subnet's domain name, which consists of the subnet's DNS label, the VCN's DNS label, and the
oraclevcn.com
domain. - time
Created This property is required. String - The date and time the subnet was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- vcn
Id This property is required. String - The OCID of the VCN.
- virtual
Router Ip This property is required. String - The IP address of the virtual router. Example:
10.0.14.1
- virtual
Router Mac This property is required. String - The MAC address of the virtual router. Example:
00:00:00:00:00:01
- availability
Domain This property is required. string - The subnet's availability domain. This attribute will be null if this is a regional subnet instead of an AD-specific subnet. Oracle recommends creating regional subnets. Example:
Uocm:PHX-AD-1
- cidr
Block This property is required. string - The subnet's CIDR block. Example:
10.0.1.0/24
- compartment
Id This property is required. string - The OCID of the compartment.
This property is required. {[key: string]: string}- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- dhcp
Options Id This property is required. string - The OCID of the set of DHCP options that the subnet uses.
- display
Name This property is required. string - A filter to return only resources that match the given display name exactly.
- dns
Label This property is required. string - A DNS label for the subnet, used in conjunction with the VNIC's hostname and VCN's DNS label to form a fully qualified domain name (FQDN) for each VNIC within this subnet (for example,
bminstance1.subnet123.vcn1.oraclevcn.com
). Must be an alphanumeric string that begins with a letter and is unique within the VCN. The value cannot be changed. This property is required. {[key: string]: string}- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- id
This property is required. string - The subnet's Oracle ID (OCID).
- ipv6cidr
Block This property is required. string - For an IPv6-enabled subnet, this is the IPv6 prefix for the subnet's IP address space. The subnet size is always /64. See IPv6 Addresses. Example:
2001:0db8:0123:1111::/64
- ipv6cidr
Blocks This property is required. string[] - The list of all IPv6 prefixes (Oracle allocated IPv6 GUA, ULA or private IPv6 prefixes, BYOIPv6 prefixes) for the subnet.
- ipv6virtual
Router Ip This property is required. string - For an IPv6-enabled subnet, this is the IPv6 address of the virtual router. Example:
2001:0db8:0123:1111:89ab:cdef:1234:5678
- prohibit
Internet Ingress This property is required. boolean - Whether to disallow ingress internet traffic to VNICs within this subnet. Defaults to false.
- prohibit
Public Ip On Vnic This property is required. boolean - Whether VNICs within this subnet can have public IP addresses. Defaults to false, which means VNICs created in this subnet will automatically be assigned public IP addresses unless specified otherwise during instance launch or VNIC creation (with the
assignPublicIp
flag in CreateVnicDetails). IfprohibitPublicIpOnVnic
is set to true, VNICs created in this subnet cannot have public IP addresses (that is, it's a private subnet). Example:true
- route
Table Id This property is required. string - The OCID of the route table that the subnet uses.
- security
List Ids This property is required. string[] - The OCIDs of the security list or lists that the subnet uses. Remember that security lists are associated with the subnet, but the rules are applied to the individual VNICs in the subnet.
- state
This property is required. string - A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- subnet
Domain Name This property is required. string - The subnet's domain name, which consists of the subnet's DNS label, the VCN's DNS label, and the
oraclevcn.com
domain. - time
Created This property is required. string - The date and time the subnet was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- vcn
Id This property is required. string - The OCID of the VCN.
- virtual
Router Ip This property is required. string - The IP address of the virtual router. Example:
10.0.14.1
- virtual
Router Mac This property is required. string - The MAC address of the virtual router. Example:
00:00:00:00:00:01
- availability_
domain This property is required. str - The subnet's availability domain. This attribute will be null if this is a regional subnet instead of an AD-specific subnet. Oracle recommends creating regional subnets. Example:
Uocm:PHX-AD-1
- cidr_
block This property is required. str - The subnet's CIDR block. Example:
10.0.1.0/24
- compartment_
id This property is required. str - The OCID of the compartment.
This property is required. Mapping[str, str]- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- dhcp_
options_ id This property is required. str - The OCID of the set of DHCP options that the subnet uses.
- display_
name This property is required. str - A filter to return only resources that match the given display name exactly.
- dns_
label This property is required. str - A DNS label for the subnet, used in conjunction with the VNIC's hostname and VCN's DNS label to form a fully qualified domain name (FQDN) for each VNIC within this subnet (for example,
bminstance1.subnet123.vcn1.oraclevcn.com
). Must be an alphanumeric string that begins with a letter and is unique within the VCN. The value cannot be changed. This property is required. Mapping[str, str]- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- id
This property is required. str - The subnet's Oracle ID (OCID).
- ipv6cidr_
block This property is required. str - For an IPv6-enabled subnet, this is the IPv6 prefix for the subnet's IP address space. The subnet size is always /64. See IPv6 Addresses. Example:
2001:0db8:0123:1111::/64
- ipv6cidr_
blocks This property is required. Sequence[str] - The list of all IPv6 prefixes (Oracle allocated IPv6 GUA, ULA or private IPv6 prefixes, BYOIPv6 prefixes) for the subnet.
- ipv6virtual_
router_ ip This property is required. str - For an IPv6-enabled subnet, this is the IPv6 address of the virtual router. Example:
2001:0db8:0123:1111:89ab:cdef:1234:5678
- prohibit_
internet_ ingress This property is required. bool - Whether to disallow ingress internet traffic to VNICs within this subnet. Defaults to false.
- prohibit_
public_ ip_ on_ vnic This property is required. bool - Whether VNICs within this subnet can have public IP addresses. Defaults to false, which means VNICs created in this subnet will automatically be assigned public IP addresses unless specified otherwise during instance launch or VNIC creation (with the
assignPublicIp
flag in CreateVnicDetails). IfprohibitPublicIpOnVnic
is set to true, VNICs created in this subnet cannot have public IP addresses (that is, it's a private subnet). Example:true
- route_
table_ id This property is required. str - The OCID of the route table that the subnet uses.
- security_
list_ ids This property is required. Sequence[str] - The OCIDs of the security list or lists that the subnet uses. Remember that security lists are associated with the subnet, but the rules are applied to the individual VNICs in the subnet.
- state
This property is required. str - A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- subnet_
domain_ name This property is required. str - The subnet's domain name, which consists of the subnet's DNS label, the VCN's DNS label, and the
oraclevcn.com
domain. - time_
created This property is required. str - The date and time the subnet was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- vcn_
id This property is required. str - The OCID of the VCN.
- virtual_
router_ ip This property is required. str - The IP address of the virtual router. Example:
10.0.14.1
- virtual_
router_ mac This property is required. str - The MAC address of the virtual router. Example:
00:00:00:00:00:01
- availability
Domain This property is required. String - The subnet's availability domain. This attribute will be null if this is a regional subnet instead of an AD-specific subnet. Oracle recommends creating regional subnets. Example:
Uocm:PHX-AD-1
- cidr
Block This property is required. String - The subnet's CIDR block. Example:
10.0.1.0/24
- compartment
Id This property is required. String - The OCID of the compartment.
This property is required. Map<String>- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- dhcp
Options Id This property is required. String - The OCID of the set of DHCP options that the subnet uses.
- display
Name This property is required. String - A filter to return only resources that match the given display name exactly.
- dns
Label This property is required. String - A DNS label for the subnet, used in conjunction with the VNIC's hostname and VCN's DNS label to form a fully qualified domain name (FQDN) for each VNIC within this subnet (for example,
bminstance1.subnet123.vcn1.oraclevcn.com
). Must be an alphanumeric string that begins with a letter and is unique within the VCN. The value cannot be changed. This property is required. Map<String>- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- id
This property is required. String - The subnet's Oracle ID (OCID).
- ipv6cidr
Block This property is required. String - For an IPv6-enabled subnet, this is the IPv6 prefix for the subnet's IP address space. The subnet size is always /64. See IPv6 Addresses. Example:
2001:0db8:0123:1111::/64
- ipv6cidr
Blocks This property is required. List<String> - The list of all IPv6 prefixes (Oracle allocated IPv6 GUA, ULA or private IPv6 prefixes, BYOIPv6 prefixes) for the subnet.
- ipv6virtual
Router Ip This property is required. String - For an IPv6-enabled subnet, this is the IPv6 address of the virtual router. Example:
2001:0db8:0123:1111:89ab:cdef:1234:5678
- prohibit
Internet Ingress This property is required. Boolean - Whether to disallow ingress internet traffic to VNICs within this subnet. Defaults to false.
- prohibit
Public Ip On Vnic This property is required. Boolean - Whether VNICs within this subnet can have public IP addresses. Defaults to false, which means VNICs created in this subnet will automatically be assigned public IP addresses unless specified otherwise during instance launch or VNIC creation (with the
assignPublicIp
flag in CreateVnicDetails). IfprohibitPublicIpOnVnic
is set to true, VNICs created in this subnet cannot have public IP addresses (that is, it's a private subnet). Example:true
- route
Table Id This property is required. String - The OCID of the route table that the subnet uses.
- security
List Ids This property is required. List<String> - The OCIDs of the security list or lists that the subnet uses. Remember that security lists are associated with the subnet, but the rules are applied to the individual VNICs in the subnet.
- state
This property is required. String - A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- subnet
Domain Name This property is required. String - The subnet's domain name, which consists of the subnet's DNS label, the VCN's DNS label, and the
oraclevcn.com
domain. - time
Created This property is required. String - The date and time the subnet was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- vcn
Id This property is required. String - The OCID of the VCN.
- virtual
Router Ip This property is required. String - The IP address of the virtual router. Example:
10.0.14.1
- virtual
Router Mac This property is required. String - The MAC address of the virtual router. Example:
00:00:00:00:00:01
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.