1
1
# ###############################################################################
2
- # Copyright (c) 2023 Oracle and/or its affiliates.
3
- #
4
- # The Universal Permissive License (UPL), Version 1.0
5
- #
6
- # Subject to the condition set forth below, permission is hereby granted to any
7
- # person obtaining a copy of this software, associated documentation and/or data
8
- # (collectively the "Software"), free of charge and under any and all copyright
9
- # rights in the Software, and any and all patent rights owned or freely
10
- # licensable by each licensor hereunder covering either (i) the unmodified
11
- # Software as contributed to or provided by such licensor, or (ii) the Larger
12
- # Works (as defined below), to deal in both
13
- #
14
- # (a) the Software, and
15
- # (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
16
- # one is included with the Software (each a "Larger Work" to which the Software
17
- # is contributed by such licensors),
18
-
19
- # without restriction, including without limitation the rights to copy, create
20
- # derivative works of, display, perform, and distribute the Software and make,
21
- # use, sell, offer for sale, import, export, have made, and have sold the
22
- # Software and the Larger Work(s), and to sublicense the foregoing rights on
23
- # either these or other terms.
24
-
25
- # This license is subject to the following condition:
26
- # The above copyright notice and either this complete permission notice or at
27
- # a minimum a reference to the UPL must be included in all copies or
28
- # substantial portions of the Software.
29
-
30
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
31
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
32
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
33
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
34
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
35
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
36
- # SOFTWARE.
2
+ # Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
3
+ # This software is dual-licensed to you under the Universal Permissive
4
+ # License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl
37
5
# ###############################################################################
38
6
7
+
39
8
resource "oci_core_virtual_network" "vcn" {
40
9
cidr_block = var. VCN-CIDR
41
- dns_label = " ${ var . fnvcndnslabelprefix } ${ random_id . tag . hex } "
10
+ dns_label = " ${ var . vcndnslabelprefix } ${ random_id . tag . hex } "
42
11
compartment_id = var. compartment_ocid
43
- display_name = " ${ var . fnvcnnameprefix } -${ random_id . tag . hex } "
12
+ display_name = " ${ var . vcnnameprefix } -${ random_id . tag . hex } "
44
13
}
45
14
46
15
data "oci_core_services" "service_gateway_all_oci_services" {
@@ -58,19 +27,19 @@ resource "oci_core_service_gateway" "service_gw" {
58
27
services {
59
28
service_id = lookup (data. oci_core_services . service_gateway_all_oci_services . services [0 ], " id" )
60
29
}
61
- display_name = " ${ var . fnvcnnameservicegatewayprefix } -${ random_id . tag . hex } "
30
+ display_name = " ${ var . vcnnameservicegatewayprefix } -${ random_id . tag . hex } "
62
31
}
63
32
64
33
resource "oci_core_route_table" "rt_fn_subnet" {
65
34
compartment_id = var. compartment_ocid
66
35
vcn_id = oci_core_virtual_network. vcn . id
67
- display_name = " ${ var . fnvcnnameroutingtableprefix } -${ random_id . tag . hex } "
36
+ display_name = " ${ var . vcnnameroutingtableprefix } -${ random_id . tag . hex } "
68
37
69
38
route_rules {
70
39
destination = lookup (data. oci_core_services . service_gateway_all_oci_services . services [0 ], " cidr_block" )
71
40
destination_type = " SERVICE_CIDR_BLOCK"
72
41
network_entity_id = oci_core_service_gateway. service_gw . id
73
- description = " ${ var . fnvcnroutingtabledescriptionervicegw } -${ random_id . tag . hex } "
42
+ description = " ${ var . vcnroutingtabledescriptionservicegw } -${ random_id . tag . hex } "
74
43
}
75
44
76
45
}
@@ -80,17 +49,17 @@ resource "oci_core_route_table" "rt_fn_subnet" {
80
49
resource "oci_core_dhcp_options" "dhcpoptions1" {
81
50
compartment_id = var. compartment_ocid
82
51
vcn_id = oci_core_virtual_network. vcn . id
83
- display_name = " ${ var . fnvcnnamedhcpopitonsprefix } -${ random_id . tag . hex } "
52
+ display_name = " ${ var . vcnnamedhcpopitonsprefix } -${ random_id . tag . hex } "
84
53
options {
85
54
type = " DomainNameServer"
86
55
server_type = " VcnLocalPlusInternet"
87
56
}
88
57
}
89
58
90
59
resource "oci_core_subnet" "function_ds_log_vcn" {
91
- cidr_block = var. fnsubnet -CIDR
92
- display_name = " ${ var . fnsubnetnameprefix } -${ random_id . tag . hex } "
93
- dns_label = " ${ var . fnsubnetdnslabelprefix } ${ random_id . tag . hex } "
60
+ cidr_block = var. subnet -CIDR
61
+ display_name = " ${ var . subnetnameprefix } -${ random_id . tag . hex } "
62
+ dns_label = " ${ var . subnetdnslabelprefix } ${ random_id . tag . hex } "
94
63
compartment_id = var. compartment_ocid
95
64
vcn_id = oci_core_virtual_network. vcn . id
96
65
route_table_id = oci_core_route_table. rt_fn_subnet . id
@@ -103,7 +72,7 @@ resource "oci_core_subnet" "function_ds_log_vcn" {
103
72
resource "oci_core_security_list" "vcn_security_list" {
104
73
compartment_id = var. compartment_ocid
105
74
vcn_id = oci_core_virtual_network. vcn . id
106
- display_name = " ${ var . fnvcnnamesecuritylistprefix } -${ random_id . tag . hex } "
75
+ display_name = " ${ var . vcnnamesecuritylistprefix } -${ random_id . tag . hex } "
107
76
108
77
egress_security_rules {
109
78
stateless = false
0 commit comments