Skip to content

Commit 7f0fa38

Browse files
hyderDjelibeybi
authored andcommitted
cosmetic renaming, reordering of bastion and admin variables to a more standard naming and ordering convention
Signed-off-by: Ali Mukadam <[email protected]>
1 parent e684bf1 commit 7f0fa38

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

locals.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ locals {
1818
region = var.oci_base_general.region
1919
}
2020

21-
oci_bastion_infra = {
21+
oci_bastion_network = {
2222
ad_names = data.template_file.ad_names.*.rendered
2323
availability_domains = var.oci_base_bastion.availability_domains
2424
ig_route_id = module.vcn.ig_route_id

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module "bastion" {
1010
source = "./modules/bastion"
1111
oci_base_identity = var.oci_base_identity
1212
oci_bastion_general = local.oci_bastion_general
13-
oci_bastion_infra = local.oci_bastion_infra
13+
oci_bastion_network = local.oci_bastion_network
1414
oci_bastion = local.oci_bastion
1515
oci_bastion_notification = local.oci_bastion_notification
1616
}

modules/bastion/compute.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
33

44
resource "oci_core_instance" "bastion" {
5-
availability_domain = element(var.oci_bastion_infra.ad_names, (var.oci_bastion_infra.availability_domains - 1))
5+
availability_domain = element(var.oci_bastion_network.ad_names, (var.oci_bastion_network.availability_domains - 1))
66
compartment_id = var.oci_base_identity.compartment_id
77

88
create_vnic_details {

modules/bastion/datasources.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ data "template_cloudinit_config" "bastion" {
8282

8383
# Gets a list of VNIC attachments on the bastion instance
8484
data "oci_core_vnic_attachments" "bastion_vnics_attachments" {
85-
availability_domain = element(var.oci_bastion_infra.ad_names, (var.oci_bastion_infra.availability_domains - 1))
85+
availability_domain = element(var.oci_bastion_network.ad_names, (var.oci_bastion_network.availability_domains - 1))
8686
compartment_id = var.oci_base_identity.compartment_id
8787
instance_id = oci_core_instance.bastion[0].id
8888
depends_on = [oci_core_instance.bastion]

modules/bastion/security.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
resource "oci_core_security_list" "bastion" {
55
compartment_id = var.oci_base_identity.compartment_id
66
display_name = "${var.oci_bastion_general.label_prefix}-bastion"
7-
vcn_id = var.oci_bastion_infra.vcn_id
7+
vcn_id = var.oci_bastion_network.vcn_id
88

99
egress_security_rules {
1010
protocol = local.all_protocols

modules/bastion/subnets.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33

44
resource "oci_core_subnet" "bastion" {
55
compartment_id = var.oci_base_identity.compartment_id
6-
cidr_block = cidrsubnet(var.oci_bastion_infra.vcn_cidr, var.oci_bastion_infra.newbits, var.oci_bastion_infra.netnum)
6+
cidr_block = cidrsubnet(var.oci_bastion_network.vcn_cidr, var.oci_bastion_network.newbits, var.oci_bastion_network.netnum)
77
display_name = "${var.oci_bastion_general.label_prefix}-bastion"
88
dns_label = "bastion"
99
prohibit_public_ip_on_vnic = false
10-
route_table_id = var.oci_bastion_infra.ig_route_id
10+
route_table_id = var.oci_bastion_network.ig_route_id
1111
security_list_ids = [oci_core_security_list.bastion[0].id]
12-
vcn_id = var.oci_bastion_infra.vcn_id
12+
vcn_id = var.oci_bastion_network.vcn_id
1313

1414
count = var.oci_bastion.bastion_enabled == true ? 1 : 0
1515
}

modules/bastion/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ variable "oci_bastion_general" {
2525

2626
# bastion
2727

28-
variable "oci_bastion_infra" {
28+
variable "oci_bastion_network" {
2929
type = object({
3030
ad_names = list(string)
3131
availability_domains = number

0 commit comments

Comments
 (0)