Skip to content

Commit

Permalink
Merge pull request #25 from oracle/springboot-1.1.1
Browse files Browse the repository at this point in the history
Added fix for cluster version
  • Loading branch information
Kuassim authored Sep 1, 2023
2 parents f433c6d + 16eed07 commit 88a61ba
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
11 changes: 8 additions & 3 deletions MtdrSpring/terraform/containerengine.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ resource "oci_containerengine_cluster" "mtdrworkshop_cluster" {
]
subnet_id = oci_core_subnet.endpoint.id
}
kubernetes_version = "v1.25.4"
kubernetes_version = local.latest
name = "mtdrworkshopcluster-${var.mtdrKey}"
vcn_id = oci_core_vcn.okevcn.id
#optional
Expand Down Expand Up @@ -36,7 +36,7 @@ resource "oci_containerengine_node_pool" "oke_node_pool" {
#Required
cluster_id = oci_containerengine_cluster.mtdrworkshop_cluster.id
compartment_id = var.ociCompartmentOcid
kubernetes_version = "v1.25.4"
kubernetes_version = local.latest
name = "Pool"
# node_shape="VM.Standard2.4"
# node_shape = "VM.Standard.B2.1"
Expand Down Expand Up @@ -80,4 +80,9 @@ data "oci_containerengine_node_pool_option" "mtdrworkshop_node_pool_option" {
locals {
all_sources = data.oci_containerengine_node_pool_option.mtdrworkshop_node_pool_option.sources
oracle_linux_images = [for source in local.all_sources : source.image_id if length(regexall("Oracle-Linux-[0-9]*.[0-9]*-20[0-9]*",source.source_name)) > 0]
}
}

locals {
versions = reverse(sort(data.oci_containerengine_cluster_option.mtdrworkshop_cluster_option.kubernetes_versions))
latest = local.versions[0]
}
4 changes: 4 additions & 0 deletions MtdrSpring/terraform/database.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,8 @@ output "ns_objectstorage_namespace" {
}
output "autonomous_database_admin_password" {
value = [ "Welcome12345" ]
}

output "adb_ocid" {
value = oci_database_autonomous_database.autonomous_database_atp.id
}
7 changes: 4 additions & 3 deletions MtdrSpring/terraform/provider.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
terraform {
required_providers{
required_providers {
oci = {
source = "hashicorp/oci"
version = "4.42.0"
source = "oracle/oci"
version = ">= 5.9.0"
}
}
}

provider "oci"{
region = var.ociRegionIdentifier
}
2 changes: 1 addition & 1 deletion MtdrSpring/utils/main-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ fi

# Get MTDR_DB OCID
while ! state_done MTDR_DB_OCID; do
MTDR_DB_OCID=`oci db autonomous-database list --compartment-id "$(cat state/COMPARTMENT_OCID)" --query 'join('"' '"',data[?"display-name"=='"'MTDRDB'"'].id)' --raw-output`
MTDR_DB_OCID=`terraform -chdir="$MTDRWORKSHOP_LOCATION/terraform" output --raw adb_ocid`
if [[ "$MTDR_DB_OCID" =~ ocid1.autonomousdatabase* ]]; then
state_set MTDR_DB_OCID "$MTDR_DB_OCID"
else
Expand Down

0 comments on commit 88a61ba

Please sign in to comment.