1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Core
  5. Vlan
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

oci.Core.Vlan

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

    This resource provides the Vlan resource in Oracle Cloud Infrastructure Core service.

    Creates a VLAN in the specified VCN and the specified compartment.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testVlan = new oci.core.Vlan("testVlan", {
        cidrBlock: _var.vlan_cidr_block,
        compartmentId: _var.compartment_id,
        vcnId: oci_core_vcn.test_vcn.id,
        availabilityDomain: _var.vlan_availability_domain,
        definedTags: {
            "Operations.CostCenter": "42",
        },
        displayName: _var.vlan_display_name,
        freeformTags: {
            Department: "Finance",
        },
        nsgIds: _var.vlan_nsg_ids,
        routeTableId: oci_core_route_table.test_route_table.id,
        vlanTag: _var.vlan_vlan_tag,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_vlan = oci.core.Vlan("testVlan",
        cidr_block=var["vlan_cidr_block"],
        compartment_id=var["compartment_id"],
        vcn_id=oci_core_vcn["test_vcn"]["id"],
        availability_domain=var["vlan_availability_domain"],
        defined_tags={
            "Operations.CostCenter": "42",
        },
        display_name=var["vlan_display_name"],
        freeform_tags={
            "Department": "Finance",
        },
        nsg_ids=var["vlan_nsg_ids"],
        route_table_id=oci_core_route_table["test_route_table"]["id"],
        vlan_tag=var["vlan_vlan_tag"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/Core"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Core.NewVlan(ctx, "testVlan", &Core.VlanArgs{
    			CidrBlock:          pulumi.Any(_var.Vlan_cidr_block),
    			CompartmentId:      pulumi.Any(_var.Compartment_id),
    			VcnId:              pulumi.Any(oci_core_vcn.Test_vcn.Id),
    			AvailabilityDomain: pulumi.Any(_var.Vlan_availability_domain),
    			DefinedTags: pulumi.Map{
    				"Operations.CostCenter": pulumi.Any("42"),
    			},
    			DisplayName: pulumi.Any(_var.Vlan_display_name),
    			FreeformTags: pulumi.Map{
    				"Department": pulumi.Any("Finance"),
    			},
    			NsgIds:       pulumi.Any(_var.Vlan_nsg_ids),
    			RouteTableId: pulumi.Any(oci_core_route_table.Test_route_table.Id),
    			VlanTag:      pulumi.Any(_var.Vlan_vlan_tag),
    		})
    		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 testVlan = new Oci.Core.Vlan("testVlan", new()
        {
            CidrBlock = @var.Vlan_cidr_block,
            CompartmentId = @var.Compartment_id,
            VcnId = oci_core_vcn.Test_vcn.Id,
            AvailabilityDomain = @var.Vlan_availability_domain,
            DefinedTags = 
            {
                { "Operations.CostCenter", "42" },
            },
            DisplayName = @var.Vlan_display_name,
            FreeformTags = 
            {
                { "Department", "Finance" },
            },
            NsgIds = @var.Vlan_nsg_ids,
            RouteTableId = oci_core_route_table.Test_route_table.Id,
            VlanTag = @var.Vlan_vlan_tag,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Core.Vlan;
    import com.pulumi.oci.Core.VlanArgs;
    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) {
            var testVlan = new Vlan("testVlan", VlanArgs.builder()        
                .cidrBlock(var_.vlan_cidr_block())
                .compartmentId(var_.compartment_id())
                .vcnId(oci_core_vcn.test_vcn().id())
                .availabilityDomain(var_.vlan_availability_domain())
                .definedTags(Map.of("Operations.CostCenter", "42"))
                .displayName(var_.vlan_display_name())
                .freeformTags(Map.of("Department", "Finance"))
                .nsgIds(var_.vlan_nsg_ids())
                .routeTableId(oci_core_route_table.test_route_table().id())
                .vlanTag(var_.vlan_vlan_tag())
                .build());
    
        }
    }
    
    resources:
      testVlan:
        type: oci:Core:Vlan
        properties:
          #Required
          cidrBlock: ${var.vlan_cidr_block}
          compartmentId: ${var.compartment_id}
          vcnId: ${oci_core_vcn.test_vcn.id}
          #Optional
          availabilityDomain: ${var.vlan_availability_domain}
          definedTags:
            Operations.CostCenter: '42'
          displayName: ${var.vlan_display_name}
          freeformTags:
            Department: Finance
          nsgIds: ${var.vlan_nsg_ids}
          routeTableId: ${oci_core_route_table.test_route_table.id}
          vlanTag: ${var.vlan_vlan_tag}
    

    Create Vlan Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Vlan(name: string, args: VlanArgs, opts?: CustomResourceOptions);
    @overload
    def Vlan(resource_name: str,
             args: VlanArgs,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def Vlan(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             cidr_block: Optional[str] = None,
             compartment_id: Optional[str] = None,
             vcn_id: Optional[str] = None,
             availability_domain: Optional[str] = None,
             defined_tags: Optional[Mapping[str, Any]] = None,
             display_name: Optional[str] = None,
             freeform_tags: Optional[Mapping[str, Any]] = None,
             nsg_ids: Optional[Sequence[str]] = None,
             route_table_id: Optional[str] = None,
             vlan_tag: Optional[int] = None)
    func NewVlan(ctx *Context, name string, args VlanArgs, opts ...ResourceOption) (*Vlan, error)
    public Vlan(string name, VlanArgs args, CustomResourceOptions? opts = null)
    public Vlan(String name, VlanArgs args)
    public Vlan(String name, VlanArgs args, CustomResourceOptions options)
    
    type: oci:Core:Vlan
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args VlanArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args VlanArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args VlanArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VlanArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VlanArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var vlanResource = new Oci.Core.Vlan("vlanResource", new()
    {
        CidrBlock = "string",
        CompartmentId = "string",
        VcnId = "string",
        AvailabilityDomain = "string",
        DefinedTags = 
        {
            { "string", "any" },
        },
        DisplayName = "string",
        FreeformTags = 
        {
            { "string", "any" },
        },
        NsgIds = new[]
        {
            "string",
        },
        RouteTableId = "string",
        VlanTag = 0,
    });
    
    example, err := Core.NewVlan(ctx, "vlanResource", &Core.VlanArgs{
    	CidrBlock:          pulumi.String("string"),
    	CompartmentId:      pulumi.String("string"),
    	VcnId:              pulumi.String("string"),
    	AvailabilityDomain: pulumi.String("string"),
    	DefinedTags: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	DisplayName: pulumi.String("string"),
    	FreeformTags: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	NsgIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	RouteTableId: pulumi.String("string"),
    	VlanTag:      pulumi.Int(0),
    })
    
    var vlanResource = new Vlan("vlanResource", VlanArgs.builder()        
        .cidrBlock("string")
        .compartmentId("string")
        .vcnId("string")
        .availabilityDomain("string")
        .definedTags(Map.of("string", "any"))
        .displayName("string")
        .freeformTags(Map.of("string", "any"))
        .nsgIds("string")
        .routeTableId("string")
        .vlanTag(0)
        .build());
    
    vlan_resource = oci.core.Vlan("vlanResource",
        cidr_block="string",
        compartment_id="string",
        vcn_id="string",
        availability_domain="string",
        defined_tags={
            "string": "any",
        },
        display_name="string",
        freeform_tags={
            "string": "any",
        },
        nsg_ids=["string"],
        route_table_id="string",
        vlan_tag=0)
    
    const vlanResource = new oci.core.Vlan("vlanResource", {
        cidrBlock: "string",
        compartmentId: "string",
        vcnId: "string",
        availabilityDomain: "string",
        definedTags: {
            string: "any",
        },
        displayName: "string",
        freeformTags: {
            string: "any",
        },
        nsgIds: ["string"],
        routeTableId: "string",
        vlanTag: 0,
    });
    
    type: oci:Core:Vlan
    properties:
        availabilityDomain: string
        cidrBlock: string
        compartmentId: string
        definedTags:
            string: any
        displayName: string
        freeformTags:
            string: any
        nsgIds:
            - string
        routeTableId: string
        vcnId: string
        vlanTag: 0
    

    Vlan Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Vlan resource accepts the following input properties:

    CidrBlock string

    (Updatable) The range of IPv4 addresses that will be used for layer 3 communication with hosts outside the VLAN. The CIDR must maintain the following rules -

    a. The CIDR block is valid and correctly formatted. b. The new range is within one of the parent VCN ranges.

    Example: 192.0.2.0/24

    CompartmentId string
    (Updatable) The OCID of the compartment to contain the VLAN.
    VcnId string
    The OCID of the VCN to contain the VLAN.
    AvailabilityDomain string

    Controls whether the VLAN is regional or specific to an availability domain. A regional VLAN has the flexibility to implement failover across availability domains. Previously, all VLANs were AD-specific.

    To create a regional VLAN, omit this attribute. Resources created subsequently in this VLAN (such as a Compute instance) can be created in any availability domain in the region.

    To create an AD-specific VLAN, use this attribute to specify the availability domain. Resources created in this VLAN must be in that availability domain.

    Example: Uocm:PHX-AD-1

    DefinedTags Dictionary<string, object>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    DisplayName string
    (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    FreeformTags Dictionary<string, object>
    (Updatable) 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"}
    NsgIds List<string>
    (Updatable) A list of the OCIDs of the network security groups (NSGs) to add all VNICs in the VLAN to. For more information about NSGs, see NetworkSecurityGroup.
    RouteTableId string
    (Updatable) The OCID of the route table the VLAN will use. If you don't provide a value, the VLAN uses the VCN's default route table.
    VlanTag int

    The IEEE 802.1Q VLAN tag for this VLAN. The value must be unique across all VLANs in the VCN. If you don't provide a value, Oracle assigns one. You cannot change the value later. VLAN tag 0 is reserved for use by Oracle.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    CidrBlock string

    (Updatable) The range of IPv4 addresses that will be used for layer 3 communication with hosts outside the VLAN. The CIDR must maintain the following rules -

    a. The CIDR block is valid and correctly formatted. b. The new range is within one of the parent VCN ranges.

    Example: 192.0.2.0/24

    CompartmentId string
    (Updatable) The OCID of the compartment to contain the VLAN.
    VcnId string
    The OCID of the VCN to contain the VLAN.
    AvailabilityDomain string

    Controls whether the VLAN is regional or specific to an availability domain. A regional VLAN has the flexibility to implement failover across availability domains. Previously, all VLANs were AD-specific.

    To create a regional VLAN, omit this attribute. Resources created subsequently in this VLAN (such as a Compute instance) can be created in any availability domain in the region.

    To create an AD-specific VLAN, use this attribute to specify the availability domain. Resources created in this VLAN must be in that availability domain.

    Example: Uocm:PHX-AD-1

    DefinedTags map[string]interface{}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    DisplayName string
    (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    FreeformTags map[string]interface{}
    (Updatable) 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"}
    NsgIds []string
    (Updatable) A list of the OCIDs of the network security groups (NSGs) to add all VNICs in the VLAN to. For more information about NSGs, see NetworkSecurityGroup.
    RouteTableId string
    (Updatable) The OCID of the route table the VLAN will use. If you don't provide a value, the VLAN uses the VCN's default route table.
    VlanTag int

    The IEEE 802.1Q VLAN tag for this VLAN. The value must be unique across all VLANs in the VCN. If you don't provide a value, Oracle assigns one. You cannot change the value later. VLAN tag 0 is reserved for use by Oracle.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    cidrBlock String

    (Updatable) The range of IPv4 addresses that will be used for layer 3 communication with hosts outside the VLAN. The CIDR must maintain the following rules -

    a. The CIDR block is valid and correctly formatted. b. The new range is within one of the parent VCN ranges.

    Example: 192.0.2.0/24

    compartmentId String
    (Updatable) The OCID of the compartment to contain the VLAN.
    vcnId String
    The OCID of the VCN to contain the VLAN.
    availabilityDomain String

    Controls whether the VLAN is regional or specific to an availability domain. A regional VLAN has the flexibility to implement failover across availability domains. Previously, all VLANs were AD-specific.

    To create a regional VLAN, omit this attribute. Resources created subsequently in this VLAN (such as a Compute instance) can be created in any availability domain in the region.

    To create an AD-specific VLAN, use this attribute to specify the availability domain. Resources created in this VLAN must be in that availability domain.

    Example: Uocm:PHX-AD-1

    definedTags Map<String,Object>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName String
    (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    freeformTags Map<String,Object>
    (Updatable) 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"}
    nsgIds List<String>
    (Updatable) A list of the OCIDs of the network security groups (NSGs) to add all VNICs in the VLAN to. For more information about NSGs, see NetworkSecurityGroup.
    routeTableId String
    (Updatable) The OCID of the route table the VLAN will use. If you don't provide a value, the VLAN uses the VCN's default route table.
    vlanTag Integer

    The IEEE 802.1Q VLAN tag for this VLAN. The value must be unique across all VLANs in the VCN. If you don't provide a value, Oracle assigns one. You cannot change the value later. VLAN tag 0 is reserved for use by Oracle.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    cidrBlock string

    (Updatable) The range of IPv4 addresses that will be used for layer 3 communication with hosts outside the VLAN. The CIDR must maintain the following rules -

    a. The CIDR block is valid and correctly formatted. b. The new range is within one of the parent VCN ranges.

    Example: 192.0.2.0/24

    compartmentId string
    (Updatable) The OCID of the compartment to contain the VLAN.
    vcnId string
    The OCID of the VCN to contain the VLAN.
    availabilityDomain string

    Controls whether the VLAN is regional or specific to an availability domain. A regional VLAN has the flexibility to implement failover across availability domains. Previously, all VLANs were AD-specific.

    To create a regional VLAN, omit this attribute. Resources created subsequently in this VLAN (such as a Compute instance) can be created in any availability domain in the region.

    To create an AD-specific VLAN, use this attribute to specify the availability domain. Resources created in this VLAN must be in that availability domain.

    Example: Uocm:PHX-AD-1

    definedTags {[key: string]: any}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName string
    (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    freeformTags {[key: string]: any}
    (Updatable) 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"}
    nsgIds string[]
    (Updatable) A list of the OCIDs of the network security groups (NSGs) to add all VNICs in the VLAN to. For more information about NSGs, see NetworkSecurityGroup.
    routeTableId string
    (Updatable) The OCID of the route table the VLAN will use. If you don't provide a value, the VLAN uses the VCN's default route table.
    vlanTag number

    The IEEE 802.1Q VLAN tag for this VLAN. The value must be unique across all VLANs in the VCN. If you don't provide a value, Oracle assigns one. You cannot change the value later. VLAN tag 0 is reserved for use by Oracle.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    cidr_block str

    (Updatable) The range of IPv4 addresses that will be used for layer 3 communication with hosts outside the VLAN. The CIDR must maintain the following rules -

    a. The CIDR block is valid and correctly formatted. b. The new range is within one of the parent VCN ranges.

    Example: 192.0.2.0/24

    compartment_id str
    (Updatable) The OCID of the compartment to contain the VLAN.
    vcn_id str
    The OCID of the VCN to contain the VLAN.
    availability_domain str

    Controls whether the VLAN is regional or specific to an availability domain. A regional VLAN has the flexibility to implement failover across availability domains. Previously, all VLANs were AD-specific.

    To create a regional VLAN, omit this attribute. Resources created subsequently in this VLAN (such as a Compute instance) can be created in any availability domain in the region.

    To create an AD-specific VLAN, use this attribute to specify the availability domain. Resources created in this VLAN must be in that availability domain.

    Example: Uocm:PHX-AD-1

    defined_tags Mapping[str, Any]
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    display_name str
    (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    freeform_tags Mapping[str, Any]
    (Updatable) 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"}
    nsg_ids Sequence[str]
    (Updatable) A list of the OCIDs of the network security groups (NSGs) to add all VNICs in the VLAN to. For more information about NSGs, see NetworkSecurityGroup.
    route_table_id str
    (Updatable) The OCID of the route table the VLAN will use. If you don't provide a value, the VLAN uses the VCN's default route table.
    vlan_tag int

    The IEEE 802.1Q VLAN tag for this VLAN. The value must be unique across all VLANs in the VCN. If you don't provide a value, Oracle assigns one. You cannot change the value later. VLAN tag 0 is reserved for use by Oracle.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    cidrBlock String

    (Updatable) The range of IPv4 addresses that will be used for layer 3 communication with hosts outside the VLAN. The CIDR must maintain the following rules -

    a. The CIDR block is valid and correctly formatted. b. The new range is within one of the parent VCN ranges.

    Example: 192.0.2.0/24

    compartmentId String
    (Updatable) The OCID of the compartment to contain the VLAN.
    vcnId String
    The OCID of the VCN to contain the VLAN.
    availabilityDomain String

    Controls whether the VLAN is regional or specific to an availability domain. A regional VLAN has the flexibility to implement failover across availability domains. Previously, all VLANs were AD-specific.

    To create a regional VLAN, omit this attribute. Resources created subsequently in this VLAN (such as a Compute instance) can be created in any availability domain in the region.

    To create an AD-specific VLAN, use this attribute to specify the availability domain. Resources created in this VLAN must be in that availability domain.

    Example: Uocm:PHX-AD-1

    definedTags Map<Any>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName String
    (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    freeformTags Map<Any>
    (Updatable) 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"}
    nsgIds List<String>
    (Updatable) A list of the OCIDs of the network security groups (NSGs) to add all VNICs in the VLAN to. For more information about NSGs, see NetworkSecurityGroup.
    routeTableId String
    (Updatable) The OCID of the route table the VLAN will use. If you don't provide a value, the VLAN uses the VCN's default route table.
    vlanTag Number

    The IEEE 802.1Q VLAN tag for this VLAN. The value must be unique across all VLANs in the VCN. If you don't provide a value, Oracle assigns one. You cannot change the value later. VLAN tag 0 is reserved for use by Oracle.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Vlan resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    The VLAN's current state.
    TimeCreated string
    The date and time the VLAN was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    The VLAN's current state.
    TimeCreated string
    The date and time the VLAN was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    The VLAN's current state.
    timeCreated String
    The date and time the VLAN was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    id string
    The provider-assigned unique ID for this managed resource.
    state string
    The VLAN's current state.
    timeCreated string
    The date and time the VLAN was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    id str
    The provider-assigned unique ID for this managed resource.
    state str
    The VLAN's current state.
    time_created str
    The date and time the VLAN was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    The VLAN's current state.
    timeCreated String
    The date and time the VLAN was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

    Look up Existing Vlan Resource

    Get an existing Vlan resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: VlanState, opts?: CustomResourceOptions): Vlan
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            availability_domain: Optional[str] = None,
            cidr_block: Optional[str] = None,
            compartment_id: Optional[str] = None,
            defined_tags: Optional[Mapping[str, Any]] = None,
            display_name: Optional[str] = None,
            freeform_tags: Optional[Mapping[str, Any]] = None,
            nsg_ids: Optional[Sequence[str]] = None,
            route_table_id: Optional[str] = None,
            state: Optional[str] = None,
            time_created: Optional[str] = None,
            vcn_id: Optional[str] = None,
            vlan_tag: Optional[int] = None) -> Vlan
    func GetVlan(ctx *Context, name string, id IDInput, state *VlanState, opts ...ResourceOption) (*Vlan, error)
    public static Vlan Get(string name, Input<string> id, VlanState? state, CustomResourceOptions? opts = null)
    public static Vlan get(String name, Output<String> id, VlanState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AvailabilityDomain string

    Controls whether the VLAN is regional or specific to an availability domain. A regional VLAN has the flexibility to implement failover across availability domains. Previously, all VLANs were AD-specific.

    To create a regional VLAN, omit this attribute. Resources created subsequently in this VLAN (such as a Compute instance) can be created in any availability domain in the region.

    To create an AD-specific VLAN, use this attribute to specify the availability domain. Resources created in this VLAN must be in that availability domain.

    Example: Uocm:PHX-AD-1

    CidrBlock string

    (Updatable) The range of IPv4 addresses that will be used for layer 3 communication with hosts outside the VLAN. The CIDR must maintain the following rules -

    a. The CIDR block is valid and correctly formatted. b. The new range is within one of the parent VCN ranges.

    Example: 192.0.2.0/24

    CompartmentId string
    (Updatable) The OCID of the compartment to contain the VLAN.
    DefinedTags Dictionary<string, object>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    DisplayName string
    (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    FreeformTags Dictionary<string, object>
    (Updatable) 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"}
    NsgIds List<string>
    (Updatable) A list of the OCIDs of the network security groups (NSGs) to add all VNICs in the VLAN to. For more information about NSGs, see NetworkSecurityGroup.
    RouteTableId string
    (Updatable) The OCID of the route table the VLAN will use. If you don't provide a value, the VLAN uses the VCN's default route table.
    State string
    The VLAN's current state.
    TimeCreated string
    The date and time the VLAN was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    VcnId string
    The OCID of the VCN to contain the VLAN.
    VlanTag int

    The IEEE 802.1Q VLAN tag for this VLAN. The value must be unique across all VLANs in the VCN. If you don't provide a value, Oracle assigns one. You cannot change the value later. VLAN tag 0 is reserved for use by Oracle.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    AvailabilityDomain string

    Controls whether the VLAN is regional or specific to an availability domain. A regional VLAN has the flexibility to implement failover across availability domains. Previously, all VLANs were AD-specific.

    To create a regional VLAN, omit this attribute. Resources created subsequently in this VLAN (such as a Compute instance) can be created in any availability domain in the region.

    To create an AD-specific VLAN, use this attribute to specify the availability domain. Resources created in this VLAN must be in that availability domain.

    Example: Uocm:PHX-AD-1

    CidrBlock string

    (Updatable) The range of IPv4 addresses that will be used for layer 3 communication with hosts outside the VLAN. The CIDR must maintain the following rules -

    a. The CIDR block is valid and correctly formatted. b. The new range is within one of the parent VCN ranges.

    Example: 192.0.2.0/24

    CompartmentId string
    (Updatable) The OCID of the compartment to contain the VLAN.
    DefinedTags map[string]interface{}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    DisplayName string
    (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    FreeformTags map[string]interface{}
    (Updatable) 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"}
    NsgIds []string
    (Updatable) A list of the OCIDs of the network security groups (NSGs) to add all VNICs in the VLAN to. For more information about NSGs, see NetworkSecurityGroup.
    RouteTableId string
    (Updatable) The OCID of the route table the VLAN will use. If you don't provide a value, the VLAN uses the VCN's default route table.
    State string
    The VLAN's current state.
    TimeCreated string
    The date and time the VLAN was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    VcnId string
    The OCID of the VCN to contain the VLAN.
    VlanTag int

    The IEEE 802.1Q VLAN tag for this VLAN. The value must be unique across all VLANs in the VCN. If you don't provide a value, Oracle assigns one. You cannot change the value later. VLAN tag 0 is reserved for use by Oracle.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    availabilityDomain String

    Controls whether the VLAN is regional or specific to an availability domain. A regional VLAN has the flexibility to implement failover across availability domains. Previously, all VLANs were AD-specific.

    To create a regional VLAN, omit this attribute. Resources created subsequently in this VLAN (such as a Compute instance) can be created in any availability domain in the region.

    To create an AD-specific VLAN, use this attribute to specify the availability domain. Resources created in this VLAN must be in that availability domain.

    Example: Uocm:PHX-AD-1

    cidrBlock String

    (Updatable) The range of IPv4 addresses that will be used for layer 3 communication with hosts outside the VLAN. The CIDR must maintain the following rules -

    a. The CIDR block is valid and correctly formatted. b. The new range is within one of the parent VCN ranges.

    Example: 192.0.2.0/24

    compartmentId String
    (Updatable) The OCID of the compartment to contain the VLAN.
    definedTags Map<String,Object>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName String
    (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    freeformTags Map<String,Object>
    (Updatable) 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"}
    nsgIds List<String>
    (Updatable) A list of the OCIDs of the network security groups (NSGs) to add all VNICs in the VLAN to. For more information about NSGs, see NetworkSecurityGroup.
    routeTableId String
    (Updatable) The OCID of the route table the VLAN will use. If you don't provide a value, the VLAN uses the VCN's default route table.
    state String
    The VLAN's current state.
    timeCreated String
    The date and time the VLAN was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    vcnId String
    The OCID of the VCN to contain the VLAN.
    vlanTag Integer

    The IEEE 802.1Q VLAN tag for this VLAN. The value must be unique across all VLANs in the VCN. If you don't provide a value, Oracle assigns one. You cannot change the value later. VLAN tag 0 is reserved for use by Oracle.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    availabilityDomain string

    Controls whether the VLAN is regional or specific to an availability domain. A regional VLAN has the flexibility to implement failover across availability domains. Previously, all VLANs were AD-specific.

    To create a regional VLAN, omit this attribute. Resources created subsequently in this VLAN (such as a Compute instance) can be created in any availability domain in the region.

    To create an AD-specific VLAN, use this attribute to specify the availability domain. Resources created in this VLAN must be in that availability domain.

    Example: Uocm:PHX-AD-1

    cidrBlock string

    (Updatable) The range of IPv4 addresses that will be used for layer 3 communication with hosts outside the VLAN. The CIDR must maintain the following rules -

    a. The CIDR block is valid and correctly formatted. b. The new range is within one of the parent VCN ranges.

    Example: 192.0.2.0/24

    compartmentId string
    (Updatable) The OCID of the compartment to contain the VLAN.
    definedTags {[key: string]: any}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName string
    (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    freeformTags {[key: string]: any}
    (Updatable) 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"}
    nsgIds string[]
    (Updatable) A list of the OCIDs of the network security groups (NSGs) to add all VNICs in the VLAN to. For more information about NSGs, see NetworkSecurityGroup.
    routeTableId string
    (Updatable) The OCID of the route table the VLAN will use. If you don't provide a value, the VLAN uses the VCN's default route table.
    state string
    The VLAN's current state.
    timeCreated string
    The date and time the VLAN was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    vcnId string
    The OCID of the VCN to contain the VLAN.
    vlanTag number

    The IEEE 802.1Q VLAN tag for this VLAN. The value must be unique across all VLANs in the VCN. If you don't provide a value, Oracle assigns one. You cannot change the value later. VLAN tag 0 is reserved for use by Oracle.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    availability_domain str

    Controls whether the VLAN is regional or specific to an availability domain. A regional VLAN has the flexibility to implement failover across availability domains. Previously, all VLANs were AD-specific.

    To create a regional VLAN, omit this attribute. Resources created subsequently in this VLAN (such as a Compute instance) can be created in any availability domain in the region.

    To create an AD-specific VLAN, use this attribute to specify the availability domain. Resources created in this VLAN must be in that availability domain.

    Example: Uocm:PHX-AD-1

    cidr_block str

    (Updatable) The range of IPv4 addresses that will be used for layer 3 communication with hosts outside the VLAN. The CIDR must maintain the following rules -

    a. The CIDR block is valid and correctly formatted. b. The new range is within one of the parent VCN ranges.

    Example: 192.0.2.0/24

    compartment_id str
    (Updatable) The OCID of the compartment to contain the VLAN.
    defined_tags Mapping[str, Any]
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    display_name str
    (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    freeform_tags Mapping[str, Any]
    (Updatable) 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"}
    nsg_ids Sequence[str]
    (Updatable) A list of the OCIDs of the network security groups (NSGs) to add all VNICs in the VLAN to. For more information about NSGs, see NetworkSecurityGroup.
    route_table_id str
    (Updatable) The OCID of the route table the VLAN will use. If you don't provide a value, the VLAN uses the VCN's default route table.
    state str
    The VLAN's current state.
    time_created str
    The date and time the VLAN was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    vcn_id str
    The OCID of the VCN to contain the VLAN.
    vlan_tag int

    The IEEE 802.1Q VLAN tag for this VLAN. The value must be unique across all VLANs in the VCN. If you don't provide a value, Oracle assigns one. You cannot change the value later. VLAN tag 0 is reserved for use by Oracle.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    availabilityDomain String

    Controls whether the VLAN is regional or specific to an availability domain. A regional VLAN has the flexibility to implement failover across availability domains. Previously, all VLANs were AD-specific.

    To create a regional VLAN, omit this attribute. Resources created subsequently in this VLAN (such as a Compute instance) can be created in any availability domain in the region.

    To create an AD-specific VLAN, use this attribute to specify the availability domain. Resources created in this VLAN must be in that availability domain.

    Example: Uocm:PHX-AD-1

    cidrBlock String

    (Updatable) The range of IPv4 addresses that will be used for layer 3 communication with hosts outside the VLAN. The CIDR must maintain the following rules -

    a. The CIDR block is valid and correctly formatted. b. The new range is within one of the parent VCN ranges.

    Example: 192.0.2.0/24

    compartmentId String
    (Updatable) The OCID of the compartment to contain the VLAN.
    definedTags Map<Any>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName String
    (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    freeformTags Map<Any>
    (Updatable) 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"}
    nsgIds List<String>
    (Updatable) A list of the OCIDs of the network security groups (NSGs) to add all VNICs in the VLAN to. For more information about NSGs, see NetworkSecurityGroup.
    routeTableId String
    (Updatable) The OCID of the route table the VLAN will use. If you don't provide a value, the VLAN uses the VCN's default route table.
    state String
    The VLAN's current state.
    timeCreated String
    The date and time the VLAN was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    vcnId String
    The OCID of the VCN to contain the VLAN.
    vlanTag Number

    The IEEE 802.1Q VLAN tag for this VLAN. The value must be unique across all VLANs in the VCN. If you don't provide a value, Oracle assigns one. You cannot change the value later. VLAN tag 0 is reserved for use by Oracle.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    Import

    Vlans can be imported using the id, e.g.

    $ pulumi import oci:Core/vlan:Vlan test_vlan "id"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi