Skip to content

Commit

Permalink
v1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcGueury committed Nov 21, 2023
1 parent 4eb7c8b commit 702792b
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 17 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Best practice:
Just follow the wizard. (Not tested lately)

## License
Copyright (c) 2022 Oracle and/or its affiliates.
Copyright (c) 2023 Oracle and/or its affiliates.

Licensed under the Universal Permissive License (UPL), Version 1.0.

Expand Down
15 changes: 9 additions & 6 deletions basis/src/terraform/datasource.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Copyright (c) 2022, Oracle and/or its affiliates.
## Copyright (c) 2023, Oracle and/or its affiliates.
## All rights reserved. The Universal Permissive License (UPL), Version 1.0 as shown at http://oss.oracle.com/licenses/upl

data "oci_identity_availability_domains" "ADs" {
Expand Down Expand Up @@ -81,12 +81,12 @@ output "oracle-dev-linux-latest-name" {
}
*/

output "oracle-linux-latest-name" {
value = data.oci_core_images.oraclelinux.images.0.display_name
locals {
oracle-linux-latest-name = coalesce( data.oci_core_images.oraclelinux.images.0.display_name, "Oracle-Linux-8.8-2023.10.24-0")
}

output "oracle-linux-latest-id" {
value = data.oci_core_images.oraclelinux.images.0.id
output "oracle-linux-latest-name" {
value = local.oracle-linux-latest-name
}

## Object Storage
Expand All @@ -108,6 +108,9 @@ data "oci_identity_compartment" "compartment" {
locals {
ocir_docker_repository = join("", [lower(lookup(data.oci_identity_regions.current_region.regions[0], "key")), ".ocir.io"])
ocir_namespace = lookup(data.oci_objectstorage_namespace.ns, "namespace")
ocir_username = "${local.ocir_namespace}/${var.username}"
ocir_username = join( "/", [ coalesce(local.ocir_namespace, "missing_privilege"), var.username ])
}

resource "random_id" "tag" {
byte_length = 2
}
2 changes: 1 addition & 1 deletion coderepo.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Copyright (c) 2022, Oracle and/or its affiliates.
## Copyright (c) 2023, Oracle and/or its affiliates.
## All rights reserved. The Universal Permissive License (UPL), Version 1.0 as shown at http://oss.oracle.com/licenses/upl

resource "oci_devops_repository" "test_repository" {
Expand Down
2 changes: 1 addition & 1 deletion datasources.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Copyright (c) 2022, Oracle and/or its affiliates.
## Copyright (c) 2023, Oracle and/or its affiliates.
## All rights reserved. The Universal Permissive License (UPL), Version 1.0 as shown at http://oss.oracle.com/licenses/upl

################### Tenancy
Expand Down
2 changes: 1 addition & 1 deletion devops.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Copyright (c) 2022, Oracle and/or its affiliates.
## Copyright (c) 2023, Oracle and/or its affiliates.
## All rights reserved. The Universal Permissive License (UPL), Version 1.0 as shown at http://oss.oracle.com/licenses/upl

# Create log and log group
Expand Down
3 changes: 2 additions & 1 deletion option/terraform/atp.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ resource "oci_database_autonomous_database" "starter_atp" {
compartment_id = local.lz_database_cmp_ocid
cpu_core_count = "1"
data_storage_size_in_tbs = "1"
db_name = "${var.prefix}atp"
# Random name to have several OCI Starter ATP named (starteratp-xx) on the same Tenancy (Ex: livelabs)
db_name = "${var.prefix}atp-${random_id.tag.hex}"

#Optional
db_workload = "OLTP"
Expand Down
2 changes: 1 addition & 1 deletion option/terraform/bastion.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ resource "oci_core_instance" "starter_bastion" {

source_details {
source_type = "image"
source_id = data.oci_core_images.oraclelinux.images.0.id
source_id = local.oracle-linux-latest-name
}

connection {
Expand Down
2 changes: 1 addition & 1 deletion option/terraform/compute.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ resource "oci_core_instance" "starter_instance" {

source_details {
source_type = "image"
source_id = data.oci_core_images.oraclelinux.images.0.id
source_id = local.oracle-linux-latest-name
}

connection {
Expand Down
2 changes: 1 addition & 1 deletion option/terraform/db_free_compute.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ resource "oci_core_instance" "starter_db_free" {

source_details {
source_type = "image"
source_id = data.oci_core_images.oraclelinux.images.0.id
source_id = local.oracle-linux-latest-name
}

/*
Expand Down
2 changes: 1 addition & 1 deletion policies.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Copyright (c) 2022, Oracle and/or its affiliates.
## Copyright (c) 2023, Oracle and/or its affiliates.
## All rights reserved. The Universal Permissive License (UPL), Version 1.0 as shown at http://oss.oracle.com/licenses/upl

resource "oci_identity_dynamic_group" "devopsgroup1" {
Expand Down
2 changes: 1 addition & 1 deletion provider.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Copyright (c) 2022, Oracle and/or its affiliates.
## Copyright (c) 2023, Oracle and/or its affiliates.
## All rights reserved. The Universal Permissive License (UPL), Version 1.0 as shown at http://oss.oracle.com/licenses/upl

terraform {
Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Copyright (c) 2022, Oracle and/or its affiliates.
## Copyright (c) 2023, Oracle and/or its affiliates.
## All rights reserved. The Universal Permissive License (UPL), Version 1.0 as shown at http://oss.oracle.com/licenses/upl

# Prepopulated variable by Resource Manager
Expand Down

0 comments on commit 702792b

Please sign in to comment.