Skip to content

Commit 7e03b68

Browse files
authored
Merge pull request #15 from junior/5G-example
Version 0.8.3
2 parents dc9de62 + aec785d commit 7e03b68

20 files changed

+407
-732
lines changed

.terraform.lock.hcl

Lines changed: 71 additions & 71 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.8.2
1+
0.8.3
File renamed without changes.

datasources.tf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,13 @@ data "oci_identity_regions" "home_region" {
1616
}
1717

1818
provider = oci.current_region
19+
}
20+
21+
# Available OCI Services
22+
data "oci_core_services" "all_services_network" {
23+
filter {
24+
name = "name"
25+
values = ["All .* Services In Oracle Services Network"]
26+
regex = true
27+
}
1928
}

module-oke-defaults.tf renamed to defaults.tf

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
33
#
44

5-
# File Version: 0.7.1
5+
# File Version: 0.1.0
66

77
# Dependencies:
8-
# - module-oci-networking.tf file
9-
# - module-defaults.tf file
8+
# - terraform-oci-networking module
109

1110
################################################################################
1211
# If you have extra configurations to add, you can add them here.
@@ -16,6 +15,26 @@
1615
# - Extra route tables and security lists
1716
################################################################################
1817

18+
################################################################################
19+
# Deployment Defaults
20+
################################################################################
21+
locals {
22+
deploy_id = random_string.deploy_id.result
23+
deploy_tags = { "DeploymentID" = local.deploy_id, "AppName" = local.app_name, "Quickstart" = "oke_base" }
24+
oci_tag_values = {
25+
"freeformTags" = merge(var.tag_values.freeformTags, local.deploy_tags),
26+
"definedTags" = var.tag_values.definedTags
27+
}
28+
app_name = var.app_name
29+
app_name_normalized = substr(replace(lower(local.app_name), " ", "-"), 0, 6)
30+
app_name_for_dns = substr(lower(replace(local.app_name, "/\\W|_|\\s/", "")), 0, 6)
31+
}
32+
33+
resource "random_string" "deploy_id" {
34+
length = 4
35+
special = false
36+
}
37+
1938
################################################################################
2039
# Required locals for the oci-networking and oke modules
2140
################################################################################
@@ -28,6 +47,21 @@ locals {
2847
route_tables = concat(local.route_tables_oke)
2948
security_lists = concat(local.security_lists_oke)
3049
resolved_vcn_compartment_ocid = (var.create_new_compartment_for_oke ? local.oke_compartment_ocid : var.compartment_ocid)
50+
pre_vcn_cidr_blocks = split(",", var.vcn_cidr_blocks)
51+
vcn_cidr_blocks = contains(module.vcn.cidr_blocks, local.pre_vcn_cidr_blocks[0]) ? distinct(concat([local.pre_vcn_cidr_blocks[0]], module.vcn.cidr_blocks)) : module.vcn.cidr_blocks
52+
network_cidrs = {
53+
VCN-MAIN-CIDR = local.vcn_cidr_blocks[0] # e.g.: "10.20.0.0/16" = 65536 usable IPs
54+
ENDPOINT-REGIONAL-SUBNET-CIDR = cidrsubnet(local.vcn_cidr_blocks[0], 12, 0) # e.g.: "10.20.0.0/28" = 15 usable IPs
55+
NODES-REGIONAL-SUBNET-CIDR = cidrsubnet(local.vcn_cidr_blocks[0], 6, 3) # e.g.: "10.20.12.0/22" = 1021 usable IPs (10.20.12.0 - 10.20.15.255)
56+
LB-REGIONAL-SUBNET-CIDR = cidrsubnet(local.vcn_cidr_blocks[0], 6, 4) # e.g.: "10.20.16.0/22" = 1021 usable IPs (10.20.16.0 - 10.20.19.255)
57+
FSS-MOUNT-TARGETS-REGIONAL-SUBNET-CIDR = cidrsubnet(local.vcn_cidr_blocks[0], 10, 81) # e.g.: "10.20.20.64/26" = 62 usable IPs (10.20.20.64 - 10.20.20.255)
58+
APIGW-FN-REGIONAL-SUBNET-CIDR = cidrsubnet(local.vcn_cidr_blocks[0], 8, 30) # e.g.: "10.20.30.0/24" = 254 usable IPs (10.20.30.0 - 10.20.30.255)
59+
VCN-NATIVE-POD-NETWORKING-REGIONAL-SUBNET-CIDR = cidrsubnet(local.vcn_cidr_blocks[0], 1, 1) # e.g.: "10.20.128.0/17" = 32766 usable IPs (10.20.128.0 - 10.20.255.255)
60+
BASTION-REGIONAL-SUBNET-CIDR = cidrsubnet(local.vcn_cidr_blocks[0], 12, 32) # e.g.: "10.20.2.0/28" = 15 usable IPs (10.20.2.0 - 10.20.2.15)
61+
PODS-CIDR = "10.244.0.0/16"
62+
KUBERNETES-SERVICE-CIDR = "10.96.0.0/16"
63+
ALL-CIDR = "0.0.0.0/0"
64+
}
3165
}
3266

3367
################################################################################

examples/apigw-fn-subnet/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# API Gateway and Fn subnet Example
2+
3+
> __Warning__: Moved to [oracle-quickstart/terraform-oci-networking](https://github.com/oracle-quickstart/terraform-oci-networking) examples, under [examples/apigw-fn-extra-subnet-existing-vcn](https://github.com/oracle-quickstart/terraform-oci-networking/tree/main/examples/apigw-fn-extra-subnet-existing-vcn) folder.

examples/apigw-fn-subnet/apigw-fn-subnet-locals.tf

Lines changed: 0 additions & 107 deletions
This file was deleted.

0 commit comments

Comments
 (0)