diff --git a/CHANGELOG.md b/CHANGELOG.md index bcf5d99ef3f..cc40aededaf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## 6.2.0 (July 10, 2024) + +### Added +- Support for Support Dynamic list of ZDM parameters for Oracle<>Oracle migrations +- Support for Shared Resources feature +### Bug Fix +- Update current_version_number on secret_content update + ## 6.1.0 (July 02, 2024) ### Added diff --git a/examples/databasemigration/migration/migration.tf b/examples/databasemigration/migration/migration.tf index c579c8742ce..cc63c6c222f 100644 --- a/examples/databasemigration/migration/migration.tf +++ b/examples/databasemigration/migration/migration.tf @@ -103,13 +103,14 @@ data "oci_database_migration_job" "test_job" { job_id = var.jobId } -data "oci_database_migration_agent" "test_agent" { - agent_id = "agentId" -} + +variable "migration_id" { + default = "" +} data "oci_database_migration_migrations" "test_migrations" { #Required - compartment_id = var.compartment_id + migration_id = var.migration_id } data "oci_database_migration_job_advisor_report" "test_job_advisor_report" { @@ -123,8 +124,43 @@ data "oci_database_migration_job_output" "test_job_output" { data "oci_database_migration_migration_object_types" "test_migration_object_types" { connection_type = "MYSQL" } +variable "connection_string" { + default = "" +} +variable "nsg_ids" { + default = "" +} +resource "oci_database_migration_connection" "test_connection_rds_source" { + compartment_id = var.compartment_id + display_name = "TF_display_test_rds_source" + connection_type = "ORACLE" + key_id = var.kms_key_id + vault_id = var.kms_vault_id + connection_string = var.connection_string + password = "BEstrO0ng_#11" + technology_type = "AMAZON_RDS_ORACLE" + username = "ggfe" + nsg_ids = var.nsg_ids + replication_password="replicationPassword" + replication_username="replicationUsername" +} -data "oci_database_migration_agent_images" "test_agent_images" {} +variable "database_autonomous_id" { + default = "" +} +resource "oci_database_migration_connection" "test_connection_rds_target" { + compartment_id = var.compartment_id + display_name = "TF_display_test_rds_target" + connection_type = "ORACLE" + key_id = var.kms_key_id + vault_id = var.kms_vault_id + database_id = var.database_autonomous_id + password = "BEstrO0ng_#11" + technology_type = "OCI_AUTONOMOUS_DATABASE" + username = "ggfe" + replication_password="replicationPassword" + replication_username="replicationUsername" +} resource "oci_database_migration_connection" "test_connection_target" { compartment_id = var.compartment_id @@ -200,6 +236,70 @@ resource "oci_database_migration_migration" "test_migration" { display_name = "displayName" } +resource "oci_database_migration_migration" "test_offline_migration" { + compartment_id = var.compartment_id + database_combination = "MYSQL" + source_database_connection_id = var.source_connection_mysql_id + target_database_connection_id = var.target_connection_mysql_id + type = "OFFLINE" + display_name = "displayName" +} + +variable "source_connection_oracle_id" { + default = "" +} +variable "source_connection_container_oracle_id" { + default = "" +} +variable "target_connection_oracle_id" { + default = "" +} +variable "bucket_oracle_id" { + default = "" +} +resource "oci_database_migration_migration" "test_oracle_migration" { + compartment_id = var.compartment_id + database_combination = "ORACLE" + source_database_connection_id = var.source_connection_oracle_id + source_container_database_connection_id = var.source_connection_container_oracle_id + target_database_connection_id = var.target_connection_oracle_id + advanced_parameters { + data_type = "STRING" + name = "DATAPUMPSETTINGS_METADATAONLY" + value = "True" + } + data_transfer_medium_details { + type = "OBJECT_STORAGE" + object_storage_bucket { + bucket = var.bucket_oracle_id + namespace = "namespace" + } + } + type = "ONLINE" + display_name = "displayName" +} + +resource "oci_database_migration_migration" "test_oracle_rds_migration" { + compartment_id = var.compartment_id + database_combination = "ORACLE" + source_database_connection_id = oci_database_migration_connection.test_connection_rds_source.id + target_database_connection_id = oci_database_migration_connection.test_connection_rds_target.id + + data_transfer_medium_details { + type = "AWS_S3" + name = "rdsbucket" + region = "us-east-1" + secret_access_key = "12345/12345" + access_key_id = "12345" + object_storage_bucket { + bucket = var.bucket_oracle_id + namespace = "namespace" + } + } + type = "ONLINE" + display_name = "displayName" +} + output "password" { sensitive = true value = random_string.autonomous_database_admin_password.result diff --git a/examples/metering_computation/usage/main.tf b/examples/metering_computation/usage/main.tf index 41fadb4216e..606791d580a 100644 --- a/examples/metering_computation/usage/main.tf +++ b/examples/metering_computation/usage/main.tf @@ -5,27 +5,12 @@ variable "tenancy_ocid" { } -variable "user_ocid" { -} - -variable "fingerprint" { -} - -variable "private_key_path" { -} - -variable "compartment_ocid" { -} - variable "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 + auth = "SecurityToken" + config_file_profile = "terraform-federation-test" } variable "time_usage_ended" { diff --git a/examples/zips/adm.zip b/examples/zips/adm.zip index 043cc21018b..b4f95a6f608 100644 Binary files a/examples/zips/adm.zip and b/examples/zips/adm.zip differ diff --git a/examples/zips/aiAnomalyDetection.zip b/examples/zips/aiAnomalyDetection.zip index ad712d9d891..c2271a49a3a 100644 Binary files a/examples/zips/aiAnomalyDetection.zip and b/examples/zips/aiAnomalyDetection.zip differ diff --git a/examples/zips/aiDocument.zip b/examples/zips/aiDocument.zip index 5567cbb019c..b321a8586a7 100644 Binary files a/examples/zips/aiDocument.zip and b/examples/zips/aiDocument.zip differ diff --git a/examples/zips/aiLanguage.zip b/examples/zips/aiLanguage.zip index c17fe3d36bb..2e4ad6b0aa9 100644 Binary files a/examples/zips/aiLanguage.zip and b/examples/zips/aiLanguage.zip differ diff --git a/examples/zips/aiVision.zip b/examples/zips/aiVision.zip index 9aee05c515d..6799e45f903 100644 Binary files a/examples/zips/aiVision.zip and b/examples/zips/aiVision.zip differ diff --git a/examples/zips/always_free.zip b/examples/zips/always_free.zip index deea50a065b..bb5a145d6da 100644 Binary files a/examples/zips/always_free.zip and b/examples/zips/always_free.zip differ diff --git a/examples/zips/analytics.zip b/examples/zips/analytics.zip index 89ad2babd44..1e0715202f9 100644 Binary files a/examples/zips/analytics.zip and b/examples/zips/analytics.zip differ diff --git a/examples/zips/announcements_service.zip b/examples/zips/announcements_service.zip index 6f10295d1a9..09174c2a8c5 100644 Binary files a/examples/zips/announcements_service.zip and b/examples/zips/announcements_service.zip differ diff --git a/examples/zips/api_gateway.zip b/examples/zips/api_gateway.zip index b09bc3f2694..145412640e5 100644 Binary files a/examples/zips/api_gateway.zip and b/examples/zips/api_gateway.zip differ diff --git a/examples/zips/apm.zip b/examples/zips/apm.zip index d415fba1cd4..95470dad00e 100644 Binary files a/examples/zips/apm.zip and b/examples/zips/apm.zip differ diff --git a/examples/zips/appmgmt_control.zip b/examples/zips/appmgmt_control.zip index 6eec76b081e..e7c56a3d247 100644 Binary files a/examples/zips/appmgmt_control.zip and b/examples/zips/appmgmt_control.zip differ diff --git a/examples/zips/artifacts.zip b/examples/zips/artifacts.zip index 9b3bf0cb018..482608fbdae 100644 Binary files a/examples/zips/artifacts.zip and b/examples/zips/artifacts.zip differ diff --git a/examples/zips/audit.zip b/examples/zips/audit.zip index 59f3dda7331..038c74c752d 100644 Binary files a/examples/zips/audit.zip and b/examples/zips/audit.zip differ diff --git a/examples/zips/autoscaling.zip b/examples/zips/autoscaling.zip index 3a46997626e..bb8f524af2d 100644 Binary files a/examples/zips/autoscaling.zip and b/examples/zips/autoscaling.zip differ diff --git a/examples/zips/bastion.zip b/examples/zips/bastion.zip index 41e130c2250..4dcdaff844f 100644 Binary files a/examples/zips/bastion.zip and b/examples/zips/bastion.zip differ diff --git a/examples/zips/big_data_service.zip b/examples/zips/big_data_service.zip index 8793eb4e5a7..27fb5aeb8d1 100644 Binary files a/examples/zips/big_data_service.zip and b/examples/zips/big_data_service.zip differ diff --git a/examples/zips/blockchain.zip b/examples/zips/blockchain.zip index e23176c6a8d..2304a54584e 100644 Binary files a/examples/zips/blockchain.zip and b/examples/zips/blockchain.zip differ diff --git a/examples/zips/budget.zip b/examples/zips/budget.zip index 11ea2e73c16..14e84b19900 100644 Binary files a/examples/zips/budget.zip and b/examples/zips/budget.zip differ diff --git a/examples/zips/capacity_management.zip b/examples/zips/capacity_management.zip index aa84fc1fac3..91c80aeeea2 100644 Binary files a/examples/zips/capacity_management.zip and b/examples/zips/capacity_management.zip differ diff --git a/examples/zips/certificatesManagement.zip b/examples/zips/certificatesManagement.zip index 5e7ff623869..779bedcebf3 100644 Binary files a/examples/zips/certificatesManagement.zip and b/examples/zips/certificatesManagement.zip differ diff --git a/examples/zips/cloudBridge.zip b/examples/zips/cloudBridge.zip index 8ee631c6077..57939928729 100644 Binary files a/examples/zips/cloudBridge.zip and b/examples/zips/cloudBridge.zip differ diff --git a/examples/zips/cloudMigrations.zip b/examples/zips/cloudMigrations.zip index 6f3a80e2a6e..fa4848301ab 100644 Binary files a/examples/zips/cloudMigrations.zip and b/examples/zips/cloudMigrations.zip differ diff --git a/examples/zips/cloudguard.zip b/examples/zips/cloudguard.zip index b5f95f7597a..0232445a06b 100644 Binary files a/examples/zips/cloudguard.zip and b/examples/zips/cloudguard.zip differ diff --git a/examples/zips/cluster_placement_groups.zip b/examples/zips/cluster_placement_groups.zip index 38727d0d859..07052dbbd6e 100644 Binary files a/examples/zips/cluster_placement_groups.zip and b/examples/zips/cluster_placement_groups.zip differ diff --git a/examples/zips/compute.zip b/examples/zips/compute.zip index c0f26f5f634..8bcf638f626 100644 Binary files a/examples/zips/compute.zip and b/examples/zips/compute.zip differ diff --git a/examples/zips/computecloudatcustomer.zip b/examples/zips/computecloudatcustomer.zip index 6957dfb8c4b..7435912079d 100644 Binary files a/examples/zips/computecloudatcustomer.zip and b/examples/zips/computecloudatcustomer.zip differ diff --git a/examples/zips/computeinstanceagent.zip b/examples/zips/computeinstanceagent.zip index c05cf080663..e7872f9e35e 100644 Binary files a/examples/zips/computeinstanceagent.zip and b/examples/zips/computeinstanceagent.zip differ diff --git a/examples/zips/concepts.zip b/examples/zips/concepts.zip index 44f08491383..760f9f35fc0 100644 Binary files a/examples/zips/concepts.zip and b/examples/zips/concepts.zip differ diff --git a/examples/zips/container_engine.zip b/examples/zips/container_engine.zip index fe034a13ad1..0fe8d4304f9 100644 Binary files a/examples/zips/container_engine.zip and b/examples/zips/container_engine.zip differ diff --git a/examples/zips/container_instances.zip b/examples/zips/container_instances.zip index d993c3f9625..c8287a3731f 100644 Binary files a/examples/zips/container_instances.zip and b/examples/zips/container_instances.zip differ diff --git a/examples/zips/database.zip b/examples/zips/database.zip index 61ddb999f06..144d75d379b 100644 Binary files a/examples/zips/database.zip and b/examples/zips/database.zip differ diff --git a/examples/zips/databaseTools.zip b/examples/zips/databaseTools.zip index 91c60858aec..497a3a62824 100644 Binary files a/examples/zips/databaseTools.zip and b/examples/zips/databaseTools.zip differ diff --git a/examples/zips/databasemanagement.zip b/examples/zips/databasemanagement.zip index c0f159eb006..060b42cd8f3 100644 Binary files a/examples/zips/databasemanagement.zip and b/examples/zips/databasemanagement.zip differ diff --git a/examples/zips/databasemigration.zip b/examples/zips/databasemigration.zip index 44f50726f31..e10a72cb245 100644 Binary files a/examples/zips/databasemigration.zip and b/examples/zips/databasemigration.zip differ diff --git a/examples/zips/datacatalog.zip b/examples/zips/datacatalog.zip index 45e551879c8..8e82849e255 100644 Binary files a/examples/zips/datacatalog.zip and b/examples/zips/datacatalog.zip differ diff --git a/examples/zips/dataflow.zip b/examples/zips/dataflow.zip index 44b1cb5fd7f..9be5472a6e1 100644 Binary files a/examples/zips/dataflow.zip and b/examples/zips/dataflow.zip differ diff --git a/examples/zips/dataintegration.zip b/examples/zips/dataintegration.zip index f21387c6d6c..094792070cb 100644 Binary files a/examples/zips/dataintegration.zip and b/examples/zips/dataintegration.zip differ diff --git a/examples/zips/datalabeling.zip b/examples/zips/datalabeling.zip index 2426a48c4d0..507169dd082 100644 Binary files a/examples/zips/datalabeling.zip and b/examples/zips/datalabeling.zip differ diff --git a/examples/zips/datasafe.zip b/examples/zips/datasafe.zip index dd88ffadf48..cd0b348965b 100644 Binary files a/examples/zips/datasafe.zip and b/examples/zips/datasafe.zip differ diff --git a/examples/zips/datascience.zip b/examples/zips/datascience.zip index b8a1db248e7..eb5a52a89b7 100644 Binary files a/examples/zips/datascience.zip and b/examples/zips/datascience.zip differ diff --git a/examples/zips/demand_signal.zip b/examples/zips/demand_signal.zip index 1e3d748f55b..ae6ab8cb0b3 100644 Binary files a/examples/zips/demand_signal.zip and b/examples/zips/demand_signal.zip differ diff --git a/examples/zips/devops.zip b/examples/zips/devops.zip index 3e7b5cb7cc0..70fb8a9aaa3 100644 Binary files a/examples/zips/devops.zip and b/examples/zips/devops.zip differ diff --git a/examples/zips/disaster_recovery.zip b/examples/zips/disaster_recovery.zip index 61f5040a069..a0d71d5375d 100644 Binary files a/examples/zips/disaster_recovery.zip and b/examples/zips/disaster_recovery.zip differ diff --git a/examples/zips/dns.zip b/examples/zips/dns.zip index 2da62b562e8..0f141e4f0b9 100644 Binary files a/examples/zips/dns.zip and b/examples/zips/dns.zip differ diff --git a/examples/zips/em_warehouse.zip b/examples/zips/em_warehouse.zip index 5081cba44c3..272f22ff1dc 100644 Binary files a/examples/zips/em_warehouse.zip and b/examples/zips/em_warehouse.zip differ diff --git a/examples/zips/email.zip b/examples/zips/email.zip index ebad777498f..a6290c5b2cc 100644 Binary files a/examples/zips/email.zip and b/examples/zips/email.zip differ diff --git a/examples/zips/events.zip b/examples/zips/events.zip index 202937f18be..da64ad29e4a 100644 Binary files a/examples/zips/events.zip and b/examples/zips/events.zip differ diff --git a/examples/zips/fast_connect.zip b/examples/zips/fast_connect.zip index 2d8913abed7..595dff67fe8 100644 Binary files a/examples/zips/fast_connect.zip and b/examples/zips/fast_connect.zip differ diff --git a/examples/zips/functions.zip b/examples/zips/functions.zip index 94c2d169876..c01f0145a53 100644 Binary files a/examples/zips/functions.zip and b/examples/zips/functions.zip differ diff --git a/examples/zips/fusionapps.zip b/examples/zips/fusionapps.zip index 8843181837a..0c617e2f91d 100644 Binary files a/examples/zips/fusionapps.zip and b/examples/zips/fusionapps.zip differ diff --git a/examples/zips/generative_ai.zip b/examples/zips/generative_ai.zip index 9df9b2a7e80..efe8a98e9fb 100644 Binary files a/examples/zips/generative_ai.zip and b/examples/zips/generative_ai.zip differ diff --git a/examples/zips/goldengate.zip b/examples/zips/goldengate.zip index 3a6ab262155..9cf6dd2a80f 100644 Binary files a/examples/zips/goldengate.zip and b/examples/zips/goldengate.zip differ diff --git a/examples/zips/health_checks.zip b/examples/zips/health_checks.zip index b016600e9c5..1d2f9ed0e14 100644 Binary files a/examples/zips/health_checks.zip and b/examples/zips/health_checks.zip differ diff --git a/examples/zips/id6.zip b/examples/zips/id6.zip index 61e69f5a813..1fbca2b67bf 100644 Binary files a/examples/zips/id6.zip and b/examples/zips/id6.zip differ diff --git a/examples/zips/identity.zip b/examples/zips/identity.zip index f9f2d9e859f..a402b381b73 100644 Binary files a/examples/zips/identity.zip and b/examples/zips/identity.zip differ diff --git a/examples/zips/identity_data_plane.zip b/examples/zips/identity_data_plane.zip index e7de3d9a8dc..05186bfeb8f 100644 Binary files a/examples/zips/identity_data_plane.zip and b/examples/zips/identity_data_plane.zip differ diff --git a/examples/zips/identity_domains.zip b/examples/zips/identity_domains.zip index 408dbde52ec..51fe8ea86c7 100644 Binary files a/examples/zips/identity_domains.zip and b/examples/zips/identity_domains.zip differ diff --git a/examples/zips/integration.zip b/examples/zips/integration.zip index be351d2ce28..1b798461db0 100644 Binary files a/examples/zips/integration.zip and b/examples/zips/integration.zip differ diff --git a/examples/zips/jms.zip b/examples/zips/jms.zip index e05e3b409ff..b3ab55d8e1e 100644 Binary files a/examples/zips/jms.zip and b/examples/zips/jms.zip differ diff --git a/examples/zips/jms_java_downloads.zip b/examples/zips/jms_java_downloads.zip index 9cd64fbd881..0d8dd7badd8 100644 Binary files a/examples/zips/jms_java_downloads.zip and b/examples/zips/jms_java_downloads.zip differ diff --git a/examples/zips/kms.zip b/examples/zips/kms.zip index f5fd65422d6..80bb7640d85 100644 Binary files a/examples/zips/kms.zip and b/examples/zips/kms.zip differ diff --git a/examples/zips/license_manager.zip b/examples/zips/license_manager.zip index aa9ce22ad69..af95fcccbe3 100644 Binary files a/examples/zips/license_manager.zip and b/examples/zips/license_manager.zip differ diff --git a/examples/zips/limits.zip b/examples/zips/limits.zip index 6de70db641f..1b5b099dda9 100644 Binary files a/examples/zips/limits.zip and b/examples/zips/limits.zip differ diff --git a/examples/zips/load_balancer.zip b/examples/zips/load_balancer.zip index e9b11526a9b..0c56368cbea 100644 Binary files a/examples/zips/load_balancer.zip and b/examples/zips/load_balancer.zip differ diff --git a/examples/zips/log_analytics.zip b/examples/zips/log_analytics.zip index 217d25a014f..325d27c85f7 100644 Binary files a/examples/zips/log_analytics.zip and b/examples/zips/log_analytics.zip differ diff --git a/examples/zips/logging.zip b/examples/zips/logging.zip index 4663db5378f..c7f570613c9 100644 Binary files a/examples/zips/logging.zip and b/examples/zips/logging.zip differ diff --git a/examples/zips/management_agent.zip b/examples/zips/management_agent.zip index 8f487540ff1..964cc3b86f4 100644 Binary files a/examples/zips/management_agent.zip and b/examples/zips/management_agent.zip differ diff --git a/examples/zips/management_dashboard.zip b/examples/zips/management_dashboard.zip index 9e48347678b..4effedfc323 100644 Binary files a/examples/zips/management_dashboard.zip and b/examples/zips/management_dashboard.zip differ diff --git a/examples/zips/marketplace.zip b/examples/zips/marketplace.zip index 0035f68ffd1..34d926e43e1 100644 Binary files a/examples/zips/marketplace.zip and b/examples/zips/marketplace.zip differ diff --git a/examples/zips/media_services.zip b/examples/zips/media_services.zip index 97e508fd726..e39b021e452 100644 Binary files a/examples/zips/media_services.zip and b/examples/zips/media_services.zip differ diff --git a/examples/zips/metering_computation.zip b/examples/zips/metering_computation.zip index 1f7639cb4b0..1125d0cbc3d 100644 Binary files a/examples/zips/metering_computation.zip and b/examples/zips/metering_computation.zip differ diff --git a/examples/zips/monitoring.zip b/examples/zips/monitoring.zip index 6704209771a..731bd488fa6 100644 Binary files a/examples/zips/monitoring.zip and b/examples/zips/monitoring.zip differ diff --git a/examples/zips/mysql.zip b/examples/zips/mysql.zip index b67f4defe39..069088b08e2 100644 Binary files a/examples/zips/mysql.zip and b/examples/zips/mysql.zip differ diff --git a/examples/zips/network_firewall.zip b/examples/zips/network_firewall.zip index 9f5f7ce153f..760fa66c09e 100644 Binary files a/examples/zips/network_firewall.zip and b/examples/zips/network_firewall.zip differ diff --git a/examples/zips/network_load_balancer.zip b/examples/zips/network_load_balancer.zip index b21921662ee..bec26ae0c76 100644 Binary files a/examples/zips/network_load_balancer.zip and b/examples/zips/network_load_balancer.zip differ diff --git a/examples/zips/networking.zip b/examples/zips/networking.zip index 28461c66f1d..3073d3856dc 100644 Binary files a/examples/zips/networking.zip and b/examples/zips/networking.zip differ diff --git a/examples/zips/nosql.zip b/examples/zips/nosql.zip index dfa3d21cf37..5f9f5af1d12 100644 Binary files a/examples/zips/nosql.zip and b/examples/zips/nosql.zip differ diff --git a/examples/zips/notifications.zip b/examples/zips/notifications.zip index 6da5738d281..208878cf348 100644 Binary files a/examples/zips/notifications.zip and b/examples/zips/notifications.zip differ diff --git a/examples/zips/object_storage.zip b/examples/zips/object_storage.zip index a21bfc26451..1c1ed5576ae 100644 Binary files a/examples/zips/object_storage.zip and b/examples/zips/object_storage.zip differ diff --git a/examples/zips/ocvp.zip b/examples/zips/ocvp.zip index b150ffb23b9..b970964b9cd 100644 Binary files a/examples/zips/ocvp.zip and b/examples/zips/ocvp.zip differ diff --git a/examples/zips/onesubscription.zip b/examples/zips/onesubscription.zip index 8019b75986e..6145211c7aa 100644 Binary files a/examples/zips/onesubscription.zip and b/examples/zips/onesubscription.zip differ diff --git a/examples/zips/opa.zip b/examples/zips/opa.zip index 30b542638f3..9cea904abc4 100644 Binary files a/examples/zips/opa.zip and b/examples/zips/opa.zip differ diff --git a/examples/zips/opensearch.zip b/examples/zips/opensearch.zip index 9cdf0172cd3..e068d9f1a85 100644 Binary files a/examples/zips/opensearch.zip and b/examples/zips/opensearch.zip differ diff --git a/examples/zips/operator_access_control.zip b/examples/zips/operator_access_control.zip index beb10c6867d..a9ae3ee83b2 100644 Binary files a/examples/zips/operator_access_control.zip and b/examples/zips/operator_access_control.zip differ diff --git a/examples/zips/opsi.zip b/examples/zips/opsi.zip index 4e3688be446..3e3f5654d6f 100644 Binary files a/examples/zips/opsi.zip and b/examples/zips/opsi.zip differ diff --git a/examples/zips/optimizer.zip b/examples/zips/optimizer.zip index f913f9d03b2..9c81382baf3 100644 Binary files a/examples/zips/optimizer.zip and b/examples/zips/optimizer.zip differ diff --git a/examples/zips/oracle_cloud_vmware_solution.zip b/examples/zips/oracle_cloud_vmware_solution.zip index 89a2f7b1b64..f1fb08f0f8a 100644 Binary files a/examples/zips/oracle_cloud_vmware_solution.zip and b/examples/zips/oracle_cloud_vmware_solution.zip differ diff --git a/examples/zips/oracle_content_experience.zip b/examples/zips/oracle_content_experience.zip index 1c158494578..f54506a1e77 100644 Binary files a/examples/zips/oracle_content_experience.zip and b/examples/zips/oracle_content_experience.zip differ diff --git a/examples/zips/oracle_digital_assistant.zip b/examples/zips/oracle_digital_assistant.zip index 187cb3f3fc9..eac7060ad93 100644 Binary files a/examples/zips/oracle_digital_assistant.zip and b/examples/zips/oracle_digital_assistant.zip differ diff --git a/examples/zips/os_management_hub.zip b/examples/zips/os_management_hub.zip index 5954831fe09..b8ddf10992d 100644 Binary files a/examples/zips/os_management_hub.zip and b/examples/zips/os_management_hub.zip differ diff --git a/examples/zips/osmanagement.zip b/examples/zips/osmanagement.zip index 48690438c9d..0aed09b81d3 100644 Binary files a/examples/zips/osmanagement.zip and b/examples/zips/osmanagement.zip differ diff --git a/examples/zips/osp_gateway.zip b/examples/zips/osp_gateway.zip index d848fa1cef2..9564f5f1c22 100644 Binary files a/examples/zips/osp_gateway.zip and b/examples/zips/osp_gateway.zip differ diff --git a/examples/zips/osub_billing_schedule.zip b/examples/zips/osub_billing_schedule.zip index fc930b22898..1616e5d0b77 100644 Binary files a/examples/zips/osub_billing_schedule.zip and b/examples/zips/osub_billing_schedule.zip differ diff --git a/examples/zips/osub_organization_subscription.zip b/examples/zips/osub_organization_subscription.zip index 62c24ed26fb..8a5d1ae370b 100644 Binary files a/examples/zips/osub_organization_subscription.zip and b/examples/zips/osub_organization_subscription.zip differ diff --git a/examples/zips/osub_subscription.zip b/examples/zips/osub_subscription.zip index 0d64f1b239c..8fef8b3e6a1 100644 Binary files a/examples/zips/osub_subscription.zip and b/examples/zips/osub_subscription.zip differ diff --git a/examples/zips/osub_usage.zip b/examples/zips/osub_usage.zip index 38bc8caf6e3..4ae82b49b12 100644 Binary files a/examples/zips/osub_usage.zip and b/examples/zips/osub_usage.zip differ diff --git a/examples/zips/pic.zip b/examples/zips/pic.zip index e0957b3688d..85c88101208 100644 Binary files a/examples/zips/pic.zip and b/examples/zips/pic.zip differ diff --git a/examples/zips/psql.zip b/examples/zips/psql.zip index 4425ca19fb2..ad137d8014b 100644 Binary files a/examples/zips/psql.zip and b/examples/zips/psql.zip differ diff --git a/examples/zips/queue.zip b/examples/zips/queue.zip index 6ba6c6fa841..59826631c27 100644 Binary files a/examples/zips/queue.zip and b/examples/zips/queue.zip differ diff --git a/examples/zips/recovery.zip b/examples/zips/recovery.zip index 0c6628b5dc1..6ec54ce6b30 100644 Binary files a/examples/zips/recovery.zip and b/examples/zips/recovery.zip differ diff --git a/examples/zips/redis.zip b/examples/zips/redis.zip index 2e9094f39e4..9d0614429fe 100644 Binary files a/examples/zips/redis.zip and b/examples/zips/redis.zip differ diff --git a/examples/zips/resourcemanager.zip b/examples/zips/resourcemanager.zip index 0ce97e32629..1a69af566aa 100644 Binary files a/examples/zips/resourcemanager.zip and b/examples/zips/resourcemanager.zip differ diff --git a/examples/zips/resourcescheduler.zip b/examples/zips/resourcescheduler.zip index 4b148da2aa0..526449f99d6 100644 Binary files a/examples/zips/resourcescheduler.zip and b/examples/zips/resourcescheduler.zip differ diff --git a/examples/zips/serviceManagerProxy.zip b/examples/zips/serviceManagerProxy.zip index 9558e24730e..ed9d11f3553 100644 Binary files a/examples/zips/serviceManagerProxy.zip and b/examples/zips/serviceManagerProxy.zip differ diff --git a/examples/zips/service_catalog.zip b/examples/zips/service_catalog.zip index c37cc2cc2a6..4c5b6140d3a 100644 Binary files a/examples/zips/service_catalog.zip and b/examples/zips/service_catalog.zip differ diff --git a/examples/zips/service_connector_hub.zip b/examples/zips/service_connector_hub.zip index d55afa49858..63a7c413ecb 100644 Binary files a/examples/zips/service_connector_hub.zip and b/examples/zips/service_connector_hub.zip differ diff --git a/examples/zips/service_mesh.zip b/examples/zips/service_mesh.zip index 1a7ec4a716a..cf0af7f42e2 100644 Binary files a/examples/zips/service_mesh.zip and b/examples/zips/service_mesh.zip differ diff --git a/examples/zips/stack_monitoring.zip b/examples/zips/stack_monitoring.zip index b2b4630d575..3bef7c3eab3 100644 Binary files a/examples/zips/stack_monitoring.zip and b/examples/zips/stack_monitoring.zip differ diff --git a/examples/zips/storage.zip b/examples/zips/storage.zip index 8b5c05c16b1..e94ba293c04 100644 Binary files a/examples/zips/storage.zip and b/examples/zips/storage.zip differ diff --git a/examples/zips/streaming.zip b/examples/zips/streaming.zip index 0201a980695..5b448c68474 100644 Binary files a/examples/zips/streaming.zip and b/examples/zips/streaming.zip differ diff --git a/examples/zips/usage_proxy.zip b/examples/zips/usage_proxy.zip index c4ca44afb5c..e3acd91208a 100644 Binary files a/examples/zips/usage_proxy.zip and b/examples/zips/usage_proxy.zip differ diff --git a/examples/zips/vault_secret.zip b/examples/zips/vault_secret.zip index c10e68b8873..d2fa6e8305e 100644 Binary files a/examples/zips/vault_secret.zip and b/examples/zips/vault_secret.zip differ diff --git a/examples/zips/vbs_inst.zip b/examples/zips/vbs_inst.zip index 585d17ab815..4ee515853ae 100644 Binary files a/examples/zips/vbs_inst.zip and b/examples/zips/vbs_inst.zip differ diff --git a/examples/zips/visual_builder.zip b/examples/zips/visual_builder.zip index 25926282dca..9d02487bb50 100644 Binary files a/examples/zips/visual_builder.zip and b/examples/zips/visual_builder.zip differ diff --git a/examples/zips/vn_monitoring.zip b/examples/zips/vn_monitoring.zip index 24442b206c9..4739f9edee1 100644 Binary files a/examples/zips/vn_monitoring.zip and b/examples/zips/vn_monitoring.zip differ diff --git a/examples/zips/vulnerability_scanning_service.zip b/examples/zips/vulnerability_scanning_service.zip index 2eeed2459a1..4f2c65c8e1a 100644 Binary files a/examples/zips/vulnerability_scanning_service.zip and b/examples/zips/vulnerability_scanning_service.zip differ diff --git a/examples/zips/web_app_acceleration.zip b/examples/zips/web_app_acceleration.zip index ea18890c504..77a27da46fd 100644 Binary files a/examples/zips/web_app_acceleration.zip and b/examples/zips/web_app_acceleration.zip differ diff --git a/examples/zips/web_app_firewall.zip b/examples/zips/web_app_firewall.zip index d317fdc8b36..4211abd1b2d 100644 Binary files a/examples/zips/web_app_firewall.zip and b/examples/zips/web_app_firewall.zip differ diff --git a/examples/zips/web_application_acceleration_and_security.zip b/examples/zips/web_application_acceleration_and_security.zip index 10934b745f3..554b1826281 100644 Binary files a/examples/zips/web_application_acceleration_and_security.zip and b/examples/zips/web_application_acceleration_and_security.zip differ diff --git a/go.mod b/go.mod index cdf6cfe445b..051c25e2897 100644 --- a/go.mod +++ b/go.mod @@ -52,7 +52,7 @@ require ( github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/oklog/run v1.0.0 // indirect - github.com/oracle/oci-go-sdk/v65 v65.69.0 + github.com/oracle/oci-go-sdk/v65 v65.69.1 github.com/pmezard/go-difflib v1.0.0 // indirect github.com/sony/gobreaker v0.5.0 // indirect github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect diff --git a/go.sum b/go.sum index 782fd12154f..55d774ab9a8 100644 --- a/go.sum +++ b/go.sum @@ -140,8 +140,8 @@ github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/oracle/oci-go-sdk/v65 v65.69.0 h1:DbrRf5qcpwl7V3ixk6dxDYfHtOs3aMmlsHFld3oBjMk= -github.com/oracle/oci-go-sdk/v65 v65.69.0/go.mod h1:IBEV9l1qBzUpo7zgGaRUhbB05BVfcDGYRFBCPlTcPp0= +github.com/oracle/oci-go-sdk/v65 v65.69.1 h1:X3vNSw9tXOxML96L3wBxrK7cwESgP/H1IgR8rTH5Ab4= +github.com/oracle/oci-go-sdk/v65 v65.69.1/go.mod h1:IBEV9l1qBzUpo7zgGaRUhbB05BVfcDGYRFBCPlTcPp0= github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= diff --git a/internal/globalvar/version.go b/internal/globalvar/version.go index 05b9874b125..d4cf204fe30 100644 --- a/internal/globalvar/version.go +++ b/internal/globalvar/version.go @@ -7,8 +7,8 @@ import ( "log" ) -const Version = "6.1.0" -const ReleaseDate = "2024-07-03" +const Version = "6.2.0" +const ReleaseDate = "2024-07-10" func PrintVersion() { log.Printf("[INFO] terraform-provider-oci %s\n", Version) diff --git a/internal/integrationtest/core_instance_test.go b/internal/integrationtest/core_instance_test.go index de0d3fd2187..b869851da74 100644 --- a/internal/integrationtest/core_instance_test.go +++ b/internal/integrationtest/core_instance_test.go @@ -331,8 +331,12 @@ var ( "source_type": acctest.Representation{RepType: acctest.Required, Create: `bootVolume`}, "is_preserve_boot_volume_enabled": acctest.Representation{RepType: acctest.Optional, Create: `false`}, } - CoreInstanceSourceDetailsUpdateImageIdRepresentation = map[string]interface{}{ - "source_id": acctest.Representation{RepType: acctest.Required, Create: `${var.InstanceImageOCIDShieldedCompatible[var.region]}`}, + CoreInstanceSourceDetailsUpdateImageIdRequiredRepresentation = map[string]interface{}{ + "source_id": acctest.Representation{RepType: acctest.Required, Create: `${var.InstanceImageOCIDShieldedCompatible[var.region]}`}, + "source_type": acctest.Representation{RepType: acctest.Required, Create: `image`}, + } + CoreInstanceSourceDetailsUpdateImageIdOptionalRepresentation = map[string]interface{}{ + "source_id": acctest.Representation{RepType: acctest.Required, Create: `${var.InstanceImageOCID[var.region]}`}, "source_type": acctest.Representation{RepType: acctest.Required, Create: `image`}, "is_preserve_boot_volume_enabled": acctest.Representation{RepType: acctest.Optional, Create: `false`}, "kms_key_id": acctest.Representation{RepType: acctest.Optional, Create: `${lookup(data.oci_kms_keys.test_keys_dependency.keys[0], "id")}`}, @@ -2896,6 +2900,7 @@ func TestAccResourceCoreInstance_UpdateSourceDetails(t *testing.T) { config := ` provider oci { + alias = "boot-volume-replacement" test_time_maintenance_reboot_due = "2030-01-01 00:00:00" } ` + acctest.CommonTestVariables() @@ -2918,7 +2923,11 @@ func TestAccResourceCoreInstance_UpdateSourceDetails(t *testing.T) { { Config: acctest.ProviderTestConfig() + compartmentIdVariableStr + CoreInstanceBootVolumeSwapResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_core_instance", "test_instance", acctest.Optional, acctest.Create, - acctest.RepresentationCopyWithRemovedProperties(CoreInstanceRepresentation, []string{"dedicated_vm_host_id", "launch_options", "image"})), + acctest.RepresentationCopyWithRemovedProperties( + // SourceDetails w/o kms_key + acctest.GetUpdatedRepresentationCopy("source_details", acctest.RepresentationGroup{RepType: acctest.Required, + Group: instanceSourceDetailsSansKmsRepresentation}, CoreInstanceRepresentation), + []string{"dedicated_vm_host_id", "launch_options", "image"})), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttrSet(resourceName, "availability_domain"), resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), @@ -2936,13 +2945,43 @@ func TestAccResourceCoreInstance_UpdateSourceDetails(t *testing.T) { ), }, - // Step 1: verify updates to existing source_details property does not destroy the resource - Update the imageId associated with source details + // Step 1: verify updates to existing source_details property does not destroy the resource - Update only imageId associated with source details { Config: config + compartmentIdVariableStr + CoreInstanceBootVolumeSwapResourceDependencies + utils.DefinedShieldedImageOCIDs + acctest.GenerateResourceFromRepresentationMap("oci_core_instance", "test_instance", acctest.Optional, acctest.Create, acctest.RepresentationCopyWithRemovedProperties( - acctest.GetUpdatedRepresentationCopy("source_details", acctest.RepresentationGroup{RepType: acctest.Optional, Group: CoreInstanceSourceDetailsUpdateImageIdRepresentation}, - CoreInstanceRepresentation), + // Updating source_details with only required properties + acctest.GetUpdatedRepresentationCopy("source_details", acctest.RepresentationGroup{RepType: acctest.Required, + Group: CoreInstanceSourceDetailsUpdateImageIdRequiredRepresentation}, CoreInstanceRepresentation), + []string{"dedicated_vm_host_id", "launch_options", "image"})), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttrSet(resourceName, "availability_domain"), + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(resourceName, "shape", "VM.Standard2.1"), + resource.TestCheckResourceAttrSet(resourceName, "subnet_id"), + resource.TestCheckResourceAttr(resourceName, "source_details.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "source_details.0.source_id"), + resource.TestCheckResourceAttr(resourceName, "source_details.0.source_type", "image"), + resource.TestCheckResourceAttr(resourceName, "source_details.0.boot_volume_size_in_gbs", "60"), + + func(s *terraform.State) (err error) { + resId2, err = acctest.FromInstanceState(s, resourceName, "id") + if resId != resId2 { + return fmt.Errorf("Resource recreated when it was supposed to be updated.") + } + return err + }, + ), + }, + + // Step 2: verify updates to all optional properties associated with source_details - kmsKey, bootVolumeSize etc. + { + Config: config + compartmentIdVariableStr + CoreInstanceBootVolumeSwapResourceDependencies + utils.DefinedShieldedImageOCIDs + + acctest.GenerateResourceFromRepresentationMap("oci_core_instance", "test_instance", acctest.Optional, acctest.Create, + acctest.RepresentationCopyWithRemovedProperties( + // Updating source_details with only required properties + acctest.GetUpdatedRepresentationCopy("source_details", acctest.RepresentationGroup{RepType: acctest.Optional, + Group: CoreInstanceSourceDetailsUpdateImageIdOptionalRepresentation}, CoreInstanceRepresentation), []string{"dedicated_vm_host_id", "launch_options", "image"})), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttrSet(resourceName, "availability_domain"), @@ -2965,7 +3004,7 @@ func TestAccResourceCoreInstance_UpdateSourceDetails(t *testing.T) { ), }, - // Step 2: verify updates to existing source_details property does not destroy the resource - Update the bootVolumeId associated with the source details + // Step 3: verify updates to existing source_details property does not destroy the resource - Update the bootVolumeId associated with the source details { Config: config + compartmentIdVariableStr + CoreInstanceBootVolumeSwapResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_core_instance", "test_instance", acctest.Optional, acctest.Create, diff --git a/internal/integrationtest/database_migration_migration_test.go b/internal/integrationtest/database_migration_migration_test.go index d0c0281752c..c197bb09271 100644 --- a/internal/integrationtest/database_migration_migration_test.go +++ b/internal/integrationtest/database_migration_migration_test.go @@ -1,5 +1,5 @@ -// // Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. -// // Licensed under the Mozilla Public License v2.0 +// // // Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +// // // Licensed under the Mozilla Public License v2.0 package integrationtest import ( @@ -40,6 +40,23 @@ var ( } DatabaseMigrationMigrationRepresentation = map[string]interface{}{ + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "database_combination": acctest.Representation{RepType: acctest.Required, Create: `ORACLE`}, + "source_database_connection_id": acctest.Representation{RepType: acctest.Required, Create: `${var.source_connection_oracle_id}`}, + "target_database_connection_id": acctest.Representation{RepType: acctest.Required, Create: `${var.target_connection_oracle_id}`}, + "type": acctest.Representation{RepType: acctest.Required, Create: `ONLINE`, Update: `OFFLINE`}, + "advanced_parameters": acctest.RepresentationGroup{RepType: acctest.Optional, Group: DatabaseMigrationMigrationAdvancedParametersRepresentation}, + "advisor_settings": acctest.RepresentationGroup{RepType: acctest.Optional, Group: DatabaseMigrationMigrationAdvisorSettingsRepresentation}, + "bulk_include_exclude_data": acctest.Representation{RepType: acctest.Optional, Create: `bulkIncludeExcludeData`}, + "data_transfer_medium_details": acctest.RepresentationGroup{RepType: acctest.Optional, Group: DatabaseMigrationMigrationDataTransferMediumDetailsRepresentation}, + "description": acctest.Representation{RepType: acctest.Optional, Create: `description`, Update: `description2`}, + "display_name": acctest.Representation{RepType: acctest.Required, Create: `displayName`, Update: `displayName2`}, + "include_objects": acctest.RepresentationGroup{RepType: acctest.Optional, Group: DatabaseMigrationMigrationIncludeObjectsRepresentation}, + "initial_load_settings": acctest.RepresentationGroup{RepType: acctest.Optional, Group: DatabaseMigrationMigrationInitialLoadSettingsOracleRepresentation}, + "source_container_database_connection_id": acctest.Representation{RepType: acctest.Required, Create: `${var.source_connection_container_oracle_id}`}, + } + + DatabaseMigrationMigrationRepresentationMySQL = map[string]interface{}{ "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, "database_combination": acctest.Representation{RepType: acctest.Required, Create: `MYSQL`}, "source_database_connection_id": acctest.Representation{RepType: acctest.Required, Create: `${var.source_connection_mysql_id}`}, @@ -54,7 +71,11 @@ var ( "include_objects": acctest.RepresentationGroup{RepType: acctest.Optional, Group: DatabaseMigrationMigrationIncludeObjectsRepresentation}, "initial_load_settings": acctest.RepresentationGroup{RepType: acctest.Optional, Group: DatabaseMigrationMigrationInitialLoadSettingsRepresentation}, } - + DatabaseMigrationMigrationAdvancedParametersRepresentation = map[string]interface{}{ + "data_type": acctest.Representation{RepType: acctest.Required, Create: `STRING`, Update: `INTEGER`}, + "name": acctest.Representation{RepType: acctest.Required, Create: `DATAPUMPSETTINGS_METADATAONLY`, Update: `DATAPUMPSETTINGS_DUMPFILESIZE`}, + "value": acctest.Representation{RepType: acctest.Required, Create: `True`, Update: `5000`}, + } DatabaseMigrationMigrationAdvisorSettingsRepresentation = map[string]interface{}{ "is_ignore_errors": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `true`}, "is_skip_advisor": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `true`}, @@ -64,11 +85,11 @@ var ( "object_storage_bucket": acctest.RepresentationGroup{RepType: acctest.Optional, Group: DatabaseMigrationMigrationDataTransferMediumDetailsObjectStorageBucketRepresentation}, } DatabaseMigrationMigrationExcludeObjectsRepresentation = map[string]interface{}{ - "object": acctest.Representation{RepType: acctest.Required, Create: `object`}, + "object": acctest.Representation{RepType: acctest.Required, Create: `.*`}, "is_omit_excluded_table_from_replication": acctest.Representation{RepType: acctest.Optional, Create: `false`}, "owner": acctest.Representation{RepType: acctest.Optional, Create: `owner`}, "schema": acctest.Representation{RepType: acctest.Optional, Create: `schema`}, - "type": acctest.Representation{RepType: acctest.Optional, Create: `type`}, + "type": acctest.Representation{RepType: acctest.Optional, Create: `ALL`}, } DatabaseMigrationMigrationGgsDetailsRepresentation = map[string]interface{}{ "acceptable_lag": acctest.Representation{RepType: acctest.Optional, Create: `10`, Update: `11`}, @@ -84,11 +105,11 @@ var ( "replicat": acctest.RepresentationGroup{RepType: acctest.Optional, Group: DatabaseMigrationMigrationHubDetailsReplicatRepresentation}, } DatabaseMigrationMigrationIncludeObjectsRepresentation = map[string]interface{}{ - "object": acctest.Representation{RepType: acctest.Required, Create: `object`}, + "object": acctest.Representation{RepType: acctest.Required, Create: `.*`}, "is_omit_excluded_table_from_replication": acctest.Representation{RepType: acctest.Optional, Create: `false`}, "owner": acctest.Representation{RepType: acctest.Optional, Create: `owner`}, "schema": acctest.Representation{RepType: acctest.Optional, Create: `schema`}, - "type": acctest.Representation{RepType: acctest.Optional, Create: `type`}, + "type": acctest.Representation{RepType: acctest.Optional, Create: `ALL`}, } DatabaseMigrationMigrationInitialLoadSettingsRepresentation = map[string]interface{}{ "job_mode": acctest.Representation{RepType: acctest.Required, Create: `FULL`, Update: `SCHEMA`}, @@ -97,6 +118,11 @@ var ( "is_ignore_existing_objects": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `true`}, "is_tz_utc": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `true`}, } + DatabaseMigrationMigrationInitialLoadSettingsOracleRepresentation = map[string]interface{}{ + "job_mode": acctest.Representation{RepType: acctest.Required, Create: `SCHEMA`, Update: `SCHEMA`}, + "data_pump_parameters": acctest.RepresentationGroup{RepType: acctest.Optional, Group: DatabaseMigrationMigrationInitialLoadSettingsDataPumpParametersRepresentation}, + "export_directory_object": acctest.RepresentationGroup{RepType: acctest.Optional, Group: DatabaseMigrationMigrationInitialLoadSettingsExportDirectoryObjectRepresentation}, + } DatabaseMigrationMigrationDataTransferMediumDetailsObjectStorageBucketRepresentation = map[string]interface{}{ "bucket": acctest.Representation{RepType: acctest.Optional, Create: `${var.bucket_mysql_id}`, Update: `${var.bucket_mysql_id}`}, "namespace": acctest.Representation{RepType: acctest.Optional, Create: `namespace`, Update: `namespace2`}, @@ -131,7 +157,6 @@ var ( } DatabaseMigrationMigrationInitialLoadSettingsDataPumpParametersRepresentation = map[string]interface{}{ "estimate": acctest.Representation{RepType: acctest.Optional, Create: `BLOCKS`, Update: `STATISTICS`}, - "exclude_parameters": acctest.Representation{RepType: acctest.Optional, Create: []string{`excludeParameters`}, Update: []string{`excludeParameters2`}}, "export_parallelism_degree": acctest.Representation{RepType: acctest.Optional, Create: `10`, Update: `11`}, "import_parallelism_degree": acctest.Representation{RepType: acctest.Optional, Create: `10`, Update: `11`}, "is_cluster": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `true`}, @@ -139,7 +164,7 @@ var ( } DatabaseMigrationMigrationInitialLoadSettingsExportDirectoryObjectRepresentation = map[string]interface{}{ "name": acctest.Representation{RepType: acctest.Optional, Create: `name`, Update: `name2`}, - "path": acctest.Representation{RepType: acctest.Optional, Create: `path`, Update: `path2`}, + "path": acctest.Representation{RepType: acctest.Optional, Create: `/u01/app/oracle/dumpdir`, Update: `/u01/app/oracle/dumpdir2`}, } DatabaseMigrationMigrationInitialLoadSettingsImportDirectoryObjectRepresentation = map[string]interface{}{ "name": acctest.Representation{RepType: acctest.Optional, Create: `name`, Update: `name2`}, @@ -185,6 +210,15 @@ func TestDatabaseMigrationMigrationResource_basic(t *testing.T) { targetConnectionId := utils.GetEnvSettingWithBlankDefault("target_connection_mysql_id") targetConnectionIdVariableStr := fmt.Sprintf("variable \"target_connection_mysql_id\" { default = \"%s\" }\n", targetConnectionId) + sourceConnectionOracleId := utils.GetEnvSettingWithBlankDefault("source_connection_oracle_id") + sourceConnectionOracleIdVariableStr := fmt.Sprintf("variable \"source_connection_oracle_id\" { default = \"%s\" }\n", sourceConnectionOracleId) + + sourceConnectionContainerOracleId := utils.GetEnvSettingWithBlankDefault("source_connection_container_oracle_id") + sourceConnectionContainerOracleIdVariableStr := fmt.Sprintf("variable \"source_connection_container_oracle_id\" { default = \"%s\" }\n", sourceConnectionContainerOracleId) + + targetConnectionOracleId := utils.GetEnvSettingWithBlankDefault("target_connection_oracle_id") + targetConnectionOracleIdVariableStr := fmt.Sprintf("variable \"target_connection_oracle_id\" { default = \"%s\" }\n", targetConnectionOracleId) + bucketId := utils.GetEnvSettingWithBlankDefault("bucket_mysql_id") bucketIdVariableStr := fmt.Sprintf("variable \"bucket_mysql_id\" { default = \"%s\" }\n", bucketId) @@ -194,17 +228,17 @@ func TestDatabaseMigrationMigrationResource_basic(t *testing.T) { var resId, resId2 string // Save TF content to Create resource with optional properties. This has to be exactly the same as the config part in the "create with optionals" step in the test. - acctest.SaveConfigContent(config+compartmentIdVariableStr+kmsKeyIdVariableStr+kmsVaultIdVariableStr+sourceConnectionIdVariableStr+targetConnectionIdVariableStr+bucketIdVariableStr+ + acctest.SaveConfigContent(config+compartmentIdVariableStr+kmsKeyIdVariableStr+kmsVaultIdVariableStr+sourceConnectionIdVariableStr+targetConnectionIdVariableStr+bucketIdVariableStr+sourceConnectionOracleIdVariableStr+sourceConnectionContainerOracleIdVariableStr+targetConnectionOracleIdVariableStr+ acctest.GenerateResourceFromRepresentationMap("oci_database_migration_migration", "test_migration", acctest.Optional, acctest.Create, DatabaseMigrationMigrationRepresentation), "databasemigration", "migration", t) acctest.ResourceTest(t, testAccCheckDatabaseMigrationMigrationDestroy, []resource.TestStep{ // verify Create { - Config: config + compartmentIdVariableStr + kmsKeyIdVariableStr + kmsVaultIdVariableStr + sourceConnectionIdVariableStr + targetConnectionIdVariableStr + bucketIdVariableStr + + Config: config + compartmentIdVariableStr + kmsKeyIdVariableStr + kmsVaultIdVariableStr + sourceConnectionIdVariableStr + targetConnectionIdVariableStr + bucketIdVariableStr + sourceConnectionOracleIdVariableStr + sourceConnectionContainerOracleIdVariableStr + targetConnectionOracleIdVariableStr + acctest.GenerateResourceFromRepresentationMap("oci_database_migration_migration", "test_migration", acctest.Required, acctest.Create, DatabaseMigrationMigrationRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), - resource.TestCheckResourceAttr(resourceName, "database_combination", "MYSQL"), + resource.TestCheckResourceAttr(resourceName, "database_combination", "ORACLE"), resource.TestCheckResourceAttrSet(resourceName, "source_database_connection_id"), resource.TestCheckResourceAttrSet(resourceName, "target_database_connection_id"), resource.TestCheckResourceAttr(resourceName, "type", "ONLINE"), @@ -221,9 +255,13 @@ func TestDatabaseMigrationMigrationResource_basic(t *testing.T) { }, // verify Create with optionals { - Config: config + compartmentIdVariableStr + kmsKeyIdVariableStr + kmsVaultIdVariableStr + sourceConnectionIdVariableStr + targetConnectionIdVariableStr + bucketIdVariableStr + + Config: config + compartmentIdVariableStr + kmsKeyIdVariableStr + kmsVaultIdVariableStr + sourceConnectionIdVariableStr + targetConnectionIdVariableStr + bucketIdVariableStr + sourceConnectionOracleIdVariableStr + sourceConnectionContainerOracleIdVariableStr + targetConnectionOracleIdVariableStr + acctest.GenerateResourceFromRepresentationMap("oci_database_migration_migration", "test_migration", acctest.Optional, acctest.Create, DatabaseMigrationMigrationRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "advanced_parameters.#", "1"), + resource.TestCheckResourceAttr(resourceName, "advanced_parameters.0.data_type", "STRING"), + resource.TestCheckResourceAttr(resourceName, "advanced_parameters.0.name", "DATAPUMPSETTINGS_METADATAONLY"), + resource.TestCheckResourceAttr(resourceName, "advanced_parameters.0.value", "True"), resource.TestCheckResourceAttr(resourceName, "advisor_settings.#", "1"), resource.TestCheckResourceAttr(resourceName, "advisor_settings.0.is_ignore_errors", "false"), resource.TestCheckResourceAttr(resourceName, "advisor_settings.0.is_skip_advisor", "false"), @@ -233,25 +271,21 @@ func TestDatabaseMigrationMigrationResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "data_transfer_medium_details.0.object_storage_bucket.#", "1"), resource.TestCheckResourceAttr(resourceName, "data_transfer_medium_details.0.object_storage_bucket.0.namespace", "namespace"), resource.TestCheckResourceAttr(resourceName, "data_transfer_medium_details.0.type", "OBJECT_STORAGE"), - resource.TestCheckResourceAttr(resourceName, "database_combination", "MYSQL"), + resource.TestCheckResourceAttr(resourceName, "database_combination", "ORACLE"), resource.TestCheckResourceAttr(resourceName, "description", "description"), resource.TestCheckResourceAttr(resourceName, "display_name", "displayName"), - resource.TestCheckResourceAttr(resourceName, "exclude_objects.#", "1"), - acctest.CheckResourceSetContainsElementWithProperties(resourceName, "exclude_objects", map[string]string{ - "is_omit_excluded_table_from_replication": "false", - "object": "object", - "owner": "owner", - "schema": "schema", - "type": "type", - }, - []string{}), resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "initial_load_settings.#", "1"), + resource.TestCheckResourceAttr(resourceName, "initial_load_settings.0.is_consistent", "false"), + resource.TestCheckResourceAttr(resourceName, "initial_load_settings.0.is_ignore_existing_objects", "false"), + resource.TestCheckResourceAttr(resourceName, "initial_load_settings.0.is_tz_utc", "false"), + resource.TestCheckResourceAttr(resourceName, "initial_load_settings.0.job_mode", "SCHEMA"), resource.TestCheckResourceAttr(resourceName, "include_objects.#", "1"), resource.TestCheckResourceAttr(resourceName, "include_objects.0.is_omit_excluded_table_from_replication", "false"), - resource.TestCheckResourceAttr(resourceName, "include_objects.0.object", "object"), + resource.TestCheckResourceAttr(resourceName, "include_objects.0.object", ".*"), resource.TestCheckResourceAttr(resourceName, "include_objects.0.owner", "owner"), resource.TestCheckResourceAttr(resourceName, "include_objects.0.schema", "schema"), - resource.TestCheckResourceAttr(resourceName, "include_objects.0.type", "type"), + resource.TestCheckResourceAttr(resourceName, "include_objects.0.type", "ALL"), resource.TestCheckResourceAttrSet(resourceName, "source_database_connection_id"), resource.TestCheckResourceAttrSet(resourceName, "state"), resource.TestCheckResourceAttrSet(resourceName, "target_database_connection_id"), @@ -268,12 +302,16 @@ func TestDatabaseMigrationMigrationResource_basic(t *testing.T) { // verify Update to the compartment (the compartment will be switched back in the next step) { - Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + kmsKeyIdVariableStr + kmsVaultIdVariableStr + sourceConnectionIdVariableStr + targetConnectionIdVariableStr + bucketIdVariableStr + + Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + kmsKeyIdVariableStr + kmsVaultIdVariableStr + sourceConnectionIdVariableStr + targetConnectionIdVariableStr + bucketIdVariableStr + sourceConnectionOracleIdVariableStr + sourceConnectionContainerOracleIdVariableStr + targetConnectionOracleIdVariableStr + acctest.GenerateResourceFromRepresentationMap("oci_database_migration_migration", "test_migration", acctest.Optional, acctest.Create, acctest.RepresentationCopyWithNewProperties(DatabaseMigrationMigrationRepresentation, map[string]interface{}{ "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id_for_update}`}, })), Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "advanced_parameters.#", "1"), + resource.TestCheckResourceAttr(resourceName, "advanced_parameters.0.data_type", "STRING"), + resource.TestCheckResourceAttr(resourceName, "advanced_parameters.0.name", "DATAPUMPSETTINGS_METADATAONLY"), + resource.TestCheckResourceAttr(resourceName, "advanced_parameters.0.value", "True"), resource.TestCheckResourceAttr(resourceName, "advisor_settings.#", "1"), resource.TestCheckResourceAttr(resourceName, "advisor_settings.0.is_ignore_errors", "false"), resource.TestCheckResourceAttr(resourceName, "advisor_settings.0.is_skip_advisor", "false"), @@ -283,31 +321,22 @@ func TestDatabaseMigrationMigrationResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "data_transfer_medium_details.0.object_storage_bucket.#", "1"), resource.TestCheckResourceAttr(resourceName, "data_transfer_medium_details.0.object_storage_bucket.0.namespace", "namespace"), resource.TestCheckResourceAttr(resourceName, "data_transfer_medium_details.0.type", "OBJECT_STORAGE"), - resource.TestCheckResourceAttr(resourceName, "database_combination", "MYSQL"), + resource.TestCheckResourceAttr(resourceName, "database_combination", "ORACLE"), resource.TestCheckResourceAttr(resourceName, "description", "description"), resource.TestCheckResourceAttr(resourceName, "display_name", "displayName"), - resource.TestCheckResourceAttr(resourceName, "exclude_objects.#", "1"), - acctest.CheckResourceSetContainsElementWithProperties(resourceName, "exclude_objects", map[string]string{ - "is_omit_excluded_table_from_replication": "false", - "object": "object", - "owner": "owner", - "schema": "schema", - "type": "type", - }, - []string{}), resource.TestCheckResourceAttrSet(resourceName, "id"), resource.TestCheckResourceAttr(resourceName, "include_objects.#", "1"), resource.TestCheckResourceAttr(resourceName, "include_objects.0.is_omit_excluded_table_from_replication", "false"), - resource.TestCheckResourceAttr(resourceName, "include_objects.0.object", "object"), + resource.TestCheckResourceAttr(resourceName, "include_objects.0.object", ".*"), resource.TestCheckResourceAttr(resourceName, "include_objects.0.owner", "owner"), resource.TestCheckResourceAttr(resourceName, "include_objects.0.schema", "schema"), - resource.TestCheckResourceAttr(resourceName, "include_objects.0.type", "type"), + resource.TestCheckResourceAttr(resourceName, "include_objects.0.type", "ALL"), resource.TestCheckResourceAttr(resourceName, "initial_load_settings.#", "1"), - resource.TestCheckResourceAttr(resourceName, "initial_load_settings.0.handle_grant_errors", "ABORT"), + resource.TestCheckResourceAttr(resourceName, "initial_load_settings.0.is_consistent", "false"), resource.TestCheckResourceAttr(resourceName, "initial_load_settings.0.is_ignore_existing_objects", "false"), resource.TestCheckResourceAttr(resourceName, "initial_load_settings.0.is_tz_utc", "false"), - resource.TestCheckResourceAttr(resourceName, "initial_load_settings.0.job_mode", "FULL"), + resource.TestCheckResourceAttr(resourceName, "initial_load_settings.0.job_mode", "SCHEMA"), resource.TestCheckResourceAttrSet(resourceName, "source_database_connection_id"), resource.TestCheckResourceAttrSet(resourceName, "state"), resource.TestCheckResourceAttrSet(resourceName, "target_database_connection_id"), @@ -326,9 +355,13 @@ func TestDatabaseMigrationMigrationResource_basic(t *testing.T) { // verify updates to updatable parameters { - Config: config + compartmentIdVariableStr + kmsKeyIdVariableStr + kmsVaultIdVariableStr + sourceConnectionIdVariableStr + targetConnectionIdVariableStr + bucketIdVariableStr + + Config: config + compartmentIdVariableStr + kmsKeyIdVariableStr + kmsVaultIdVariableStr + sourceConnectionIdVariableStr + targetConnectionIdVariableStr + bucketIdVariableStr + sourceConnectionOracleIdVariableStr + sourceConnectionContainerOracleIdVariableStr + targetConnectionOracleIdVariableStr + acctest.GenerateResourceFromRepresentationMap("oci_database_migration_migration", "test_migration", acctest.Optional, acctest.Update, DatabaseMigrationMigrationRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "advanced_parameters.#", "1"), + resource.TestCheckResourceAttr(resourceName, "advanced_parameters.0.data_type", "INTEGER"), + resource.TestCheckResourceAttr(resourceName, "advanced_parameters.0.name", "DATAPUMPSETTINGS_DUMPFILESIZE"), + resource.TestCheckResourceAttr(resourceName, "advanced_parameters.0.value", "5000"), resource.TestCheckResourceAttr(resourceName, "advisor_settings.#", "1"), resource.TestCheckResourceAttr(resourceName, "advisor_settings.0.is_ignore_errors", "true"), resource.TestCheckResourceAttr(resourceName, "advisor_settings.0.is_skip_advisor", "true"), @@ -338,31 +371,21 @@ func TestDatabaseMigrationMigrationResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "data_transfer_medium_details.0.object_storage_bucket.#", "1"), resource.TestCheckResourceAttr(resourceName, "data_transfer_medium_details.0.object_storage_bucket.0.namespace", "namespace2"), resource.TestCheckResourceAttr(resourceName, "data_transfer_medium_details.0.type", "OBJECT_STORAGE"), - resource.TestCheckResourceAttr(resourceName, "database_combination", "MYSQL"), + resource.TestCheckResourceAttr(resourceName, "database_combination", "ORACLE"), resource.TestCheckResourceAttr(resourceName, "description", "description2"), resource.TestCheckResourceAttr(resourceName, "display_name", "displayName2"), - resource.TestCheckResourceAttr(resourceName, "exclude_objects.#", "1"), - acctest.CheckResourceSetContainsElementWithProperties(resourceName, "exclude_objects", map[string]string{ - "is_omit_excluded_table_from_replication": "false", - "object": "object", - "owner": "owner", - "schema": "schema", - "type": "type", - }, - []string{}), resource.TestCheckResourceAttrSet(resourceName, "id"), resource.TestCheckResourceAttr(resourceName, "include_objects.#", "1"), resource.TestCheckResourceAttr(resourceName, "include_objects.0.is_omit_excluded_table_from_replication", "false"), - resource.TestCheckResourceAttr(resourceName, "include_objects.0.object", "object"), + resource.TestCheckResourceAttr(resourceName, "include_objects.0.object", ".*"), resource.TestCheckResourceAttr(resourceName, "include_objects.0.owner", "owner"), resource.TestCheckResourceAttr(resourceName, "include_objects.0.schema", "schema"), - resource.TestCheckResourceAttr(resourceName, "include_objects.0.type", "type"), + resource.TestCheckResourceAttr(resourceName, "include_objects.0.type", "ALL"), resource.TestCheckResourceAttr(resourceName, "initial_load_settings.#", "1"), - resource.TestCheckResourceAttr(resourceName, "initial_load_settings.0.handle_grant_errors", "DROP_ACCOUNT"), - resource.TestCheckResourceAttr(resourceName, "initial_load_settings.0.is_consistent", "true"), - resource.TestCheckResourceAttr(resourceName, "initial_load_settings.0.is_ignore_existing_objects", "true"), - resource.TestCheckResourceAttr(resourceName, "initial_load_settings.0.is_tz_utc", "true"), + resource.TestCheckResourceAttr(resourceName, "initial_load_settings.0.is_consistent", "false"), + resource.TestCheckResourceAttr(resourceName, "initial_load_settings.0.is_ignore_existing_objects", "false"), + resource.TestCheckResourceAttr(resourceName, "initial_load_settings.0.is_tz_utc", "false"), resource.TestCheckResourceAttr(resourceName, "initial_load_settings.0.job_mode", "SCHEMA"), resource.TestCheckResourceAttrSet(resourceName, "source_database_connection_id"), resource.TestCheckResourceAttrSet(resourceName, "state"), @@ -383,7 +406,7 @@ func TestDatabaseMigrationMigrationResource_basic(t *testing.T) { { Config: config + acctest.GenerateDataSourceFromRepresentationMap("oci_database_migration_migrations", "test_migrations", acctest.Optional, acctest.Update, DatabaseMigrationMigrationDataSourceRepresentation) + - compartmentIdVariableStr + kmsKeyIdVariableStr + kmsVaultIdVariableStr + sourceConnectionIdVariableStr + targetConnectionIdVariableStr + bucketIdVariableStr + + compartmentIdVariableStr + kmsKeyIdVariableStr + kmsVaultIdVariableStr + sourceConnectionIdVariableStr + targetConnectionIdVariableStr + bucketIdVariableStr + sourceConnectionOracleIdVariableStr + sourceConnectionContainerOracleIdVariableStr + targetConnectionOracleIdVariableStr + acctest.GenerateResourceFromRepresentationMap("oci_database_migration_migration", "test_migration", acctest.Optional, acctest.Update, DatabaseMigrationMigrationRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttr(datasourceName, "compartment_id", compartmentId), @@ -394,10 +417,14 @@ func TestDatabaseMigrationMigrationResource_basic(t *testing.T) { { Config: config + acctest.GenerateDataSourceFromRepresentationMap("oci_database_migration_migration", "test_migration", acctest.Required, acctest.Create, DatabaseMigrationMigrationSingularDataSourceRepresentation) + - compartmentIdVariableStr + kmsKeyIdVariableStr + sourceConnectionIdVariableStr + targetConnectionIdVariableStr + bucketIdVariableStr + kmsVaultIdVariableStr + DatabaseMigrationMigrationResourceConfig, + compartmentIdVariableStr + kmsKeyIdVariableStr + sourceConnectionIdVariableStr + targetConnectionIdVariableStr + bucketIdVariableStr + kmsVaultIdVariableStr + sourceConnectionOracleIdVariableStr + sourceConnectionContainerOracleIdVariableStr + targetConnectionOracleIdVariableStr + DatabaseMigrationMigrationResourceConfig, Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttrSet(singularDatasourceName, "migration_id"), + resource.TestCheckResourceAttr(singularDatasourceName, "advanced_parameters.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "advanced_parameters.0.data_type", "INTEGER"), + resource.TestCheckResourceAttr(singularDatasourceName, "advanced_parameters.0.name", "DATAPUMPSETTINGS_DUMPFILESIZE"), + resource.TestCheckResourceAttr(singularDatasourceName, "advanced_parameters.0.value", "5000"), resource.TestCheckResourceAttr(singularDatasourceName, "advisor_settings.#", "1"), resource.TestCheckResourceAttr(singularDatasourceName, "advisor_settings.0.is_ignore_errors", "true"), resource.TestCheckResourceAttr(singularDatasourceName, "advisor_settings.0.is_skip_advisor", "true"), @@ -406,15 +433,14 @@ func TestDatabaseMigrationMigrationResource_basic(t *testing.T) { resource.TestCheckResourceAttr(singularDatasourceName, "data_transfer_medium_details.0.object_storage_bucket.#", "1"), resource.TestCheckResourceAttr(singularDatasourceName, "data_transfer_medium_details.0.object_storage_bucket.0.namespace", "namespace2"), resource.TestCheckResourceAttr(singularDatasourceName, "data_transfer_medium_details.0.type", "OBJECT_STORAGE"), - resource.TestCheckResourceAttr(singularDatasourceName, "database_combination", "MYSQL"), + resource.TestCheckResourceAttr(singularDatasourceName, "database_combination", "ORACLE"), resource.TestCheckResourceAttr(singularDatasourceName, "description", "description2"), resource.TestCheckResourceAttr(singularDatasourceName, "display_name", "displayName2"), resource.TestCheckResourceAttrSet(singularDatasourceName, "id"), resource.TestCheckResourceAttr(singularDatasourceName, "initial_load_settings.#", "1"), - resource.TestCheckResourceAttr(singularDatasourceName, "initial_load_settings.0.handle_grant_errors", "DROP_ACCOUNT"), - resource.TestCheckResourceAttr(singularDatasourceName, "initial_load_settings.0.is_consistent", "true"), - resource.TestCheckResourceAttr(singularDatasourceName, "initial_load_settings.0.is_ignore_existing_objects", "true"), - resource.TestCheckResourceAttr(singularDatasourceName, "initial_load_settings.0.is_tz_utc", "true"), + resource.TestCheckResourceAttr(singularDatasourceName, "initial_load_settings.0.is_consistent", "false"), + resource.TestCheckResourceAttr(singularDatasourceName, "initial_load_settings.0.is_ignore_existing_objects", "false"), + resource.TestCheckResourceAttr(singularDatasourceName, "initial_load_settings.0.is_tz_utc", "false"), resource.TestCheckResourceAttr(singularDatasourceName, "initial_load_settings.0.job_mode", "SCHEMA"), resource.TestCheckResourceAttrSet(singularDatasourceName, "state"), resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"), diff --git a/internal/service/core/core_instance_resource.go b/internal/service/core/core_instance_resource.go index 5e29b8dffe6..723c0136aaa 100644 --- a/internal/service/core/core_instance_resource.go +++ b/internal/service/core/core_instance_resource.go @@ -2250,7 +2250,9 @@ func (s *CoreInstanceResourceCrud) mapToUpdateInstanceSourceDetails(fieldKeyForm } details.BootVolumeSizeInGBs = &tmpInt64 } - if kmsKeyId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "kms_key_id")); ok { + // Use getOk for kmsKeyId as it is validated at the spec layer to ensure non-zero value; GetOk checks + // for non-zero value: https://pkg.go.dev/github.com/hashicorp/terraform/helper/schema#section-readme + if kmsKeyId, ok := s.D.GetOk(fmt.Sprintf(fieldKeyFormat, "kms_key_id")); ok { tmp := kmsKeyId.(string) details.KmsKeyId = &tmp } diff --git a/internal/service/database_migration/database_migration_connection_resource.go b/internal/service/database_migration/database_migration_connection_resource.go index a1dfc1bab1a..e0100e0a617 100644 --- a/internal/service/database_migration/database_migration_connection_resource.go +++ b/internal/service/database_migration/database_migration_connection_resource.go @@ -622,7 +622,7 @@ func (s *DatabaseMigrationConnectionResourceCrud) SetData() error { nsgIds = append(nsgIds, item) } //s.D.Set("nsg_ids", schema.NewSet(tfresource.LiteralTypeHashCodeForSets, nsgIds)) - s.D.Set("nsg_ids", v.NsgIds) + s.D.Set("nsg_ids", nsgIds) if v.Password != nil { s.D.Set("password", *v.Password) diff --git a/internal/service/database_migration/database_migration_migration_data_source.go b/internal/service/database_migration/database_migration_migration_data_source.go index 527b66df203..7a304bdbcb2 100644 --- a/internal/service/database_migration/database_migration_migration_data_source.go +++ b/internal/service/database_migration/database_migration_migration_data_source.go @@ -159,6 +159,12 @@ func (s *DatabaseMigrationMigrationDataSourceCrud) SetData() error { case oci_database_migration.OracleMigration: s.D.Set("database_combination", "ORACLE") + advancedParameters := []interface{}{} + for _, item := range v.AdvancedParameters { + advancedParameters = append(advancedParameters, migrationParameterDetailsToMap(item)) + } + s.D.Set("advanced_parameters", advancedParameters) + if v.AdvisorSettings != nil { s.D.Set("advisor_settings", []interface{}{OracleAdvisorSettingsToMap(v.AdvisorSettings)}) } else { diff --git a/internal/service/database_migration/database_migration_migration_resource.go b/internal/service/database_migration/database_migration_migration_resource.go index 9228f3f20cf..05e1c2d7a13 100644 --- a/internal/service/database_migration/database_migration_migration_resource.go +++ b/internal/service/database_migration/database_migration_migration_resource.go @@ -62,6 +62,35 @@ func DatabaseMigrationMigrationResource() *schema.Resource { }, // Optional + "advanced_parameters": { + Type: schema.TypeList, + Optional: true, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + "data_type": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "value": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + // Computed + }, + }, + }, "advisor_settings": { Type: schema.TypeList, Optional: true, @@ -1221,6 +1250,14 @@ func (s *DatabaseMigrationMigrationResourceCrud) SetData() error { case oci_database_migration.OracleMigration: s.D.Set("database_combination", "ORACLE") + if v.AdvancedParameters != nil { + advancedParameters := []interface{}{} + for _, item := range v.AdvancedParameters { + advancedParameters = append(advancedParameters, migrationParameterDetailsToMap(item)) + } + s.D.Set("advanced_parameters", advancedParameters) + } + if v.AdvisorSettings != nil { s.D.Set("advisor_settings", []interface{}{OracleAdvisorSettingsToMap(v.AdvisorSettings)}) } else { @@ -1323,6 +1360,22 @@ func (s *DatabaseMigrationMigrationResourceCrud) SetData() error { return nil } +func migrationParameterDetailsToMap(obj oci_database_migration.MigrationParameterDetails) map[string]interface{} { + result := map[string]interface{}{} + + if obj.Name != nil { + result["name"] = string(*obj.Name) + } + + if obj.Value != nil { + result["value"] = string(*obj.Value) + } + + result["data_type"] = obj.DataType + + return result +} + func (s *DatabaseMigrationMigrationResourceCrud) mapToAdminCredentials(fieldKeyFormat string) (oci_database_migration.AdminCredentials, error) { result := oci_database_migration.AdminCredentials{} @@ -2710,6 +2763,26 @@ func MetadataRemapToMap(obj oci_database_migration.MetadataRemap) map[string]int return result } +func (s *DatabaseMigrationMigrationResourceCrud) mapToMigrationParameterDetails(fieldKeyFormat string) (oci_database_migration.MigrationParameterDetails, error) { + result := oci_database_migration.MigrationParameterDetails{} + + if dataType, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "data_type")); ok { + result.DataType = oci_database_migration.AdvancedParameterDataTypesEnum(dataType.(string)) + } + + if name, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "name")); ok { + tmp := name.(string) + result.Name = &tmp + } + + if value, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "value")); ok { + tmp := value.(string) + result.Value = &tmp + } + + return result, nil +} + func MigrationSummaryToMap(obj oci_database_migration.MigrationSummary) map[string]interface{} { result := map[string]interface{}{} switch v := (obj).(type) { @@ -4783,6 +4856,22 @@ func (s *DatabaseMigrationMigrationResourceCrud) populateTopLevelPolymorphicCrea request.CreateMigrationDetails = details case strings.ToLower("ORACLE"): details := oci_database_migration.CreateOracleMigrationDetails{} + if advancedParameters, ok := s.D.GetOkExists("advanced_parameters"); ok { + interfaces := advancedParameters.([]interface{}) + tmp := make([]oci_database_migration.MigrationParameterDetails, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "advanced_parameters", stateDataIndex) + converted, err := s.mapToMigrationParameterDetails(fieldKeyFormat) + if err != nil { + return err + } + tmp[i] = converted + } + if len(tmp) != 0 || s.D.HasChange("advanced_parameters") { + details.AdvancedParameters = tmp + } + } if advisorSettings, ok := s.D.GetOkExists("advisor_settings"); ok { if tmpList := advisorSettings.([]interface{}); len(tmpList) > 0 { fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "advisor_settings", 0) @@ -5010,6 +5099,22 @@ func (s *DatabaseMigrationMigrationResourceCrud) populateTopLevelPolymorphicUpda request.UpdateMigrationDetails = details case strings.ToLower("ORACLE"): details := oci_database_migration.UpdateOracleMigrationDetails{} + if advancedParameters, ok := s.D.GetOkExists("advanced_parameters"); ok { + interfaces := advancedParameters.([]interface{}) + tmp := make([]oci_database_migration.MigrationParameterDetails, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "advanced_parameters", stateDataIndex) + converted, err := s.mapToMigrationParameterDetails(fieldKeyFormat) + if err != nil { + return err + } + tmp[i] = converted + } + if len(tmp) != 0 || s.D.HasChange("advanced_parameters") { + details.AdvancedParameters = tmp + } + } if advisorSettings, ok := s.D.GetOkExists("advisor_settings"); ok { if tmpList := advisorSettings.([]interface{}); len(tmpList) > 0 { fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "advisor_settings", 0) diff --git a/internal/service/metering_computation/metering_computation_usage_resource.go b/internal/service/metering_computation/metering_computation_usage_resource.go index e4576c35114..2f778338c09 100644 --- a/internal/service/metering_computation/metering_computation_usage_resource.go +++ b/internal/service/metering_computation/metering_computation_usage_resource.go @@ -169,6 +169,14 @@ func MeteringComputationUsageResource() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "attributed_cost": { + Type: schema.TypeString, + Computed: true, + }, + "attributed_usage": { + Type: schema.TypeString, + Computed: true, + }, "compartment_id": { Type: schema.TypeString, Computed: true, @@ -522,6 +530,14 @@ func UsageSummaryToMap(obj oci_metering_computation.UsageSummary) map[string]int result["ad"] = string(*obj.Ad) } + if obj.AttributedCost != nil { + result["attributed_cost"] = string(*obj.AttributedCost) + } + + if obj.AttributedUsage != nil { + result["attributed_usage"] = string(*obj.AttributedUsage) + } + if obj.CompartmentId != nil { result["compartment_id"] = string(*obj.CompartmentId) } diff --git a/internal/service/vault/vault_secret_resource.go b/internal/service/vault/vault_secret_resource.go index 98660a1964f..205c2767313 100644 --- a/internal/service/vault/vault_secret_resource.go +++ b/internal/service/vault/vault_secret_resource.go @@ -11,6 +11,8 @@ import ( "strings" "time" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" @@ -260,6 +262,11 @@ func VaultSecretResource() *schema.Resource { Computed: true, }, }, + CustomizeDiff: customdiff.All( + customdiff.ComputedIf("current_version_number", func(_ context.Context, diff *schema.ResourceDiff, meta interface{}) bool { + return diff.HasChange("secret_content") + }), + ), } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/version.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/version.go index c8849f7ff68..fb230b51254 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/common/version.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/version.go @@ -13,7 +13,7 @@ import ( const ( major = "65" minor = "69" - patch = "0" + patch = "1" tag = "" ) diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/confirm_key_store_details_are_correct_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/confirm_key_store_details_are_correct_request_response.go new file mode 100644 index 00000000000..58173140515 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/confirm_key_store_details_are_correct_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package database + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ConfirmKeyStoreDetailsAreCorrectRequest wrapper for the ConfirmKeyStoreDetailsAreCorrect operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/ConfirmKeyStoreDetailsAreCorrect.go.html to see an example of how to use ConfirmKeyStoreDetailsAreCorrectRequest. +type ConfirmKeyStoreDetailsAreCorrectRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the key store. + KeyStoreId *string `mandatory:"true" contributesTo:"path" name:"keyStoreId"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique identifier for the request. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ConfirmKeyStoreDetailsAreCorrectRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ConfirmKeyStoreDetailsAreCorrectRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ConfirmKeyStoreDetailsAreCorrectRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ConfirmKeyStoreDetailsAreCorrectRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ConfirmKeyStoreDetailsAreCorrectRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ConfirmKeyStoreDetailsAreCorrectResponse wrapper for the ConfirmKeyStoreDetailsAreCorrect operation +type ConfirmKeyStoreDetailsAreCorrectResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use GetWorkRequest with a work request OCID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ConfirmKeyStoreDetailsAreCorrectResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ConfirmKeyStoreDetailsAreCorrectResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_database_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_database_details.go index 72d4d8e46a6..199687fa6a8 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_database_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_database_details.go @@ -72,6 +72,9 @@ type CreateDatabaseDetails struct { // Specifies a prefix for the `Oracle SID` of the database to be created. SidPrefix *string `mandatory:"false" json:"sidPrefix"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the key store of Oracle Vault. + KeyStoreId *string `mandatory:"false" json:"keyStoreId"` } func (m CreateDatabaseDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/database_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/database_client.go index 69e04212cce..0bc800c911d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/database_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/database_client.go @@ -2217,6 +2217,69 @@ func (client DatabaseClient) configureSaasAdminUser(ctx context.Context, request return response, err } +// ConfirmKeyStoreDetailsAreCorrect This is for user to confirm to DBaaS that the Oracle Key Valut (OKV) connection IPs, username and password are all correct. This operation will put +// the Key Store back into Active state. If details are incorrect, your OKV account may get locked after some unsuccessful attempts to connect. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/ConfirmKeyStoreDetailsAreCorrect.go.html to see an example of how to use ConfirmKeyStoreDetailsAreCorrect API. +func (client DatabaseClient) ConfirmKeyStoreDetailsAreCorrect(ctx context.Context, request ConfirmKeyStoreDetailsAreCorrectRequest) (response ConfirmKeyStoreDetailsAreCorrectResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.confirmKeyStoreDetailsAreCorrect, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ConfirmKeyStoreDetailsAreCorrectResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ConfirmKeyStoreDetailsAreCorrectResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ConfirmKeyStoreDetailsAreCorrectResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ConfirmKeyStoreDetailsAreCorrectResponse") + } + return +} + +// confirmKeyStoreDetailsAreCorrect implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) confirmKeyStoreDetailsAreCorrect(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/keyStores/{keyStoreId}/actions/confirmDetailsAreCorrect", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ConfirmKeyStoreDetailsAreCorrectResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/database/20160918/KeyStore/ConfirmKeyStoreDetailsAreCorrect" + err = common.PostProcessServiceError(err, "Database", "ConfirmKeyStoreDetailsAreCorrect", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ConvertToPdb Converts a non-container database to a pluggable database. // // # See also diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/key_store.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/key_store.go index 3e3d1382e2f..391e30e3e26 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/key_store.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/key_store.go @@ -127,18 +127,21 @@ type KeyStoreLifecycleStateEnum string // Set of constants representing the allowable values for KeyStoreLifecycleStateEnum const ( - KeyStoreLifecycleStateActive KeyStoreLifecycleStateEnum = "ACTIVE" - KeyStoreLifecycleStateDeleted KeyStoreLifecycleStateEnum = "DELETED" + KeyStoreLifecycleStateActive KeyStoreLifecycleStateEnum = "ACTIVE" + KeyStoreLifecycleStateDeleted KeyStoreLifecycleStateEnum = "DELETED" + KeyStoreLifecycleStateNeedsAttention KeyStoreLifecycleStateEnum = "NEEDS_ATTENTION" ) var mappingKeyStoreLifecycleStateEnum = map[string]KeyStoreLifecycleStateEnum{ - "ACTIVE": KeyStoreLifecycleStateActive, - "DELETED": KeyStoreLifecycleStateDeleted, + "ACTIVE": KeyStoreLifecycleStateActive, + "DELETED": KeyStoreLifecycleStateDeleted, + "NEEDS_ATTENTION": KeyStoreLifecycleStateNeedsAttention, } var mappingKeyStoreLifecycleStateEnumLowerCase = map[string]KeyStoreLifecycleStateEnum{ - "active": KeyStoreLifecycleStateActive, - "deleted": KeyStoreLifecycleStateDeleted, + "active": KeyStoreLifecycleStateActive, + "deleted": KeyStoreLifecycleStateDeleted, + "needs_attention": KeyStoreLifecycleStateNeedsAttention, } // GetKeyStoreLifecycleStateEnumValues Enumerates the set of values for KeyStoreLifecycleStateEnum @@ -155,6 +158,7 @@ func GetKeyStoreLifecycleStateEnumStringValues() []string { return []string{ "ACTIVE", "DELETED", + "NEEDS_ATTENTION", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/key_store_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/key_store_summary.go index cce838f4d19..15d66b34d6b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/key_store_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/key_store_summary.go @@ -127,18 +127,21 @@ type KeyStoreSummaryLifecycleStateEnum string // Set of constants representing the allowable values for KeyStoreSummaryLifecycleStateEnum const ( - KeyStoreSummaryLifecycleStateActive KeyStoreSummaryLifecycleStateEnum = "ACTIVE" - KeyStoreSummaryLifecycleStateDeleted KeyStoreSummaryLifecycleStateEnum = "DELETED" + KeyStoreSummaryLifecycleStateActive KeyStoreSummaryLifecycleStateEnum = "ACTIVE" + KeyStoreSummaryLifecycleStateDeleted KeyStoreSummaryLifecycleStateEnum = "DELETED" + KeyStoreSummaryLifecycleStateNeedsAttention KeyStoreSummaryLifecycleStateEnum = "NEEDS_ATTENTION" ) var mappingKeyStoreSummaryLifecycleStateEnum = map[string]KeyStoreSummaryLifecycleStateEnum{ - "ACTIVE": KeyStoreSummaryLifecycleStateActive, - "DELETED": KeyStoreSummaryLifecycleStateDeleted, + "ACTIVE": KeyStoreSummaryLifecycleStateActive, + "DELETED": KeyStoreSummaryLifecycleStateDeleted, + "NEEDS_ATTENTION": KeyStoreSummaryLifecycleStateNeedsAttention, } var mappingKeyStoreSummaryLifecycleStateEnumLowerCase = map[string]KeyStoreSummaryLifecycleStateEnum{ - "active": KeyStoreSummaryLifecycleStateActive, - "deleted": KeyStoreSummaryLifecycleStateDeleted, + "active": KeyStoreSummaryLifecycleStateActive, + "deleted": KeyStoreSummaryLifecycleStateDeleted, + "needs_attention": KeyStoreSummaryLifecycleStateNeedsAttention, } // GetKeyStoreSummaryLifecycleStateEnumValues Enumerates the set of values for KeyStoreSummaryLifecycleStateEnum @@ -155,6 +158,7 @@ func GetKeyStoreSummaryLifecycleStateEnumStringValues() []string { return []string{ "ACTIVE", "DELETED", + "NEEDS_ATTENTION", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/usageapi/usage_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/usageapi/usage_summary.go index e33ed8b26ee..7bdbc99cde2 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/usageapi/usage_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/usageapi/usage_summary.go @@ -84,6 +84,12 @@ type UsageSummary struct { // The usage number. ComputedQuantity *float32 `mandatory:"false" json:"computedQuantity"` + // The attributed cost with a max value of 9999999999.999999999999 and a minimum value of 0. + AttributedCost *string `mandatory:"false" json:"attributedCost"` + + // The attributed usage with a max value of 9999999999.999999999999 and a minimum value of 0. + AttributedUsage *string `mandatory:"false" json:"attributedUsage"` + // The SPM OverageFlag. OveragesFlag *string `mandatory:"false" json:"overagesFlag"` diff --git a/vendor/modules.txt b/vendor/modules.txt index 9da87a3a0f3..197f4b5fb88 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -225,7 +225,7 @@ github.com/mitchellh/reflectwalk # github.com/oklog/run v1.0.0 ## explicit github.com/oklog/run -# github.com/oracle/oci-go-sdk/v65 v65.69.0 +# github.com/oracle/oci-go-sdk/v65 v65.69.1 ## explicit; go 1.13 github.com/oracle/oci-go-sdk/v65/adm github.com/oracle/oci-go-sdk/v65/aianomalydetection diff --git a/website/docs/d/database_migration_connection.html.markdown b/website/docs/d/database_migration_connection.html.markdown index ef12abf9eb2..09f1d6f351b 100644 --- a/website/docs/d/database_migration_connection.html.markdown +++ b/website/docs/d/database_migration_connection.html.markdown @@ -12,7 +12,7 @@ This data source provides details about a specific Connection resource in Oracle Display Database Connection details. -Note: If you wish to use the DMS deprecated API version /20210929 it is necessary to pin the Terraform Provider version to v5.46.0. Newer Terraform provider versions will not support the DMS deprecated API version /20210929 +Note: If you wish to use the DMS deprecated API version /20210929 it is necessary to pin the Terraform Provider version to v5.47.0. Newer Terraform provider versions will not support the DMS deprecated API version /20210929 ## Example Usage diff --git a/website/docs/d/database_migration_connections.html.markdown b/website/docs/d/database_migration_connections.html.markdown index fe84abc9076..bcd99664f5c 100644 --- a/website/docs/d/database_migration_connections.html.markdown +++ b/website/docs/d/database_migration_connections.html.markdown @@ -12,7 +12,7 @@ This data source provides the list of Connections in Oracle Cloud Infrastructure List all Database Connections. -Note: If you wish to use the DMS deprecated API version /20210929 it is necessary to pin the Terraform Provider version to v5.46.0. Newer Terraform provider versions will not support the DMS deprecated API version /20210929 +Note: If you wish to use the DMS deprecated API version /20210929 it is necessary to pin the Terraform Provider version to v5.47.0. Newer Terraform provider versions will not support the DMS deprecated API version /20210929 ## Example Usage diff --git a/website/docs/d/database_migration_job.html.markdown b/website/docs/d/database_migration_job.html.markdown index c9877e43944..37f9ba6cd15 100644 --- a/website/docs/d/database_migration_job.html.markdown +++ b/website/docs/d/database_migration_job.html.markdown @@ -12,7 +12,7 @@ This data source provides details about a specific Job resource in Oracle Cloud Get a migration job. -Note: If you wish to use the DMS deprecated API version /20210929 it is necessary to pin the Terraform Provider version to v5.46.0. Newer Terraform provider versions will not support the DMS deprecated API version /20210929 +Note: If you wish to use the DMS deprecated API version /20210929 it is necessary to pin the Terraform Provider version to v5.47.0. Newer Terraform provider versions will not support the DMS deprecated API version /20210929 ## Example Usage diff --git a/website/docs/d/database_migration_job_advisor_report.html.markdown b/website/docs/d/database_migration_job_advisor_report.html.markdown index 2371cc4d409..2f846fda9df 100644 --- a/website/docs/d/database_migration_job_advisor_report.html.markdown +++ b/website/docs/d/database_migration_job_advisor_report.html.markdown @@ -12,7 +12,7 @@ This data source provides details about a specific Job Advisor Report resource i Get the Pre-Migration Advisor report details -Note: If you wish to use the DMS deprecated API version /20210929 it is necessary to pin the Terraform Provider version to v5.46.0. Newer Terraform provider versions will not support the DMS deprecated API version /20210929 +Note: If you wish to use the DMS deprecated API version /20210929 it is necessary to pin the Terraform Provider version to v5.47.0. Newer Terraform provider versions will not support the DMS deprecated API version /20210929 ## Example Usage diff --git a/website/docs/d/database_migration_jobs.html.markdown b/website/docs/d/database_migration_jobs.html.markdown index b049439fd5a..1db3cd74c2d 100644 --- a/website/docs/d/database_migration_jobs.html.markdown +++ b/website/docs/d/database_migration_jobs.html.markdown @@ -13,7 +13,7 @@ This data source provides the list of Jobs in Oracle Cloud Infrastructure Databa List all the names of the Migration jobs associated to the specified migration site. -Note: If you wish to use the DMS deprecated API version /20210929 it is necessary to pin the Terraform Provider version to v5.46.0. Newer Terraform provider versions will not support the DMS deprecated API version /20210929 +Note: If you wish to use the DMS deprecated API version /20210929 it is necessary to pin the Terraform Provider version to v5.47.0. Newer Terraform provider versions will not support the DMS deprecated API version /20210929 ## Example Usage diff --git a/website/docs/d/database_migration_migration.html.markdown b/website/docs/d/database_migration_migration.html.markdown index e75c03b1614..a0af86b989d 100644 --- a/website/docs/d/database_migration_migration.html.markdown +++ b/website/docs/d/database_migration_migration.html.markdown @@ -12,7 +12,7 @@ This data source provides details about a specific Migration resource in Oracle Display Migration details. -Note: If you wish to use the DMS deprecated API version /20210929 it is necessary to pin the Terraform Provider version to v5.46.0. Newer Terraform provider versions will not support the DMS deprecated API version /20210929 +Note: If you wish to use the DMS deprecated API version /20210929 it is necessary to pin the Terraform Provider version to v5.47.0. Newer Terraform provider versions will not support the DMS deprecated API version /20210929 ## Example Usage @@ -34,6 +34,10 @@ The following arguments are supported: The following attributes are exported: +* `advanced_parameters` - List of Migration Parameter objects. + * `data_type` - Parameter data type. + * `name` - Parameter name. + * `value` - If a STRING data type then the value should be an array of characters, if a INTEGER data type then the value should be an integer value, if a FLOAT data type then the value should be an float value, if a BOOLEAN data type then the value should be TRUE or FALSE. * `advisor_settings` - Details about Oracle Advisor Settings. * `is_ignore_errors` - True to not interrupt migration execution due to Pre-Migration Advisor errors. Default is false. * `is_skip_advisor` - True to skip the Pre-Migration Advisor execution. Default is false. diff --git a/website/docs/d/database_migration_migration_object_types.html.markdown b/website/docs/d/database_migration_migration_object_types.html.markdown index 188d9b13b99..850ce716303 100644 --- a/website/docs/d/database_migration_migration_object_types.html.markdown +++ b/website/docs/d/database_migration_migration_object_types.html.markdown @@ -12,7 +12,7 @@ This data source provides the list of Migration Object Types in Oracle Cloud Inf Display sample object types to exclude or include for a Migration. -Note: If you wish to use the DMS deprecated API version /20210929 it is necessary to pin the Terraform Provider version to v5.46.0. Newer Terraform provider versions will not support the DMS deprecated API version /20210929 +Note: If you wish to use the DMS deprecated API version /20210929 it is necessary to pin the Terraform Provider version to v5.47.0. Newer Terraform provider versions will not support the DMS deprecated API version /20210929 ## Example Usage diff --git a/website/docs/d/database_migration_migrations.html.markdown b/website/docs/d/database_migration_migrations.html.markdown index 5fa46ae0ddf..26f42da9127 100644 --- a/website/docs/d/database_migration_migrations.html.markdown +++ b/website/docs/d/database_migration_migrations.html.markdown @@ -12,7 +12,7 @@ This data source provides the list of Migrations in Oracle Cloud Infrastructure List all Migrations. -Note: If you wish to use the DMS deprecated API version /20210929 it is necessary to pin the Terraform Provider version to v5.46.0. Newer Terraform provider versions will not support the DMS deprecated API version /20210929 +Note: If you wish to use the DMS deprecated API version /20210929 it is necessary to pin the Terraform Provider version to v5.47.0. Newer Terraform provider versions will not support the DMS deprecated API version /20210929 ## Example Usage @@ -48,6 +48,10 @@ The following attributes are exported: The following attributes are exported: +* `advanced_parameters` - List of Migration Parameter objects. + * `data_type` - Parameter data type. + * `name` - Parameter name. + * `value` - If a STRING data type then the value should be an array of characters, if a INTEGER data type then the value should be an integer value, if a FLOAT data type then the value should be an float value, if a BOOLEAN data type then the value should be TRUE or FALSE. * `advisor_settings` - Details about Oracle Advisor Settings. * `is_ignore_errors` - True to not interrupt migration execution due to Pre-Migration Advisor errors. Default is false. * `is_skip_advisor` - True to skip the Pre-Migration Advisor execution. Default is false. diff --git a/website/docs/r/database_migration_connection.html.markdown b/website/docs/r/database_migration_connection.html.markdown index 9277ebe8651..2b54aa1937a 100644 --- a/website/docs/r/database_migration_connection.html.markdown +++ b/website/docs/r/database_migration_connection.html.markdown @@ -13,7 +13,7 @@ This resource provides the Connection resource in Oracle Cloud Infrastructure Da Create a Database Connection resource that contains the details to connect to either a Source or Target Database in the migration. -Note: If you wish to use the DMS deprecated API version /20210929 it is necessary to pin the Terraform Provider version to v5.46.0. Newer Terraform provider versions will not support the DMS deprecated API version /20210929 +Note: If you wish to use the DMS deprecated API version /20210929 it is necessary to pin the Terraform Provider version to v5.47.0. Newer Terraform provider versions will not support the DMS deprecated API version /20210929 ## Example Usage diff --git a/website/docs/r/database_migration_job.html.markdown b/website/docs/r/database_migration_job.html.markdown index 0b51cc3f70e..4a1147306b8 100644 --- a/website/docs/r/database_migration_job.html.markdown +++ b/website/docs/r/database_migration_job.html.markdown @@ -12,7 +12,7 @@ This resource provides the Job resource in Oracle Cloud Infrastructure Database Update Migration Job resource details. -Note: If you wish to use the DMS deprecated API version /20210929 it is necessary to pin the Terraform Provider version to v5.46.0. Newer Terraform provider versions will not support the DMS deprecated API version /20210929 +Note: If you wish to use the DMS deprecated API version /20210929 it is necessary to pin the Terraform Provider version to v5.47.0. Newer Terraform provider versions will not support the DMS deprecated API version /20210929 ## Example Usage diff --git a/website/docs/r/database_migration_migration.html.markdown b/website/docs/r/database_migration_migration.html.markdown index 571cfaec32e..575ceb1fd9f 100644 --- a/website/docs/r/database_migration_migration.html.markdown +++ b/website/docs/r/database_migration_migration.html.markdown @@ -14,7 +14,7 @@ Create a Migration resource that contains all the details to perform the database migration operation, such as source and destination database details, credentials, etc. -Note: If you wish to use the DMS deprecated API version /20210929 it is necessary to pin the Terraform Provider version to v5.46.0. Newer Terraform provider versions will not support the DMS deprecated API version /20210929 +Note: If you wish to use the DMS deprecated API version /20210929 it is necessary to pin the Terraform Provider version to v5.47.0. Newer Terraform provider versions will not support the DMS deprecated API version /20210929 ## Example Usage @@ -29,6 +29,13 @@ resource "oci_database_migration_migration" "test_migration" { type = var.migration_type #Optional + advanced_parameters { + + #Optional + data_type = var.migration_advanced_parameters_data_type + name = var.migration_advanced_parameters_name + value = var.migration_advanced_parameters_value + } advisor_settings { #Optional @@ -195,6 +202,10 @@ resource "oci_database_migration_migration" "test_migration" { The following arguments are supported: +* `advanced_parameters` - (Applicable when database_combination=ORACLE) (Updatable) List of Migration Parameter objects. + * `data_type` - (Required when database_combination=ORACLE) (Updatable) Parameter data type. + * `name` - (Required when database_combination=ORACLE) (Updatable) Parameter name. + * `value` - (Required when database_combination=ORACLE) (Updatable) If a STRING data type then the value should be an array of characters, if a INTEGER data type then the value should be an integer value, if a FLOAT data type then the value should be an float value, if a BOOLEAN data type then the value should be TRUE or FALSE. * `advisor_settings` - (Optional) (Updatable) Optional Pre-Migration advisor settings. * `is_ignore_errors` - (Optional) (Updatable) True to not interrupt migration execution due to Pre-Migration Advisor errors. Default is false. * `is_skip_advisor` - (Optional) (Updatable) True to skip the Pre-Migration Advisor execution. Default is false. @@ -301,6 +312,10 @@ Any change to a property that does not support update will force the destruction The following attributes are exported: +* `advanced_parameters` - List of Migration Parameter objects. + * `data_type` - Parameter data type. + * `name` - Parameter name. + * `value` - If a STRING data type then the value should be an array of characters, if a INTEGER data type then the value should be an integer value, if a FLOAT data type then the value should be an float value, if a BOOLEAN data type then the value should be TRUE or FALSE. * `advisor_settings` - Details about Oracle Advisor Settings. * `is_ignore_errors` - True to not interrupt migration execution due to Pre-Migration Advisor errors. Default is false. * `is_skip_advisor` - True to skip the Pre-Migration Advisor execution. Default is false. diff --git a/website/docs/r/metering_computation_usage.html.markdown b/website/docs/r/metering_computation_usage.html.markdown index 958880f633e..65b9bd02a78 100644 --- a/website/docs/r/metering_computation_usage.html.markdown +++ b/website/docs/r/metering_computation_usage.html.markdown @@ -80,6 +80,8 @@ The following attributes are exported: * `group_by` - Aggregate the result by. * `items` - A list of usage items. * `ad` - The availability domain of the usage. + * `attributed_cost` - The attributed cost with a max value of 9999999999.999999999999 and a minimum value of 0. + * `attributed_usage` - The attributed usage with a max value of 9999999999.999999999999 and a minimum value of 0. * `compartment_id` - The compartment OCID. * `compartment_name` - The compartment name. * `compartment_path` - The compartment path, starting from root.