Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.

Commit dd59857

Browse files
committed
Fixed networking for Bastion Service
1 parent ae54ea2 commit dd59857

File tree

6 files changed

+10
-9
lines changed

6 files changed

+10
-9
lines changed

modules/wordpress/main.tf

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -423,10 +423,11 @@ resource "oci_core_instance" "bastion_instance" {
423423

424424

425425
resource "oci_bastion_bastion" "bastion-service" {
426-
count = var.numberOfNodes > 1 && var.use_bastion_service ? 1 : 0
427-
bastion_type = "STANDARD"
428-
compartment_id = var.compartment_ocid
429-
target_subnet_id = var.bastion_subnet_id
426+
count = var.numberOfNodes > 1 && var.use_bastion_service ? 1 : 0
427+
bastion_type = "STANDARD"
428+
compartment_id = var.compartment_ocid
429+
target_subnet_id = var.wp_subnet_id
430+
#target_subnet_id = var.bastion_subnet_id
430431
client_cidr_block_allow_list = ["0.0.0.0/0"]
431432
name = "BastionService4WP"
432433
max_session_ttl_in_seconds = 10800

network.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ resource "oci_core_subnet" "lb_subnet_public" {
196196
}
197197

198198
resource "oci_core_subnet" "bastion_subnet_public" {
199-
count = var.numberOfNodes > 1 ? 1 : 0
199+
count = (var.numberOfNodes > 1 && var.use_bastion_service == false) ? 1 : 0
200200
cidr_block = cidrsubnet(var.vcn_cidr, 8, 1)
201201
display_name = "bastion_public_subnet"
202202
compartment_id = var.compartment_ocid

schema.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
title: "Deploy WordPress CMD on OCI with MDS"
1+
title: "Deploy WordPress CMS on OCI with MDS"
22
stackDescription: "Deploy WordPress CMS on OCI with MySQL Database Service"
33
schemaVersion: 1.2.0
44
version: "20201104"

tags.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ resource "oci_identity_tag" "ArchitectureCenterTag" {
2424

2525
validator {
2626
validator_type = "ENUM"
27-
values = ["release", "1.3"]
27+
values = ["release", "1.4"]
2828
}
2929

3030
provisioner "local-exec" {

variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ variable "flex_lb_max_shape" {
2929

3030
variable "release" {
3131
description = "Reference Architecture Release (OCI Architecture Center)"
32-
default = "1.3"
32+
default = "1.4"
3333
}
3434

3535
variable "vcn" {

wordpress.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module "wordpress" {
1717
display_name = "wordpress"
1818
wp_subnet_id = oci_core_subnet.wp_subnet.id
1919
lb_subnet_id = var.numberOfNodes > 1 ? oci_core_subnet.lb_subnet_public[0].id : ""
20-
bastion_subnet_id = var.numberOfNodes > 1 ? oci_core_subnet.bastion_subnet_public[0].id : ""
20+
bastion_subnet_id = (var.numberOfNodes > 1 && var.use_bastion_service == false) ? oci_core_subnet.bastion_subnet_public[0].id : ""
2121
fss_subnet_id = var.numberOfNodes > 1 && var.use_shared_storage ? oci_core_subnet.fss_subnet_private[0].id : ""
2222
ssh_authorized_keys = var.ssh_public_key
2323
mds_ip = module.mds-instance.private_ip

0 commit comments

Comments
 (0)