import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * This resource provides the Vcn resource in Oracle Cloud Infrastructure Core service. * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/iaas/latest/Vcn * * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/ * * The VCN automatically comes with a default route table, default security list, and default set of DHCP options. * For managing these resources, see [Managing Default VCN Resources](https://www.terraform.io/docs/providers/oci/guides/managing_default_resources.html) * * Creates a new Virtual Cloud Network (VCN). For more information, see * [VCNs and Subnets](https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingVCNs.htm). * * For the VCN, you specify a list of one or more IPv4 CIDR blocks that meet the following criteria: * * - The CIDR blocks must be valid. * - They must not overlap with each other or with the on-premises network CIDR block. * - The number of CIDR blocks does not exceed the limit of CIDR blocks allowed per VCN. * * For a CIDR block, Oracle recommends that you use one of the private IP address ranges specified in [RFC 1918](https://tools.ietf.org/html/rfc1918) (10.0.0.0/8, 172.16/12, and 192.168/16). Example: * 172.16.0.0/16. The CIDR blocks can range from /16 to /30. * * For the purposes of access control, you must provide the [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want the VCN to * reside. Consult an Oracle Cloud Infrastructure administrator in your organization if you're not sure which * compartment to use. Notice that the VCN doesn't have to be in the same compartment as the subnets or other * Networking Service components. For more information about compartments and access control, see * [Overview of the IAM Service](https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm). For information about OCIDs, see * [Resource Identifiers](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). * * You may optionally specify a *display name* for the VCN, otherwise a default is provided. It does not have to * be unique, and you can change it. Avoid entering confidential information. * * You can also add a DNS label for the VCN, which is required if you want the instances to use the * Interent and VCN Resolver option for DNS in the VCN. For more information, see * [DNS in Your Virtual Cloud Network](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/dns.htm). * * The VCN automatically comes with a default route table, default security list, and default set of DHCP options. * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for each is returned in the response. You can't delete these default objects, but you can change their * contents (that is, change the route rules, security list rules, and so on). * * The VCN and subnets you create are not accessible until you attach an internet gateway or set up a Site-to-Site VPN * or FastConnect. For more information, see * [Overview of the Networking Service](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm). * * ## Supported Aliases * * * `oci.Core.VirtualNetwork` * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as oci from "@pulumi/oci"; * * const testVcn = new oci.core.Vcn("test_vcn", { * compartmentId: compartmentId, * byoipv6cidrDetails: [{ * byoipv6rangeId: testByoipv6range.id, * ipv6cidrBlock: vcnByoipv6cidrDetailsIpv6cidrBlock, * }], * cidrBlock: vcnCidrBlock, * cidrBlocks: vcnCidrBlocks, * definedTags: { * "Operations.CostCenter": "42", * }, * displayName: vcnDisplayName, * dnsLabel: vcnDnsLabel, * freeformTags: { * Department: "Finance", * }, * ipv6privateCidrBlocks: vcnIpv6privateCidrBlocks, * isIpv6enabled: vcnIsIpv6enabled === "true", * isOracleGuaAllocationEnabled: vcnIsOracleGuaAllocationEnabled === "true", * securityAttributes: vcnSecurityAttributes, * }); * ``` * * ## Import * * Vcns can be imported using the `id`, e.g. * * ```sh * $ pulumi import oci:Core/vcn:Vcn test_vcn "id" * ``` */ export declare class Vcn extends pulumi.CustomResource { /** * Get an existing Vcn resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: VcnState, opts?: pulumi.CustomResourceOptions): Vcn; /** * Returns true if the given object is an instance of Vcn. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Vcn; /** * The list of BYOIPv6 prefixes required to create a VCN that uses BYOIPv6 ranges. */ readonly byoipv6cidrBlocks: pulumi.Output; /** * The list of BYOIPv6 OCIDs and BYOIPv6 prefixes required to create a VCN that uses BYOIPv6 address ranges. */ readonly byoipv6cidrDetails: pulumi.Output; /** * **Deprecated.** Do *not* set this value. Use `cidrBlocks` instead. Example: `10.0.0.0/16` */ readonly cidrBlock: pulumi.Output; /** * (Updatable) The list of one or more IPv4 CIDR blocks for the VCN that meet the following criteria: * * The CIDR blocks must be valid. * * They must not overlap with each other or with the on-premises network CIDR block. * * The number of CIDR blocks must not exceed the limit of CIDR blocks allowed per VCN. It is an error to set both cidrBlock and cidr_blocks. Note: cidrBlocks update must be restricted to one operation at a time (either add/remove or modify one single cidr_block) or the operation will be declined. new cidrBlock to be added must be placed at the end of the list. Once you migrate to using `cidrBlocks` from `cidrBlock`, you will not be able to switch back. * **Important:** Do *not* specify a value for `cidrBlock`. Use this parameter instead. */ readonly cidrBlocks: pulumi.Output; /** * (Updatable) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to contain the VCN. */ readonly compartmentId: pulumi.Output; /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the VCN's default set of DHCP options. */ readonly defaultDhcpOptionsId: pulumi.Output; /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the VCN's default route table. */ readonly defaultRouteTableId: pulumi.Output; /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the VCN's default security list. */ readonly defaultSecurityListId: pulumi.Output; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}` */ readonly definedTags: pulumi.Output<{ [key: string]: string; }>; /** * (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. */ readonly displayName: pulumi.Output; /** * A DNS label for the VCN, used in conjunction with the VNIC's hostname and subnet's DNS label to form a fully qualified domain name (FQDN) for each VNIC within this subnet (for example, `bminstance1.subnet123.vcn1.oraclevcn.com`). Not required to be unique, but it's a best practice to set unique DNS labels for VCNs in your tenancy. Must be an alphanumeric string that begins with a letter. The value cannot be changed. * You must set this value if you want instances to be able to use hostnames to resolve other instances in the VCN. Otherwise the Internet and VCN Resolver will not work. * * For more information, see [DNS in Your Virtual Cloud Network](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/dns.htm). * * Example: `vcn1` */ readonly dnsLabel: pulumi.Output; /** * (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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` */ readonly freeformTags: pulumi.Output<{ [key: string]: string; }>; /** * For an IPv6-enabled VCN, this is the list of IPv6 prefixes for the VCN's IP address space. The prefixes are provided by Oracle and the sizes are always /56. */ readonly ipv6cidrBlocks: pulumi.Output; /** * The list of one or more ULA or Private IPv6 CIDR blocks for the vcn that meets the following criteria: * * The CIDR blocks must be valid. * * Multiple CIDR blocks must not overlap each other or the on-premises network prefix. * * The number of CIDR blocks must not exceed the limit of IPv6 prefixes allowed to a VCN. * * **Important:** Do *not* specify a value for `ipv6cidrBlock`. Use this parameter instead. * * When updating `ipv6privateCidrBlocks`, Terraform can add, remove, or replace multiple IPv6 private CIDR blocks in a single `pulumi up`. You can also mix several list changes together in the same update instead of applying them one at a time. */ readonly ipv6privateCidrBlocks: pulumi.Output; /** * Whether IPv6 is enabled for the VCN. Default is `false`. If enabled, Oracle will assign the VCN a IPv6 /56 CIDR block. You may skip having Oracle allocate the VCN a IPv6 /56 CIDR block by setting isOracleGuaAllocationEnabled to `false`. For important details about IPv6 addressing in a VCN, see [IPv6 Addresses](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). Example: `true` */ readonly isIpv6enabled: pulumi.Output; /** * Specifies whether Oracle allocates an IPv6 global unicast address (GUA) prefix to the VCN. By default, Oracle allocates one GUA prefix of /56 size for an IPv6-enabled VCN if this value is not explicitly set to false. When this value is changed from `true` to `false` on an existing VCN, the provider removes that prefix from the existing VCN. Customers must manage `isOracleGuaAllocationEnabled` exclusively through Terraform. Changing Oracle GUA allocation outside Terraform can cause Terraform state to differ from the VCN configuration in Oracle Cloud Infrastructure and can result in unexpected plans or failed updates. */ readonly isOracleGuaAllocationEnabled: pulumi.Output; /** * (Updatable) Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. Example: `{"Oracle-DataSecurity-ZPR.MaxEgressCount.value": "42", "Oracle-DataSecurity-ZPR.MaxEgressCount.mode": "audit"}` * * ** 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 */ readonly securityAttributes: pulumi.Output<{ [key: string]: string; }>; /** * The VCN's current state. */ readonly state: pulumi.Output; /** * The date and time the VCN was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). Example: `2016-08-25T21:10:29.600Z` */ readonly timeCreated: pulumi.Output; /** * The VCN's domain name, which consists of the VCN's DNS label, and the `oraclevcn.com` domain. */ readonly vcnDomainName: pulumi.Output; /** * Create a Vcn resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: VcnArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Vcn resources. */ export interface VcnState { /** * The list of BYOIPv6 prefixes required to create a VCN that uses BYOIPv6 ranges. */ byoipv6cidrBlocks?: pulumi.Input[] | undefined>; /** * The list of BYOIPv6 OCIDs and BYOIPv6 prefixes required to create a VCN that uses BYOIPv6 address ranges. */ byoipv6cidrDetails?: pulumi.Input[] | undefined>; /** * **Deprecated.** Do *not* set this value. Use `cidrBlocks` instead. Example: `10.0.0.0/16` */ cidrBlock?: pulumi.Input; /** * (Updatable) The list of one or more IPv4 CIDR blocks for the VCN that meet the following criteria: * * The CIDR blocks must be valid. * * They must not overlap with each other or with the on-premises network CIDR block. * * The number of CIDR blocks must not exceed the limit of CIDR blocks allowed per VCN. It is an error to set both cidrBlock and cidr_blocks. Note: cidrBlocks update must be restricted to one operation at a time (either add/remove or modify one single cidr_block) or the operation will be declined. new cidrBlock to be added must be placed at the end of the list. Once you migrate to using `cidrBlocks` from `cidrBlock`, you will not be able to switch back. * **Important:** Do *not* specify a value for `cidrBlock`. Use this parameter instead. */ cidrBlocks?: pulumi.Input[] | undefined>; /** * (Updatable) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to contain the VCN. */ compartmentId?: pulumi.Input; /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the VCN's default set of DHCP options. */ defaultDhcpOptionsId?: pulumi.Input; /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the VCN's default route table. */ defaultRouteTableId?: pulumi.Input; /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the VCN's default security list. */ defaultSecurityListId?: pulumi.Input; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}` */ definedTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. */ displayName?: pulumi.Input; /** * A DNS label for the VCN, used in conjunction with the VNIC's hostname and subnet's DNS label to form a fully qualified domain name (FQDN) for each VNIC within this subnet (for example, `bminstance1.subnet123.vcn1.oraclevcn.com`). Not required to be unique, but it's a best practice to set unique DNS labels for VCNs in your tenancy. Must be an alphanumeric string that begins with a letter. The value cannot be changed. * You must set this value if you want instances to be able to use hostnames to resolve other instances in the VCN. Otherwise the Internet and VCN Resolver will not work. * * For more information, see [DNS in Your Virtual Cloud Network](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/dns.htm). * * Example: `vcn1` */ dnsLabel?: pulumi.Input; /** * (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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` */ freeformTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * For an IPv6-enabled VCN, this is the list of IPv6 prefixes for the VCN's IP address space. The prefixes are provided by Oracle and the sizes are always /56. */ ipv6cidrBlocks?: pulumi.Input[] | undefined>; /** * The list of one or more ULA or Private IPv6 CIDR blocks for the vcn that meets the following criteria: * * The CIDR blocks must be valid. * * Multiple CIDR blocks must not overlap each other or the on-premises network prefix. * * The number of CIDR blocks must not exceed the limit of IPv6 prefixes allowed to a VCN. * * **Important:** Do *not* specify a value for `ipv6cidrBlock`. Use this parameter instead. * * When updating `ipv6privateCidrBlocks`, Terraform can add, remove, or replace multiple IPv6 private CIDR blocks in a single `pulumi up`. You can also mix several list changes together in the same update instead of applying them one at a time. */ ipv6privateCidrBlocks?: pulumi.Input[] | undefined>; /** * Whether IPv6 is enabled for the VCN. Default is `false`. If enabled, Oracle will assign the VCN a IPv6 /56 CIDR block. You may skip having Oracle allocate the VCN a IPv6 /56 CIDR block by setting isOracleGuaAllocationEnabled to `false`. For important details about IPv6 addressing in a VCN, see [IPv6 Addresses](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). Example: `true` */ isIpv6enabled?: pulumi.Input; /** * Specifies whether Oracle allocates an IPv6 global unicast address (GUA) prefix to the VCN. By default, Oracle allocates one GUA prefix of /56 size for an IPv6-enabled VCN if this value is not explicitly set to false. When this value is changed from `true` to `false` on an existing VCN, the provider removes that prefix from the existing VCN. Customers must manage `isOracleGuaAllocationEnabled` exclusively through Terraform. Changing Oracle GUA allocation outside Terraform can cause Terraform state to differ from the VCN configuration in Oracle Cloud Infrastructure and can result in unexpected plans or failed updates. */ isOracleGuaAllocationEnabled?: pulumi.Input; /** * (Updatable) Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. Example: `{"Oracle-DataSecurity-ZPR.MaxEgressCount.value": "42", "Oracle-DataSecurity-ZPR.MaxEgressCount.mode": "audit"}` * * ** 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 */ securityAttributes?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * The VCN's current state. */ state?: pulumi.Input; /** * The date and time the VCN was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). Example: `2016-08-25T21:10:29.600Z` */ timeCreated?: pulumi.Input; /** * The VCN's domain name, which consists of the VCN's DNS label, and the `oraclevcn.com` domain. */ vcnDomainName?: pulumi.Input; } /** * The set of arguments for constructing a Vcn resource. */ export interface VcnArgs { /** * The list of BYOIPv6 OCIDs and BYOIPv6 prefixes required to create a VCN that uses BYOIPv6 address ranges. */ byoipv6cidrDetails?: pulumi.Input[] | undefined>; /** * **Deprecated.** Do *not* set this value. Use `cidrBlocks` instead. Example: `10.0.0.0/16` */ cidrBlock?: pulumi.Input; /** * (Updatable) The list of one or more IPv4 CIDR blocks for the VCN that meet the following criteria: * * The CIDR blocks must be valid. * * They must not overlap with each other or with the on-premises network CIDR block. * * The number of CIDR blocks must not exceed the limit of CIDR blocks allowed per VCN. It is an error to set both cidrBlock and cidr_blocks. Note: cidrBlocks update must be restricted to one operation at a time (either add/remove or modify one single cidr_block) or the operation will be declined. new cidrBlock to be added must be placed at the end of the list. Once you migrate to using `cidrBlocks` from `cidrBlock`, you will not be able to switch back. * **Important:** Do *not* specify a value for `cidrBlock`. Use this parameter instead. */ cidrBlocks?: pulumi.Input[] | undefined>; /** * (Updatable) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to contain the VCN. */ compartmentId: pulumi.Input; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}` */ definedTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. */ displayName?: pulumi.Input; /** * A DNS label for the VCN, used in conjunction with the VNIC's hostname and subnet's DNS label to form a fully qualified domain name (FQDN) for each VNIC within this subnet (for example, `bminstance1.subnet123.vcn1.oraclevcn.com`). Not required to be unique, but it's a best practice to set unique DNS labels for VCNs in your tenancy. Must be an alphanumeric string that begins with a letter. The value cannot be changed. * You must set this value if you want instances to be able to use hostnames to resolve other instances in the VCN. Otherwise the Internet and VCN Resolver will not work. * * For more information, see [DNS in Your Virtual Cloud Network](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/dns.htm). * * Example: `vcn1` */ dnsLabel?: pulumi.Input; /** * (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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` */ freeformTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * The list of one or more ULA or Private IPv6 CIDR blocks for the vcn that meets the following criteria: * * The CIDR blocks must be valid. * * Multiple CIDR blocks must not overlap each other or the on-premises network prefix. * * The number of CIDR blocks must not exceed the limit of IPv6 prefixes allowed to a VCN. * * **Important:** Do *not* specify a value for `ipv6cidrBlock`. Use this parameter instead. * * When updating `ipv6privateCidrBlocks`, Terraform can add, remove, or replace multiple IPv6 private CIDR blocks in a single `pulumi up`. You can also mix several list changes together in the same update instead of applying them one at a time. */ ipv6privateCidrBlocks?: pulumi.Input[] | undefined>; /** * Whether IPv6 is enabled for the VCN. Default is `false`. If enabled, Oracle will assign the VCN a IPv6 /56 CIDR block. You may skip having Oracle allocate the VCN a IPv6 /56 CIDR block by setting isOracleGuaAllocationEnabled to `false`. For important details about IPv6 addressing in a VCN, see [IPv6 Addresses](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/ipv6.htm). Example: `true` */ isIpv6enabled?: pulumi.Input; /** * Specifies whether Oracle allocates an IPv6 global unicast address (GUA) prefix to the VCN. By default, Oracle allocates one GUA prefix of /56 size for an IPv6-enabled VCN if this value is not explicitly set to false. When this value is changed from `true` to `false` on an existing VCN, the provider removes that prefix from the existing VCN. Customers must manage `isOracleGuaAllocationEnabled` exclusively through Terraform. Changing Oracle GUA allocation outside Terraform can cause Terraform state to differ from the VCN configuration in Oracle Cloud Infrastructure and can result in unexpected plans or failed updates. */ isOracleGuaAllocationEnabled?: pulumi.Input; /** * (Updatable) Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. Example: `{"Oracle-DataSecurity-ZPR.MaxEgressCount.value": "42", "Oracle-DataSecurity-ZPR.MaxEgressCount.mode": "audit"}` * * ** 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 */ securityAttributes?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; } //# sourceMappingURL=vcn.d.ts.map