Skip to content

Commit

Permalink
Merge pull request #2132 from oracle/release_gh
Browse files Browse the repository at this point in the history
Releasing version 5.45.0
  • Loading branch information
Maxrovr authored Jun 4, 2024
2 parents e017cca + c9afbe1 commit ceb466d
Show file tree
Hide file tree
Showing 363 changed files with 12,163 additions and 306 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## 5.45.0 (June 04, 2024)

### Added
- Support for ADB-S: Cross-Tenancy Autonomous Data Guard standby
examples and tests
- Support for GoldenGate - Resource Locking
- Support for Add DB2 deployment and additional connection types (R5)
### Bug Fix
- Fix function batching terraform bug
- Capacity Management Breaking change fix

## 5.44.0 (May 29, 2024)

### Added
Expand Down
2 changes: 2 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ This directory contains Terraform configuration files showing how to create spec
[![Deploy to Oracle Cloud](https://oci-resourcemanager-plugin.plugins.oci.oraclecloud.com/latest/deploy-to-oracle-cloud.svg)](https://cloud.oracle.com/resourcemanager/stacks/create?zipUrl=https://github.com/oracle/terraform-provider-oci/raw/master/examples/zips/datasafe.zip)
- datascience
[![Deploy to Oracle Cloud](https://oci-resourcemanager-plugin.plugins.oci.oraclecloud.com/latest/deploy-to-oracle-cloud.svg)](https://cloud.oracle.com/resourcemanager/stacks/create?zipUrl=https://github.com/oracle/terraform-provider-oci/raw/master/examples/zips/datascience.zip)
- demand_signal
[![Deploy to Oracle Cloud](https://oci-resourcemanager-plugin.plugins.oci.oraclecloud.com/latest/deploy-to-oracle-cloud.svg)](https://cloud.oracle.com/resourcemanager/stacks/create?zipUrl=https://github.com/oracle/terraform-provider-oci/raw/master/examples/zips/demand_signal.zip)
- devops
[![Deploy to Oracle Cloud](https://oci-resourcemanager-plugin.plugins.oci.oraclecloud.com/latest/deploy-to-oracle-cloud.svg)](https://cloud.oracle.com/resourcemanager/stacks/create?zipUrl=https://github.com/oracle/terraform-provider-oci/raw/master/examples/zips/devops.zip)
- disaster_recovery
Expand Down
232 changes: 232 additions & 0 deletions examples/capacity_management/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,232 @@
// Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
// Licensed under the Mozilla Public License v2.0

variable "tenancy_ocid" {}
variable "user_ocid" {}
variable "fingerprint" {}
variable "private_key_path" {}
variable "region" {}
variable "compartment_id" {}

variable "occ_customer_group_display_name" {
default = "displayName"
}

variable "occ_customer_group_id" {
default = "id"
}

variable "occ_customer_group_status" {
default = "ENABLED"
}

variable "occ_availability_catalog_base64encoded_catalog_details" {
default = "RmluYWwgQ3VzdG9tZXIgT3JkZXIgRGF0ZSxDYXBhY2l0eSBIYW5kb3ZlciBEYXRlLFJlc291cmNlIFR5cGUsV29ya2xvYWQgVHlwZSxOYW1lLEF2YWlsYWJsZSBRdWFudGl0eSxVbml0CjIwMjUtMDItMjMsMjAyNS0wNC0wNSxDQVBBQ0lUWV9DT05TVFJBSU5ULFVTX1BST0QsVVMtQVNIQlVSTi0xLUFELTIsMTc1NSxTZXJ2ZXJzCjIwMjUtMDItMjMsMjAyNS0wNC0wNSxDQVBBQ0lUWV9DT05TVFJBSU5ULFJPVyxVUy1BU0hCVVJOLTEtQUQtMiwxNzU1LFNlcnZlcnMKMjAyNS0wMi0yMywyMDI1LTA0LTA1LFNFUlZFUl9IVyxVU19QUk9ELEJNLlN0YW5kYXJkMy42NCwxMDgsU2VydmVycwoyMDI1LTAyLTIzLDIwMjUtMDQtMDUsU0VSVkVSX0hXLFJPVyxCTS5TdGFuZGFyZDMuNjQsMTA4LFNlcnZlcnMKMjAyNS0wMi0yMywyMDI1LTA0LTA1LFNFUlZFUl9IVyxST1csQk0uU3RhbmRhcmQzLVdCLjY0LDE2MzA4LFNlcnZlcnMKMjAyNS0wMi0yMywyMDI1LTA0LTA1LFNFUlZFUl9IVyxST1csQk0uU3RhbmRhcmQyVC5FNC1XQi4xMjgsNzM4LFNlcnZlcnMKM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wNSxTRVJWRVJfSFcsUk9XLEJNLlN0YW5kYXJkLkExLVdCLjE2MCw2ODA0LFNlcnZlcnMKMjAyNS0wMi0yMywyMDI1LTA0LTA1LFNFUlZFUl9IVyxVU19QUk9ELEJNLkRlbnNlSU8uRTVULjEyOCw0MzUsU2VydmVycwoyMDI1LTAyLTIzLDIwMjUtMDQtMDUsU0VSVkVSX0hXLFJPVyxCTS5EZW5zZUlPLkU1VC4xMjgsNDM1LFNlcnZlcnMKMjAyNS0wMi0yMywyMDI1LTA0LTA1LFNFUlZFUl9IVyxVU19QUk9ELEJNLkRlbnNlSU8uRTQuMTI4LDI3MDAsU2VydmVycwoyMDI1LTAyLTIzLDIwMjUtMDQtMDUsU0VSVkVSX0hXLFJPVyxCTS5EZW5zZUlPLkU0LjEyOCwyNzAwLFNlcnZlcnMKMjAyNS0wMi0yMywyMDI1LTA0LTA1LFNFUlZFUl9IVyxVU19QUk9ELEJNLkJpZ0RhdGEyLkU0LjEyOCAxNCBUQiwxNTAwLFNlcnZlcnMKMjAyNS0wMi0yMywyMDI1LTA0LTA1LFNFUlZFUl9IVyxST1csQk0uQmlnRGF0YTIuRTQuMTI4IDE0IFRCLDE1MDAsU2VydmVycw=="
}

variable "occ_availability_catalog_display_name" {
default = "testAvailabilityCatalog"
}

variable "occ_availability_catalog_namespace" {
default = "COMPUTE"
}

variable "occ_availability_catalog_freeform_tags" {
default = { "bar-key" = "value" }
}

variable "occ_availability_catalog_description" {
default = "This availability catalog is created via terraform provider"
}

variable "customer_compartment_id" {
default = "ocid1.tenancy.oc1..aaaaaaaa3gmchdtrnbtbdxt23e4vg6teuxdz5p533353tpo3k3jmebhzoklq"
}

variable "occ_availability_catalog_metadata_details_format_version" {
default = "V1"
}

variable "occ_availability_catalog_catalog_state" {
default = "NOT_UPLOADED"
}

variable "occ_availability_catalog_id" {
default = "id"
}

variable "occ_capacity_request_availability_domain" {
default = "US-ASHBURN-1-AD-2"
}

variable "occ_capacity_request_date_expected_capacity_handover" {
default = "2024/06/03"
}

variable "occ_capacity_request_defined_tags_value" {
default = "value"
}

variable "occ_capacity_request_description" {
default = "This is a test capacity request created via terraform provider"
}

variable "occ_capacity_request_details_actual_handover_quantity" {
default = 10
}

variable "occ_capacity_request_details_date_actual_handover" {
default = "dateActualHandover"
}

variable "occ_capacity_request_details_date_expected_handover" {
default = "dateExpectedHandover"
}

variable "occ_capacity_request_details_demand_quantity" {
default = 10
}

variable "occ_capacity_request_details_expected_handover_quantity" {
default = 10
}

variable "occ_capacity_request_details_resource_type" {
default = "SERVER_HW"
}

variable "occ_capacity_request_details_workload_type" {
default = "GENERIC"
}

variable "occ_capacity_request_display_name" {
default = "Test Request"
}

variable "occ_capacity_request_freeform_tags" {
default = { "bar-key" = "value" }
}

variable "occ_capacity_request_id" {
default = "id"
}

variable "occ_capacity_request_lifecycle_details" {
default = "lifecycleDetails"
}

variable "occ_capacity_request_namespace" {
default = "COMPUTE"
}

variable "occ_capacity_request_region" {
default = "US-ASHBURN-1"
}

variable "occ_capacity_request_request_state" {
default = "CREATED"
}

variable "occ_availability_catalog_occ_availability_resource_type" {
default = "SERVER_HW"
}

provider "oci" {
tenancy_ocid = var.tenancy_ocid
user_ocid = var.user_ocid
fingerprint = var.fingerprint
private_key_path = var.private_key_path
region = var.region
}

data "oci_capacity_management_occ_customer_groups" "test_occ_customer_groups" {
#Required
compartment_id = var.compartment_id

#Optional
# display_name = var.occ_customer_group_display_name
# id = var.occ_customer_group_id
# status = var.occ_customer_group_status
}

resource "oci_capacity_management_occ_availability_catalog" "test_occ_availability_catalog" {
#Required
base64encoded_catalog_details = var.occ_availability_catalog_base64encoded_catalog_details
compartment_id = var.compartment_id
display_name = var.occ_availability_catalog_display_name
namespace = var.occ_availability_catalog_namespace
occ_customer_group_id = lookup(data.oci_capacity_management_occ_customer_groups.test_occ_customer_groups.occ_customer_group_collection.0.items[0], "id")

#Optional
# defined_tags = map(oci_identity_tag_namespace.tag-namespace1.name.oci_identity_tag.tag1.name, var.occ_availability_catalog_defined_tags_value)
description = var.occ_availability_catalog_description
freeform_tags = var.occ_availability_catalog_freeform_tags
metadata_details {
#Required
format_version = var.occ_availability_catalog_metadata_details_format_version
}
}


data "oci_capacity_management_occ_availability_catalogs" "published_catalog_collection" {
compartment_id = var.customer_compartment_id
}

data "oci_capacity_management_occ_availability_catalog_occ_availabilities" "published_occ_availability_catalog_occ_availabilities" {
#Required
occ_availability_catalog_id = lookup(data.oci_capacity_management_occ_availability_catalogs.published_catalog_collection.occ_availability_catalog_collection.0.items[0], "id")

#Optional
# date_expected_capacity_handover = var.occ_availability_catalog_occ_availability_date_expected_capacity_handover
# resource_name = oci_usage_proxy_resource.test_resource.name
resource_type = var.occ_availability_catalog_occ_availability_resource_type
# workload_type = var.occ_availability_catalog_occ_availability_workload_type
}

resource "oci_capacity_management_occ_capacity_request" "test_occ_capacity_request" {
#Required
availability_domain = var.occ_capacity_request_availability_domain
compartment_id = var.customer_compartment_id
# date_expected_capacity_handover = lookup(data.oci_capacity_management_occ_availability_catalog_occ_availabilities.published_occ_availability_catalog_occ_availabilities.occ_availability_collection.0.items[0], "date_expected_capacity_handover")
# date_expected_capacity_handover = formatdate("YYYY-MM-DDTHH:MM:SSZ",data.oci_capacity_management_occ_availability_catalog_occ_availabilities.published_occ_availability_catalog_occ_availabilities.occ_availability_collection.0.items[0].date_expected_capacity_handover)
date_expected_capacity_handover = "2124-06-04T00:00:00.00Z"

details {
#Required
demand_quantity = var.occ_capacity_request_details_demand_quantity
resource_name = lookup(data.oci_capacity_management_occ_availability_catalog_occ_availabilities.published_occ_availability_catalog_occ_availabilities.occ_availability_collection.0.items[0], "resource_name")
resource_type = lookup(data.oci_capacity_management_occ_availability_catalog_occ_availabilities.published_occ_availability_catalog_occ_availabilities.occ_availability_collection.0.items[0], "resource_type")
workload_type = lookup(data.oci_capacity_management_occ_availability_catalog_occ_availabilities.published_occ_availability_catalog_occ_availabilities.occ_availability_collection.0.items[0], "workload_type")

#Optional
# actual_handover_quantity = var.occ_capacity_request_details_actual_handover_quantity
# date_actual_handover = var.occ_capacity_request_details_date_actual_handover
# date_expected_handover = var.occ_capacity_request_details_date_expected_handover
# expected_handover_quantity = var.occ_capacity_request_details_expected_handover_quantity
}
display_name = var.occ_capacity_request_display_name
namespace = var.occ_capacity_request_namespace
occ_availability_catalog_id = lookup(data.oci_capacity_management_occ_availability_catalogs.published_catalog_collection.occ_availability_catalog_collection.0.items[0], "id")
# occ_capacity_request_id = var.occ_capacity_request_occ_capacity_request_id
region = var.occ_capacity_request_region

#Optional
# defined_tags = map(oci_identity_tag_namespace.tag-namespace1.name.oci_identity_tag.tag1.name, var.occ_capacity_request_defined_tags_value)
description = var.occ_capacity_request_description
freeform_tags = var.occ_capacity_request_freeform_tags
lifecycle_details = var.occ_capacity_request_lifecycle_details
# patch_operations {
# #Required
# operation = var.occ_capacity_request_patch_operations_operation
# selection = var.occ_capacity_request_patch_operations_selection
#
# #Optional
# from = var.occ_capacity_request_patch_operations_from
# position = var.occ_capacity_request_patch_operations_position
# selected_item = var.occ_capacity_request_patch_operations_selected_item
# value = var.occ_capacity_request_patch_operations_value
# values = var.occ_capacity_request_patch_operations_values
# }
request_state = var.occ_capacity_request_request_state
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
// Licensed under the Mozilla Public License v2.0

resource "random_string" "autonomous_database_admin_password" {
length = 16
min_numeric = 1
min_lower = 1
min_upper = 1
min_special = 1
}
resource "time_sleep" "wait_300_seconds" {
destroy_duration = "5m"
depends_on = [oci_database_autonomous_database.autonomous_database_cross_tenancy_dataguard_primary]
}

resource "oci_database_autonomous_database" "autonomous_database_cross_tenancy_dataguard_primary" {
admin_password = random_string.autonomous_database_admin_password.result
compartment_id = var.compartment_id
cpu_core_count = "1"
data_storage_size_in_tbs = "1"
db_name = "adbdb11ff6510"
db_version = "19c"
license_model = "LICENSE_INCLUDED"
is_free_tier = "false"
}

resource "oci_database_autonomous_database" "autonomous_database_cross_tenancy_dataguard_standby" {
provider = oci.standby_tenancy
compartment_id = var.standby_compartment_id
source = "CROSS_TENANCY_DISASTER_RECOVERY"
disaster_recovery_type = "ADG"
source_id = oci_database_autonomous_database.autonomous_database_cross_tenancy_dataguard_primary.id
db_name = oci_database_autonomous_database.autonomous_database_cross_tenancy_dataguard_primary.db_name
}

data "oci_database_autonomous_databases" "autonomous_databases" {
filter {
name = "id"
values = [oci_database_autonomous_database.autonomous_database_cross_tenancy_dataguard_standby.id]
}

filter {
name = "role"
values = ["STANDBY"]
}

#Required
compartment_id = var.standby_compartment_id

}

output "autonomous_databases" {
value = data.oci_database_autonomous_databases.autonomous_databases.autonomous_databases
}

data "oci_database_autonomous_database_peers" "autonomous_database_peers" {
autonomous_database_id = oci_database_autonomous_database.autonomous_database_cross_tenancy_dataguard_primary.id
}

output "autonomous_database_peers" {
value = data.oci_database_autonomous_database_peers.autonomous_database_peers.autonomous_database_peer_collection
}



52 changes: 52 additions & 0 deletions examples/database/adb/adb_cross_tenancy/provider.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
// Licensed under the Mozilla Public License v2.0

variable "tenancy_ocid" {
}

variable "standby_tenancy_ocid" {
}

variable "user_ocid" {
}

variable "standby_user_ocid" {
}

variable "fingerprint" {
}

variable "standby_fingerprint" {
}

variable "private_key_path" {
}

variable "standby_private_key_path" {
}

variable "compartment_id" {
}

variable "standby_compartment_id" {
}

variable "standby_region" {
}

provider "oci" {
region = var.region
tenancy_ocid = var.tenancy_ocid
user_ocid = var.user_ocid
fingerprint = var.fingerprint
private_key_path = var.private_key_path
}

provider "oci" {
alias = "standby_tenancy"
region = var.standby_region
tenancy_ocid = var.standby_tenancy_ocid
user_ocid = var.user_ocid
fingerprint = var.standby_fingerprint
private_key_path = var.standby_private_key_path
}
6 changes: 6 additions & 0 deletions examples/demand_signal/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Overview
This is a Terraform configuration that creates the `demand_signal` service on Oracle Cloud Infrastructure.

The Terraform code is used to create a Resource Manager stack, that creates the required resources and configures the application on the created resources.
## Magic Button
[![Deploy to Oracle Cloud](https://oci-resourcemanager-plugin.plugins.oci.oraclecloud.com/latest/deploy-to-oracle-cloud.svg)](https://cloud.oracle.com/resourcemanager/stacks/create?zipUrl=https://github.com/oracle/terraform-provider-oci/raw/master/examples/zips/demand_signal.zip)
4 changes: 4 additions & 0 deletions examples/demand_signal/description.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Overview
This is a Terraform configuration that creates the `demand_signal` service on Oracle Cloud Infrastructure.

The Terraform code is used to create a Resource Manager stack, that creates the required resources and configures the application on the created resources.
Loading

0 comments on commit ceb466d

Please sign in to comment.