From f10a8c40a596348cee254fb27d25bfa1402d9c01 Mon Sep 17 00:00:00 2001 From: bdeshi Date: Fri, 24 May 2024 16:49:54 +0600 Subject: [PATCH] add subnet --- oci.networking.tf | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/oci.networking.tf b/oci.networking.tf index 4afc32c..823ec33 100644 --- a/oci.networking.tf +++ b/oci.networking.tf @@ -48,3 +48,17 @@ resource "oci_core_security_list" "open_ports" { protocol = "all" } } + +resource "oci_core_subnet" "public_subnet" { + compartment_id = oci_identity_compartment.compartment.id + vcn_id = oci_core_vcn.vcn.id + cidr_block = var.vcn_cidr + display_name = "public" + dns_label = "public" + route_table_id = oci_core_default_route_table.vcn.id + security_list_ids = [ + oci_core_vcn.vcn.default_security_list_id, + oci_core_security_list.open_ports.id + ] + freeform_tags = merge(local.freeform_tags, { type = "public" }) +}