Skip to content

Commit be5441d

Browse files
committed
Use locals in terraform
1 parent 4ca3fc3 commit be5441d

File tree

1 file changed

+22
-0
lines changed
  • security/security-design/fn-datasafe-dbaudit-to-oci-logging/terraform/modules/network

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
###############################################################################
2+
# Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
3+
# This software is dual-licensed to you under the Universal Permissive License
4+
# (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl.
5+
###############################################################################
6+
#
7+
# Author: Fabrizio Zarri
8+
#
9+
################################################################################
10+
11+
locals {
12+
resource_nc = "-${var.deployment_name}-${var.region}-${var.purpose}-${random_id.tag.hex}"
13+
resource_nc_dnslabel = "-${var.deployment_name}-${random_id.tag.hex}"
14+
vcn_dns_label = "${var.vcndnslabelprefix}${local.resource_nc_dnslabel}"
15+
vcn_displayname = "${var.vcnnameprefix}${local.resource_nc}"
16+
service_gw_displayname = "${var.vcnnameservicegatewayprefix}${local.resource_nc}"
17+
vcnnameroutingtable_displayname = "${var.vcnnameroutingtableprefix}${local.resource_nc}"
18+
dhcpoptions_displayname = "${var.vcnnamedhcpopitonsprefix}${local.resource_nc}"
19+
subnet_displayname = "${var.subnetnameprefix}${local.resource_nc}"
20+
subnet_dns_label = "${var.subnetdnslabelprefix}${local.resource_nc_dnslabel}"
21+
vcn_securitylist_displayname = "${var.vcnnamesecuritylistprefix}${local.resource_nc}"
22+
}

0 commit comments

Comments
 (0)