File tree Expand file tree Collapse file tree 11 files changed +109
-105
lines changed
Expand file tree Collapse file tree 11 files changed +109
-105
lines changed Original file line number Diff line number Diff line change @@ -111,4 +111,9 @@ tags = {
111111|
112112|
113113
114+ |`lockdown_default_seclist`
115+ |whether to remove all default security rules from the VCN Default Security List
116+ |true/false
117+ |true
118+
114119|===
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ module "vcn" {
7878 vcn_cidr = var.vcn_cidr
7979 vcn_dns_label = var.vcn_dns_label
8080 vcn_name = var.vcn_name
81- default_SL_lockdown = var.default_SL_lockdown
81+ lockdown_default_seclist = var.lockdown_default_seclist
8282}
8383```
8484
Original file line number Diff line number Diff line change 1- # Copyright (c) 2019, 2020 Oracle Corporation and/or affiliates. All rights reserved .
1+ # Copyright (c) 2019, 2021, Oracle Corporation and/or affiliates.
22# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
33
44module "vcn" {
@@ -25,7 +25,7 @@ module "vcn" {
2525
2626 vcn_name = " vcn"
2727
28- default_SL_lockdown = " true"
28+ lockdown_default_seclist = true
2929
3030 tags = {
3131 environment = " dev"
Original file line number Diff line number Diff line change 1- # Copyright (c) 2019, 2020 Oracle Corporation and/or affiliates. All rights reserved .
1+ # Copyright (c) 2019, 2021, Oracle Corporation and/or affiliates.
22# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl
33
44# provider identity parameters
@@ -83,7 +83,7 @@ variable "vcn_name" {
8383 type = string
8484}
8585
86- variable "default_SL_lockdown " {
86+ variable "lockdown_default_seclist " {
8787 description = " whether to remove all default security rules from the VCN Default Security List"
8888 default = true
8989 type = bool
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ groupings:
99 - vcn_cidr
1010 - vcn_name
1111 - vcn_dns_label
12- - default_SL_lockdown
12+ - lockdown_default_seclist
1313
1414variables :
1515 region :
@@ -49,7 +49,7 @@ variables:
4949 required : true
5050 default : vcn
5151
52- default_SL_lockdown :
52+ lockdown_default_seclist :
5353 title : Enable VCN Default Security List Lockdown
5454 type : string
5555 required : false
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ variable "vcn_name" {
6666 type = string
6767}
6868
69- variable "default_SL_lockdown " {
69+ variable "lockdown_default_seclist " {
7070 description = " whether to remove all default security rules from the VCN Default Security List"
7171 default = true
7272 type = bool
Original file line number Diff line number Diff line change 1- # Copyright (c) 2019, 2020 Oracle Corporation and/or affiliates. All rights reserved .
1+ # Copyright (c) 2019, 2021, Oracle Corporation and/or affiliates.
22# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
33
44resource "oci_core_vcn" "vcn" {
@@ -9,30 +9,3 @@ resource "oci_core_vcn" "vcn" {
99
1010 freeform_tags = var. tags
1111}
12-
13- resource "oci_core_internet_gateway" "ig" {
14- compartment_id = var. compartment_id
15- display_name = var. label_prefix == " none" ? " internet-gateway" : " ${ var . label_prefix } -internet-gateway"
16-
17- freeform_tags = var. tags
18-
19- vcn_id = oci_core_vcn. vcn . id
20-
21- count = var. internet_gateway_enabled == true ? 1 : 0
22- }
23-
24- resource "oci_core_route_table" "ig" {
25- compartment_id = var. compartment_id
26- display_name = var. label_prefix == " none" ? " internet-route" : " ${ var . label_prefix } -internet-route"
27-
28- freeform_tags = var. tags
29-
30- route_rules {
31- destination = local. anywhere
32- network_entity_id = oci_core_internet_gateway. ig [0 ]. id
33- }
34-
35- vcn_id = oci_core_vcn. vcn . id
36-
37- count = var. internet_gateway_enabled == true ? 1 : 0
38- }
Original file line number Diff line number Diff line change 1- # Copyright (c) 2021 Oracle Corporation and/or affiliates.
1+ # Copyright (c) 2021, Oracle Corporation and/or affiliates.
22# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
33
44# VCN default Security List Lockdown
5- // See Issue #22 for
5+ // See Issue #22 for the reasoning
66resource "oci_core_default_security_list" "lockdown" {
77 // If variable is true, removes all rules from default security list
8- count = var. default_SL_lockdown == true ? 1 : 0
8+ count = var. lockdown_default_seclist == true ? 1 : 0
99 manage_default_resource_id = oci_core_vcn. vcn . default_security_list_id
1010}
1111
1212resource "oci_core_default_security_list" "restore_default" {
1313 // If variable is false, restore all default rules to default security list
14- count = var. default_SL_lockdown == false ? 1 : 0
14+ count = var. lockdown_default_seclist == false ? 1 : 0
1515 manage_default_resource_id = oci_core_vcn. vcn . default_security_list_id
1616
1717 egress_security_rules {
You can’t perform that action at this time.
0 commit comments