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 10
/
locals.tf
47 lines (33 loc) · 1.85 KB
/
locals.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
## Copyright © 2021, 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
locals {
# Network Locals #
// contains bastion, LB, and anything internet-facing
dmz_tier_prefix = cidrsubnet(var.vcn_cidr, 2, 0)
// contains private subnets with app logic
app_tier_prefix = cidrsubnet(var.vcn_cidr, 2, 1)
lb_subnet_prefix = cidrsubnet(local.dmz_tier_prefix, 2, 0)
bastion_subnet_prefix = cidrsubnet(local.dmz_tier_prefix, 2, 1)
controller_subnet_prefix = cidrsubnet(local.app_tier_prefix, 2, 0)
agent_subnet_prefix = cidrsubnet(local.app_tier_prefix, 2, 1)
# Compute Locals #
# ------------------------------------------------------------------------------
# Bastion Host Locals
# ------------------------------------------------------------------------------
bastion_shape = var.bastion_shape
bastion_flex_shape_ocpus = var.bastion_flex_shape_ocpus
bastion_flex_shape_memory = var.bastion_flex_shape_memory
bastion_is_flex_shape = length(regexall("Flex", local.bastion_shape)) > 0 ? [1] : []
# ------------------------------------------------------------------------------
# Controller Host Locals
# ------------------------------------------------------------------------------
controller_shape = var.controller_shape
controller_flex_shape_ocpus = var.controller_flex_shape_ocpus
controller_flex_shape_memory = var.controller_flex_shape_memory
# ------------------------------------------------------------------------------
# Agent Host Locals
# ------------------------------------------------------------------------------
agent_shape = var.agent_shape
agent_flex_shape_ocpus = var.agent_flex_shape_ocpus
agent_flex_shape_memory = var.agent_flex_shape_memory
}