diff --git a/bastion.tf b/bastion.tf index a5c9734..96f5138 100644 --- a/bastion.tf +++ b/bastion.tf @@ -2,10 +2,11 @@ ## All rights reserved. The Universal Permissive License (UPL), Version 1.0 as shown at http://oss.oracle.com/licenses/upl resource "oci_bastion_bastion" "bastion-service" { - count = var.use_private_subnet ? 1 : 0 - bastion_type = "STANDARD" - compartment_id = var.compartment_ocid - target_subnet_id = oci_core_subnet.BastionSubnet[0].id + count = var.use_private_subnet ? 1 : 0 + bastion_type = "STANDARD" + compartment_id = var.compartment_ocid + # target_subnet_id = oci_core_subnet.BastionSubnet[0].id + target_subnet_id = oci_core_subnet.CassandraSubnet.id client_cidr_block_allow_list = ["0.0.0.0/0"] name = "BastionService" max_session_ttl_in_seconds = 1800 diff --git a/network.tf b/network.tf index 68a0162..2224be6 100644 --- a/network.tf +++ b/network.tf @@ -12,6 +12,7 @@ resource "oci_core_virtual_network" "CassandraVCN" { defined_tags = { "${oci_identity_tag_namespace.ArchitectureCenterTagNamespace.name}.${oci_identity_tag.ArchitectureCenterTag.name}" = var.release } } + ############################################ # Create Internet Gateway ############################################ @@ -22,6 +23,7 @@ resource "oci_core_internet_gateway" "CassandraIG" { defined_tags = { "${oci_identity_tag_namespace.ArchitectureCenterTagNamespace.name}.${oci_identity_tag.ArchitectureCenterTag.name}" = var.release } } + ############################################ # Create NAT Gateway ############################################ @@ -32,6 +34,7 @@ resource "oci_core_nat_gateway" "CassandraNATGW" { defined_tags = { "${oci_identity_tag_namespace.ArchitectureCenterTagNamespace.name}.${oci_identity_tag.ArchitectureCenterTag.name}" = var.release } } + ############################################ # Create Route Table for Public Network ############################################ @@ -48,6 +51,7 @@ resource "oci_core_route_table" "CassandraPublicRT" { defined_tags = { "${oci_identity_tag_namespace.ArchitectureCenterTagNamespace.name}.${oci_identity_tag.ArchitectureCenterTag.name}" = var.release } } + ############################################ # Create Route Table for Private Network ############################################ @@ -106,21 +110,6 @@ resource "oci_core_security_list" "CassandraSL" { defined_tags = { "${oci_identity_tag_namespace.ArchitectureCenterTagNamespace.name}.${oci_identity_tag.ArchitectureCenterTag.name}" = var.release } } -############################################ -# Create Subnets -############################################ -resource "oci_core_subnet" "BastionSubnet" { - count = var.use_private_subnet ? 1 : 0 - cidr_block = var.bastion_subnet_cidr - display_name = "${var.label_prefix}BastionSubnet" - dns_label = "bastion" - security_list_ids = [oci_core_virtual_network.CassandraVCN.default_security_list_id, oci_core_security_list.CassandraSL.id] - compartment_id = var.compartment_ocid - vcn_id = oci_core_virtual_network.CassandraVCN.id - route_table_id = oci_core_route_table.CassandraPublicRT.id - dhcp_options_id = oci_core_virtual_network.CassandraVCN.default_dhcp_options_id - defined_tags = { "${oci_identity_tag_namespace.ArchitectureCenterTagNamespace.name}.${oci_identity_tag.ArchitectureCenterTag.name}" = var.release } -} resource "oci_core_subnet" "CassandraSubnet" { cidr_block = var.cassandra_subnet_cidr diff --git a/schema.yaml b/schema.yaml index d089549..786fe9c 100755 --- a/schema.yaml +++ b/schema.yaml @@ -31,7 +31,6 @@ variableGroups: variables: - vcn_cidr - cassandra_subnet_cidr - - bastion_subnet_cidr - label_prefix - title: Compute Optional Configuration @@ -180,16 +179,6 @@ variables: title: "Cassandra Subnet CIDR" description: "Choose Public or Private Subnet CIDR for your Cassandra cluster deployment." - bastion_subnet_cidr: - type: string - visible: - and: - - use_private_subnet - required: false - pattern: "^(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\\/(3[0-2]|[1-2]?[0-9])$" - title: "Bastion Subnet CIDR" - description: "Choose Public Subnet CIDR for your Bastion deployment." - instance_os: type: enum required: false diff --git a/tags.tf b/tags.tf index ef81403..4c94e45 100644 --- a/tags.tf +++ b/tags.tf @@ -24,7 +24,7 @@ resource "oci_identity_tag" "ArchitectureCenterTag" { validator { validator_type = "ENUM" - values = ["release", "1.2"] + values = ["release", "1.3"] } provisioner "local-exec" { diff --git a/variables.tf b/variables.tf index 5cdc8a7..35d2578 100644 --- a/variables.tf +++ b/variables.tf @@ -15,7 +15,7 @@ variable "use_private_subnet" { variable "release" { description = "Reference Architecture Release (OCI Architecture Center)" - default = "1.2" + default = "1.3" } variable "instance_os" { @@ -50,10 +50,6 @@ variable "vcn_cidr" { default = "10.0.0.0/16" } -variable "bastion_subnet_cidr" { - default = "10.0.1.0/24" -} - variable "cassandra_subnet_cidr" { default = "10.0.2.0/24" }