Skip to content

Commit de282b4

Browse files
Merge pull request #95 from oracle-devrel/iopanait-develop32
upgrading all the solutions with ecpus for adb and new features
2 parents e9d50e0 + 63ab778 commit de282b4

File tree

147 files changed

+2693
-2128
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+2693
-2128
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Copyright © 2023, Oracle and/or its affiliates.
2+
# All rights reserved. Licensed under the Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
4+
locals {
5+
adw_download_wallet = { for key, value in var.adw_params : key => value if value.create_local_wallet == true }
6+
}
7+
8+
resource "oci_database_autonomous_database_wallet" "autonomous_database_wallet" {
9+
for_each = var.adw_params
10+
autonomous_database_id = oci_database_autonomous_database.adw[each.key].id
11+
password = each.value.database_wallet_password
12+
base64_encode_content = "true"
13+
}
14+
15+
resource "local_file" "autonomous_data_warehouse_wallet_file" {
16+
for_each = local.adw_download_wallet
17+
content_base64 = oci_database_autonomous_database_wallet.autonomous_database_wallet[each.key].content
18+
filename = "${path.cwd}/wallet_${each.value.db_name}.zip"
19+
}
20+
21+
resource "oci_database_autonomous_database" "adw" {
22+
for_each = var.adw_params
23+
admin_password = each.value.database_admin_password
24+
compartment_id = each.value.compartment_id
25+
compute_model = each.value.compute_model
26+
compute_count = each.value.compute_count
27+
data_storage_size_in_tbs = each.value.size_in_tbs
28+
db_name = each.value.db_name
29+
display_name = each.value.db_name
30+
db_workload = each.value.db_workload
31+
db_version = each.value.db_version
32+
license_model = each.value.license_model
33+
is_mtls_connection_required = each.value.is_mtls_connection_required
34+
subnet_id = each.value.subnet_id
35+
nsg_ids = each.value.nsg_ids
36+
defined_tags = each.value.defined_tags
37+
is_auto_scaling_enabled = each.value.enable_auto_scaling
38+
is_free_tier = each.value.is_free_tier
39+
data_safe_status = each.value.data_safe_status
40+
operations_insights_status = each.value.operations_insights_status
41+
database_management_status = each.value.database_management_status
42+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Copyright © 2023, Oracle and/or its affiliates.
2+
# All rights reserved. Licensed under the Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
4+
output "atp_db_id" {
5+
value = {
6+
for adw in oci_database_autonomous_database.adw:
7+
adw.display_name => adw.id
8+
}
9+
}
10+
11+
output "ad" {
12+
value = {
13+
for idx, ad in oci_database_autonomous_database.adw:
14+
ad.db_name => { "connection_strings" : ad.connection_strings.0.all_connection_strings}
15+
}
16+
}
17+
18+
output "db_connection" {
19+
value = one([ for b in oci_database_autonomous_database.adw : b.connection_strings])
20+
}
21+
22+
output "private_endpoint_ip" {
23+
value = one([for b in oci_database_autonomous_database.adw : b.private_endpoint_ip])
24+
}
25+
26+
output "private_endpoint" {
27+
value = ([for b in oci_database_autonomous_database.adw : b.private_endpoint])
28+
}
29+
30+
output "url" {
31+
value = [for b in oci_database_autonomous_database.adw : b.connection_urls.0.sql_dev_web_url]
32+
}
33+
34+
output "graph_studio_url" {
35+
value = [for b in oci_database_autonomous_database.adw : b.connection_urls.0.graph_studio_url]
36+
}
37+
38+
output "machine_learning_user_management_url" {
39+
value = [for b in oci_database_autonomous_database.adw : b.connection_urls.0.machine_learning_user_management_url]
40+
}
41+
42+
output "adb_wallet_content" {
43+
value = oci_database_autonomous_database_wallet.autonomous_database_wallet["adw"].content
44+
}
45+
46+
output "database_fully_qualified_name" {
47+
value = lower(trimsuffix(trimprefix(join("\n", [for b in oci_database_autonomous_database.adw : b.connection_urls.0.graph_studio_url]), "https://"), "/graphstudio/"))
48+
}
49+
50+
output "adw" {
51+
value = {
52+
for adw in oci_database_autonomous_database.adw:
53+
adw.display_name => adw.id
54+
}
55+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright © 2023, Oracle and/or its affiliates.
2+
# All rights reserved. Licensed under the Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
4+
variable "adw_params" {
5+
type = map(object({
6+
compartment_id = string
7+
compute_model = string
8+
compute_count = number
9+
size_in_tbs = number
10+
db_name = string
11+
db_workload = string
12+
db_version = string
13+
license_model = string
14+
database_admin_password = string
15+
database_wallet_password = string
16+
enable_auto_scaling = bool
17+
is_free_tier = bool
18+
create_local_wallet = bool
19+
is_mtls_connection_required = bool
20+
subnet_id = string
21+
data_safe_status = string
22+
operations_insights_status = string
23+
database_management_status = string
24+
nsg_ids = list(string)
25+
defined_tags = map(string)
26+
}))
27+
}

cloud-foundation/modules/cloud-foundation-library/functions/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ resource "oci_functions_application" "this" {
77
subnet_ids = each.value.subnet_ids
88
display_name = each.value.display_name
99
defined_tags = each.value.defined_tags
10+
shape = each.value.application_shape
1011
}
1112

1213
data "oci_functions_applications" "existing" {

cloud-foundation/modules/cloud-foundation-library/functions/variables.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
variable "app_params" {
55
type = map(object({
66
compartment_id = string
7-
subnet_ids = list(string)
87
display_name = string
8+
subnet_ids = list(string)
9+
application_shape = string
910
defined_tags = map(string)
1011
}))
1112
}
Binary file not shown.

0 commit comments

Comments
 (0)