forked from oracle-quickstart/oci-arch-web-ha
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsubnets.tf
60 lines (52 loc) · 2.29 KB
/
subnets.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
## Copyright © 2020, Oracle and/or its affiliates.
## All rights reserved. The Universal Permissive License (UPL), Version 1.0 as shown at http://oss.oracle.com/licenses/upl
# Create regional subnets in vcn
resource "oci_core_subnet" "subnet_1" {
cidr_block = "10.0.0.0/24"
display_name = "subnet-A"
compartment_id = var.compartment_ocid
vcn_id = oci_core_virtual_network.vcn.id
dhcp_options_id = oci_core_virtual_network.vcn.default_dhcp_options_id
route_table_id = oci_core_route_table.rt-pub.id
dns_label = "subnet1"
defined_tags = {"${oci_identity_tag_namespace.ArchitectureCenterTagNamespace.name}.${oci_identity_tag.ArchitectureCenterTag.name}" = var.release }
lifecycle {
ignore_changes = [ defined_tags["Oracle-Tags.CreatedBy"], defined_tags["Oracle-Tags.CreatedOn"] ]
}
provisioner "local-exec" {
command = "sleep 5"
}
}
resource "oci_core_subnet" "subnet_2" {
cidr_block = "10.0.1.0/24"
display_name = "subnet-B"
compartment_id = var.compartment_ocid
vcn_id = oci_core_virtual_network.vcn.id
dhcp_options_id = oci_core_virtual_network.vcn.default_dhcp_options_id
route_table_id = oci_core_route_table.rt-pub.id
dns_label = "subnet2"
defined_tags = {"${oci_identity_tag_namespace.ArchitectureCenterTagNamespace.name}.${oci_identity_tag.ArchitectureCenterTag.name}" = var.release }
lifecycle {
ignore_changes = [ defined_tags["Oracle-Tags.CreatedBy"], defined_tags["Oracle-Tags.CreatedOn"] ]
}
provisioner "local-exec" {
command = "sleep 5"
}
}
resource "oci_core_subnet" "subnet_3" {
cidr_block = "10.0.2.0/24"
display_name = "subnet-C"
compartment_id = var.compartment_ocid
vcn_id = oci_core_virtual_network.vcn.id
dhcp_options_id = oci_core_virtual_network.vcn.default_dhcp_options_id
route_table_id = oci_core_route_table.rt-priv.id
dns_label = "subnet3"
prohibit_public_ip_on_vnic = true
defined_tags = {"${oci_identity_tag_namespace.ArchitectureCenterTagNamespace.name}.${oci_identity_tag.ArchitectureCenterTag.name}" = var.release }
lifecycle {
ignore_changes = [ defined_tags["Oracle-Tags.CreatedBy"], defined_tags["Oracle-Tags.CreatedOn"] ]
}
provisioner "local-exec" {
command = "sleep 5"
}
}