Skip to content

Commit 379dbdf

Browse files
Merge pull request #4 from oracle-devrel/develop
Develop
2 parents dec616d + fd5da92 commit 379dbdf

File tree

61 files changed

+4519
-1
lines changed

Some content is hidden

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

61 files changed

+4519
-1
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# # Copyright © 2021, 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+
resource "oci_database_autonomous_database" "adw" {
5+
for_each = {
6+
for k,v in var.adw_params : k => v if v.compartment_id != ""
7+
}
8+
admin_password = each.value.database_admin_password
9+
compartment_id = each.value.compartment_id
10+
cpu_core_count = each.value.adw_cpu_core_count
11+
data_storage_size_in_tbs = each.value.adw_size_in_tbs
12+
db_name = each.value.adw_db_name
13+
display_name = each.value.adw_db_name
14+
db_workload = each.value.adw_db_workload
15+
db_version = each.value.adw_db_version
16+
is_auto_scaling_enabled = each.value.adw_enable_auto_scaling
17+
is_free_tier = each.value.adw_is_free_tier
18+
license_model = each.value.adw_license_model
19+
# subnet_id = each.value.subnet_id
20+
# nsg_ids = each.value.nsg_ids
21+
defined_tags = each.value.defined_tags
22+
}
23+
24+
resource "oci_database_autonomous_database_wallet" "autonomous_data_warehouse_wallet" {
25+
for_each = var.adw_params
26+
autonomous_database_id = oci_database_autonomous_database.adw[each.key].id
27+
password = each.value.database_wallet_password
28+
base64_encode_content = true
29+
}
30+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# # Copyright © 2021, 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 "ADW_Service_Console_URL" {
5+
value = join(", ", [for x in oci_database_autonomous_database.adw : x.service_console_url])
6+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# # Copyright © 2021, 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+
adw_cpu_core_count = number
8+
adw_size_in_tbs = number
9+
adw_db_name = string
10+
adw_db_workload = string
11+
adw_db_version = string
12+
adw_enable_auto_scaling = bool
13+
adw_is_free_tier = bool
14+
adw_license_model = string
15+
database_admin_password = string
16+
database_wallet_password = string
17+
# subnet_id = string
18+
# nsg_ids = list(string)
19+
defined_tags = map(string)
20+
}))
21+
}
22+
23+
24+
25+
26+
27+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
2+
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
4+
resource "oci_datacatalog_catalog" "this" {
5+
for_each = {
6+
for k,v in var.datacatalog_params : k => v if v.compartment_id != ""
7+
}
8+
compartment_id = each.value.compartment_id
9+
display_name = each.value.catalog_display_name
10+
defined_tags = each.value.defined_tags
11+
}
12+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
2+
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
4+
output "datacatalog" {
5+
value = {
6+
for datacatalog in oci_datacatalog_catalog.this:
7+
datacatalog.display_name => datacatalog.display_name
8+
}
9+
}
10+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
2+
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
4+
variable "datacatalog_params" {
5+
type = map(object({
6+
compartment_id = string
7+
catalog_display_name = string
8+
defined_tags = map(string)
9+
}))
10+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Copyright © 2021, 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+
resource "oci_analytics_analytics_instance" "oac" {
5+
for_each = {
6+
for k,v in var.oac_params : k => v if v.compartment_id != ""
7+
}
8+
compartment_id = each.value.compartment_id
9+
feature_set = each.value.analytics_instance_feature_set
10+
license_type = each.value.analytics_instance_license_type
11+
name = each.value.analytics_instance_hostname
12+
description = "Oracle Analytics Cloud"
13+
idcs_access_token = each.value.analytics_instance_idcs_access_token
14+
#Optional
15+
defined_tags = each.value.defined_tags
16+
network_endpoint_details {
17+
#Required
18+
network_endpoint_type = each.value.analytics_instance_network_endpoint_details_network_endpoint_type
19+
20+
#Optional
21+
subnet_id = each.value.subnet_id
22+
vcn_id = each.value.vcn_id
23+
whitelisted_ips = each.value.analytics_instance_network_endpoint_details_whitelisted_ips
24+
25+
whitelisted_vcns {
26+
#Optional
27+
id = each.value.analytics_instance_network_endpoint_details_whitelisted_vcns_id
28+
whitelisted_ips = each.value.whitelisted_ips
29+
}
30+
}
31+
capacity {
32+
capacity_type = each.value.analytics_instance_capacity_capacity_type
33+
capacity_value = each.value.analytics_instance_capacity_value
34+
}
35+
}
36+
37+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Copyright © 2021, 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 "Analytics_URL" {
5+
value = join(", ", [for x in oci_analytics_analytics_instance.oac : x.service_url])
6+
}
7+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright © 2021, 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 "oac_params" {
5+
type = map(object({
6+
compartment_id = string
7+
analytics_instance_feature_set = string
8+
analytics_instance_license_type = string
9+
analytics_instance_hostname = string
10+
analytics_instance_idcs_access_token = string
11+
analytics_instance_capacity_capacity_type = string
12+
analytics_instance_capacity_value = number
13+
defined_tags = map(string)
14+
analytics_instance_network_endpoint_details_network_endpoint_type = string
15+
subnet_id = string
16+
vcn_id = string
17+
analytics_instance_network_endpoint_details_whitelisted_ips = list(string)
18+
analytics_instance_network_endpoint_details_whitelisted_vcns_id = string
19+
whitelisted_ips = list(string)
20+
}))
21+
}
22+
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
2+
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
4+
data "oci_objectstorage_namespace" "os" {
5+
compartment_id = var.tenancy_ocid
6+
}
7+
8+
resource "oci_objectstorage_bucket" "os" {
9+
for_each = {
10+
for k,v in var.bucket_params : k => v if v.compartment_id != ""
11+
}
12+
compartment_id = each.value.compartment_id
13+
name = each.value.name
14+
namespace = data.oci_objectstorage_namespace.os.namespace
15+
access_type = each.value.access_type
16+
storage_tier = each.value.storage_tier
17+
object_events_enabled = each.value.events_enabled
18+
defined_tags = each.value.defined_tags
19+
}

0 commit comments

Comments
 (0)