This repository has been archived by the owner on May 13, 2024. It is now read-only.
generated from oracle-quickstart/oci-quickstart-template
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathspoke02.tf
36 lines (33 loc) · 1.79 KB
/
spoke02.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
## 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
resource "oci_core_vcn" "spoke02" {
cidr_block = var.spoke02_vcn_cidr_block
dns_label = var.spoke02_vcn_dns_label
compartment_id = var.compartment_ocid
display_name = var.spoke02_vcn_display_name
defined_tags = {"${oci_identity_tag_namespace.ArchitectureCenterTagNamespace.name}.${oci_identity_tag.ArchitectureCenterTag.name}" = var.release }
}
#LPG Spoke-HUB
resource "oci_core_local_peering_gateway" "spoke02_hub_local_peering_gateway" {
compartment_id = var.compartment_ocid
vcn_id = oci_core_vcn.spoke02.id
display_name = "spoke02_hub_lpg"
defined_tags = {"${oci_identity_tag_namespace.ArchitectureCenterTagNamespace.name}.${oci_identity_tag.ArchitectureCenterTag.name}" = var.release }
}
#Default route table spoke02
resource "oci_core_default_route_table" "spoke02_default_route_table" {
manage_default_resource_id = oci_core_vcn.spoke02.default_route_table_id
route_rules {
network_entity_id = oci_core_local_peering_gateway.spoke02_hub_local_peering_gateway.id
destination = "0.0.0.0/0"
destination_type = "CIDR_BLOCK"
}
defined_tags = {"${oci_identity_tag_namespace.ArchitectureCenterTagNamespace.name}.${oci_identity_tag.ArchitectureCenterTag.name}" = var.release }
}
resource "oci_core_subnet" "spoke02_subnet_priv01" {
cidr_block = var.spoke02_subnet_priv01_cidr_block
compartment_id = var.compartment_ocid
vcn_id = oci_core_vcn.spoke02.id
display_name = var.spoke02_subnet_priv01_display_name
defined_tags = {"${oci_identity_tag_namespace.ArchitectureCenterTagNamespace.name}.${oci_identity_tag.ArchitectureCenterTag.name}" = var.release }
}