diff --git a/.gitignore b/.gitignore index a48b0c63675..1d3deacd123 100644 --- a/.gitignore +++ b/.gitignore @@ -28,4 +28,4 @@ vendor/github.com/oracle/oci-go-sdk/target internal/record .terraform.lock.hcl dist/ -examples/opsi/description.md +internal/integrationtest/output \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e2562261ac..e5402541402 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +## 6.37.0 (April 30, 2025) + +### Added +- Support for adding custom pre check step in DR Plans +- Support for OKE: Node Cycling Improvements +- Support for HeatWave Service: Change DB System Deletion Policy AutomaticBackupRetention default to RETAIN. +- provider support for Resource Scheduler enhancement feature +### Bug Fix +- move capacity_reservation_id update to the same request as shape update +- TERRAFORM_ISSUE:NOSQL: Change on compartmentId of child table should be ignored + ## 6.36.0 (April 23, 2025) ### Added diff --git a/examples/container_engine/main.tf b/examples/container_engine/main.tf index c68bf0ba3e5..559c909d78f 100644 --- a/examples/container_engine/main.tf +++ b/examples/container_engine/main.tf @@ -48,6 +48,10 @@ variable "node_pool_cycling_details_maximum_unavailable" { default = "0" } +variable "node_pool_cycling_details_cycle_modes" { + default = ["INSTANCE_REPLACE"] +} + variable "node_pool_state" { default = [] } @@ -261,6 +265,7 @@ resource "oci_containerengine_node_pool" "test_node_pool" { is_node_cycling_enabled = var.node_pool_cycling_details_is_node_cycling_enabled maximum_surge = var.node_pool_cycling_details_maximum_surge maximum_unavailable = var.node_pool_cycling_details_maximum_unavailable + cycle_modes = var.node_pool_cycling_details_cycle_modes } node_source_details { @@ -282,7 +287,7 @@ resource "oci_containerengine_node_pool" "test_flex_shape_node_pool" { compartment_id = var.compartment_ocid kubernetes_version = reverse(data.oci_containerengine_cluster_option.test_cluster_option.kubernetes_versions)[0] name = "flexShapePool" - node_shape = "VM.Standard.E4.Flex" + node_shape = "VM.Standard.E5.Flex" subnet_ids = [oci_core_subnet.nodePool_Subnet_1.id] node_source_details { diff --git a/examples/mysql/main.tf b/examples/mysql/main.tf index 56574869d52..445f3f213c1 100644 --- a/examples/mysql/main.tf +++ b/examples/mysql/main.tf @@ -133,7 +133,7 @@ resource "oci_mysql_mysql_db_system" "test_mysql_db_system" { #Optional deletion_policy { - automatic_backup_retention = "DELETE" + automatic_backup_retention = "RETAIN" final_backup = "SKIP_FINAL_BACKUP" is_delete_protected = "false" } diff --git a/examples/resourcescheduler/main.tf b/examples/resourcescheduler/main.tf index b20e2b914b2..2c4d2c2438c 100644 --- a/examples/resourcescheduler/main.tf +++ b/examples/resourcescheduler/main.tf @@ -73,11 +73,11 @@ variable "schedule_state" { } variable "schedule_time_ends" { - default = "2024-12-20T00:00:00Z" + default = "2025-12-31T00:00:00Z" } variable "schedule_time_starts" { - default = "2024-12-01T00:00:00Z" + default = "2025-05-01T00:00:00Z" } @@ -124,7 +124,7 @@ resource "oci_resource_scheduler_schedule" "test_schedule" { } #Optional - defined_tags = map(oci_identity_tag_namespace.tag-namespace1.name.oci_identity_tag.tag1.name, var.schedule_defined_tags_value) +# defined_tags = map(oci_identity_tag_namespace.tag-namespace1.name.oci_identity_tag.tag1.name, var.schedule_defined_tags_value) description = var.schedule_description display_name = var.schedule_display_name freeform_tags = var.schedule_freeform_tags diff --git a/examples/zips/adm.zip b/examples/zips/adm.zip index 4d23be6a185..2206d9af295 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 7d06b6c5728..2cdffc81e0f 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 9e8bc6bc55c..a39a397c017 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 c84212164ea..772841e4e3f 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 70a7d28b0f8..c5349bf034f 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 f39fcb9a251..181a8911619 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 4df0bb77f00..bc1009469cf 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 1fd31966e64..1bb848edbd4 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 7db25920954..5b8f495b9d2 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 dc6ddbefe50..7cb5c44a537 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 b6612b782d1..690114cf0c0 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 ee8a7041af0..76741f12550 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 387482928aa..ef4ae0bd7bb 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 32b5866f415..b37f26cf81e 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 7f44b5ba0eb..27b8f58d583 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 108ae01c9f6..44117ae8ca3 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 1fc1c0f459a..b25227d6f35 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 a3c9bcad3dd..e84512f9ce8 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 cb6cc53f2b0..aa04828d690 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 f8fa7b55831..b20e5e554f8 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 9e663ace2f1..54993fee474 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 10d91bd8753..a4539029fd0 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 afe09f93620..3c83667cc7b 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 125c7155e80..7261fee0af7 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 82b828df70e..528f7156cc2 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 f08355cf50e..0f476cab7d4 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 9878afb8d67..76eb3e6fe38 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 bf6c130c1dd..4394d04c416 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 edbe4564674..9efa19265a6 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 daffbbed459..0459c5c267f 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 3bc6240316c..975272df4a9 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 bf6ecc52d6f..d6b20e7f21e 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 7ec026b9550..c6240c7e86f 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 2ff03548fd0..79f9b8ddaf5 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 42a85653b02..a2a2fb3fe87 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 c2e40696633..2fb750a601f 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 296b3f9a460..d4c43aa63a5 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 26bfffebdca..61e37c165d2 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 9cc4c735191..a8b7a1fd11e 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 23e47393e66..b52bd2709d3 100644 Binary files a/examples/zips/datascience.zip and b/examples/zips/datascience.zip differ diff --git a/examples/zips/dblm.zip b/examples/zips/dblm.zip index 158ba7ff8a0..d8202850f0f 100644 Binary files a/examples/zips/dblm.zip and b/examples/zips/dblm.zip differ diff --git a/examples/zips/delegation_management.zip b/examples/zips/delegation_management.zip index 02d5c6ffb7f..7c163d751e2 100644 Binary files a/examples/zips/delegation_management.zip and b/examples/zips/delegation_management.zip differ diff --git a/examples/zips/demand_signal.zip b/examples/zips/demand_signal.zip index 9ba9addc9e9..151fa4966e5 100644 Binary files a/examples/zips/demand_signal.zip and b/examples/zips/demand_signal.zip differ diff --git a/examples/zips/desktops.zip b/examples/zips/desktops.zip index e78f4fd9f6f..8e911799c99 100644 Binary files a/examples/zips/desktops.zip and b/examples/zips/desktops.zip differ diff --git a/examples/zips/devops.zip b/examples/zips/devops.zip index 6f0a0ebb1b4..bc299f7fe4c 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 ce8c4ee424f..6155144de6c 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 812be1e15ac..0f600e288e8 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 5e37f8d95db..5e38c1c40c2 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 f81311835bc..6c885b8f266 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 747eb4a0539..3ffe2139003 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 d88ca48f812..d561e649a3f 100644 Binary files a/examples/zips/fast_connect.zip and b/examples/zips/fast_connect.zip differ diff --git a/examples/zips/fleet_apps_management.zip b/examples/zips/fleet_apps_management.zip index 63049e1c5cf..29714d74b3b 100644 Binary files a/examples/zips/fleet_apps_management.zip and b/examples/zips/fleet_apps_management.zip differ diff --git a/examples/zips/fleetsoftwareupdate.zip b/examples/zips/fleetsoftwareupdate.zip index fd22a0f7aa1..dc0b02585eb 100644 Binary files a/examples/zips/fleetsoftwareupdate.zip and b/examples/zips/fleetsoftwareupdate.zip differ diff --git a/examples/zips/functions.zip b/examples/zips/functions.zip index 32988f95d46..67800cfb34a 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 7a850ce9d8d..4971330a6cf 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 dfc5ffc2358..af663355cd6 100644 Binary files a/examples/zips/generative_ai.zip and b/examples/zips/generative_ai.zip differ diff --git a/examples/zips/generative_ai_agent.zip b/examples/zips/generative_ai_agent.zip index 36e64256649..a11907ad8e4 100644 Binary files a/examples/zips/generative_ai_agent.zip and b/examples/zips/generative_ai_agent.zip differ diff --git a/examples/zips/globally_distributed_database.zip b/examples/zips/globally_distributed_database.zip index 6293d59ada7..48680b6b6fb 100644 Binary files a/examples/zips/globally_distributed_database.zip and b/examples/zips/globally_distributed_database.zip differ diff --git a/examples/zips/goldengate.zip b/examples/zips/goldengate.zip index 828ac308516..d986ee50acd 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 296346de60b..2efd522166f 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 99be0e468b4..bef8ed1eb71 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 38c57077a78..8f33074a833 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 b0b60cc90ae..7ebf9697061 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 094c544ae71..a87f1d38427 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 a27aa03f569..48dae738dee 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 204daa6a051..b4b08d40fb4 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 d2b1386b59f..bb966b47414 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 a924a91d597..f732ccafb24 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 2def809fe66..2f9b48db0cd 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 45a0a6a363c..d4cba0e918d 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 698ea52a518..f695f5b616c 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 9d8bf774481..ff04bdd1ba7 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 9fd476f67c3..7944a7a9af1 100644 Binary files a/examples/zips/logging.zip and b/examples/zips/logging.zip differ diff --git a/examples/zips/lustre_file_storage.zip b/examples/zips/lustre_file_storage.zip index e9cebeecf85..b7570d87568 100644 Binary files a/examples/zips/lustre_file_storage.zip and b/examples/zips/lustre_file_storage.zip differ diff --git a/examples/zips/management_agent.zip b/examples/zips/management_agent.zip index 518a7108c00..3d49d526938 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 662035a7d0b..e00a2f2fbfb 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 f0036ac85d4..a2e7b795e5b 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 f5d2d6f6f15..131c7d984d2 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 90b4cd05da1..ff309b0ba85 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 6e05d0d20a3..649b6e7e99b 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 990a8cd4eef..be3e9b4d3dc 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 7f6d48b26f7..dd2a755b48a 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 f329e185019..6d57dd4d170 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 6aeb34cc0f9..2275d5abd0c 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 801bebd24e9..cb81c563387 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 c6ffada3450..5333974eefe 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 5b76328d32f..c0ceaeadde3 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 9c8335c93c8..962a614b6e7 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 6e070d928ff..939a238a4a8 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 a4517c98d11..116cda7a8ab 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 d10b4692475..d12d3fb6dee 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 0a894b35cfd..9dded4bab9d 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 eda522c4f41..d93a6478dfa 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 494cf8ffef2..6fdf51dd762 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 3c75c1cbf3d..75d4b21f054 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 925be18317f..741f1781c6e 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 24c8d37c440..e4932c1a6d9 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 6590291a20a..ec03110a442 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 a6f7a6524a6..a8a29b37547 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 021ed429cf4..113740bce80 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 09ad43761a4..22b173cf264 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 dfccd2a62c9..68d86f42933 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 9dae920305c..499089b8d46 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 80ac8bbe332..e72be018738 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 7ef3e544a41..c5ac92488cc 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 1570655e75b..3bf1aedf62f 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 154845122e7..110e8715839 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 f46ee44d6b1..c25067951fa 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 11420f3b0e8..ec2eb29c00d 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 40570b8b6f4..bdaeb95dda4 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 107fa340c88..cf0e3203b3c 100644 Binary files a/examples/zips/resourcescheduler.zip and b/examples/zips/resourcescheduler.zip differ diff --git a/examples/zips/security_attribute.zip b/examples/zips/security_attribute.zip index dc2af6f319d..396189ad292 100644 Binary files a/examples/zips/security_attribute.zip and b/examples/zips/security_attribute.zip differ diff --git a/examples/zips/serviceManagerProxy.zip b/examples/zips/serviceManagerProxy.zip index 83ff42f9f19..19810769e0b 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 e36d36c90f5..f9783beb5aa 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 2aa4bd38579..d704279ffe7 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 5d9cc535067..df71eb822f9 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 ebf69afc3c3..b89e9258666 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 89083f79ef9..817592058cb 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 4e5f6d9e94c..550dc77176d 100644 Binary files a/examples/zips/streaming.zip and b/examples/zips/streaming.zip differ diff --git a/examples/zips/tenantmanagercontrolplane.zip b/examples/zips/tenantmanagercontrolplane.zip index 97b63265f4f..dd44e40666f 100644 Binary files a/examples/zips/tenantmanagercontrolplane.zip and b/examples/zips/tenantmanagercontrolplane.zip differ diff --git a/examples/zips/usage_proxy.zip b/examples/zips/usage_proxy.zip index 3bcbe62078f..0a7de189a68 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 2293d7b4526..1361cb41255 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 e54bc288a91..411c68aa52d 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 cc044174443..e79617d8bf9 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 25b87f812d0..863e501da6d 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 ac4ce0cf4d0..b5282c814e4 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 f419fffcc50..5f128f70437 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 46efaa8100c..d576b1c5bed 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 ef509a3f40f..e113736a187 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/examples/zips/zpr.zip b/examples/zips/zpr.zip index da9eb0a8d05..eab30206759 100644 Binary files a/examples/zips/zpr.zip and b/examples/zips/zpr.zip differ diff --git a/go.mod b/go.mod index 81e05d2c70b..46b76ecea3f 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/hashicorp/terraform-plugin-mux v0.16.0 github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0 github.com/hashicorp/terraform-plugin-testing v1.9.0 - github.com/oracle/oci-go-sdk/v65 v65.89.2 + github.com/oracle/oci-go-sdk/v65 v65.89.3 github.com/stretchr/testify v1.8.4 golang.org/x/mod v0.20.0 gopkg.in/yaml.v2 v2.3.0 diff --git a/go.sum b/go.sum index 208ffadcdf4..f3ebd98e716 100644 --- a/go.sum +++ b/go.sum @@ -147,8 +147,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.89.2 h1:w0GwID9NlT+eg3InbAwkWsazDtxVLYQ8rJb4E33Yb14= -github.com/oracle/oci-go-sdk/v65 v65.89.2/go.mod h1:u6XRPsw9tPziBh76K7GrrRXPa8P8W3BQeqJ6ZZt9VLA= +github.com/oracle/oci-go-sdk/v65 v65.89.3 h1:KSUykb5Ou54jF4SeJNjBwcDg+umbAwcvT+xhrvNDog0= +github.com/oracle/oci-go-sdk/v65 v65.89.3/go.mod h1:u6XRPsw9tPziBh76K7GrrRXPa8P8W3BQeqJ6ZZt9VLA= 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 4499a476a2f..7e2490c3dd3 100644 --- a/internal/globalvar/version.go +++ b/internal/globalvar/version.go @@ -7,8 +7,8 @@ import ( "log" ) -const Version = "6.36.0" -const ReleaseDate = "2025-04-27" +const Version = "6.37.0" +const ReleaseDate = "2025-04-30" func PrintVersion() { log.Printf("[INFO] terraform-provider-oci %s\n", Version) diff --git a/internal/integrationtest/containerengine_node_pool_cycling_test.go b/internal/integrationtest/containerengine_node_pool_cycling_test.go new file mode 100644 index 00000000000..7d086810495 --- /dev/null +++ b/internal/integrationtest/containerengine_node_pool_cycling_test.go @@ -0,0 +1,250 @@ +// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +package integrationtest + +import ( + "fmt" + "strconv" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" + "github.com/oracle/terraform-provider-oci/httpreplay" + "github.com/oracle/terraform-provider-oci/internal/acctest" + "github.com/oracle/terraform-provider-oci/internal/resourcediscovery" + "github.com/oracle/terraform-provider-oci/internal/utils" +) + +var ( + nodePoolCyclingRepresentation = map[string]interface{}{ + "cluster_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_containerengine_cluster.test_cluster.id}`}, + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "kubernetes_version": acctest.Representation{RepType: acctest.Required, Create: `${oci_containerengine_cluster.test_cluster.kubernetes_version}`}, + "name": acctest.Representation{RepType: acctest.Required, Create: `name`, Update: `name2`}, + "node_image_name": acctest.Representation{RepType: acctest.Required, Create: `Oracle-Linux-7.6`}, + "node_shape": acctest.Representation{RepType: acctest.Required, Create: `VM.Standard2.2`, Update: `VM.Standard2.1`}, + "defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, + "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}}, + "initial_node_labels": acctest.RepresentationGroup{RepType: acctest.Optional, Group: ContainerengineNodePoolInitialNodeLabelsRepresentation}, + "node_metadata": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"nodeMetadata": "nodeMetadata"}, Update: map[string]string{"nodeMetadata2": "nodeMetadata2"}}, + "node_pool_cycling_details": acctest.RepresentationGroup{RepType: acctest.Optional, Group: nodePoolNodePoolCyclingDetailsRepresentation}, + "ssh_public_key": acctest.Representation{RepType: acctest.Optional, Create: `ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDOuBJgh6lTmQvQJ4BA3RCJdSmxRtmiXAQEEIP68/G4gF3XuZdKEYTFeputacmRq9yO5ZnNXgO9akdUgePpf8+CfFtveQxmN5xo3HVCDKxu/70lbMgeu7+wJzrMOlzj+a4zNq2j0Ww2VWMsisJ6eV3bJTnO/9VLGCOC8M9noaOlcKcLgIYy4aDM724MxFX2lgn7o6rVADHRxkvLEXPVqYT4syvYw+8OVSnNgE4MJLxaw8/2K0qp19YlQyiriIXfQpci3ThxwLjymYRPj+kjU1xIxv6qbFQzHR7ds0pSWp1U06cIoKPfCazU9hGWW8yIe/vzfTbWrt2DK6pLwBn/G0x3 sample`}, + "node_config_details": acctest.RepresentationGroup{RepType: acctest.Required, Group: nodeConfigDetailsCyclingRepresentation}, + "node_eviction_node_pool_settings": acctest.RepresentationGroup{RepType: acctest.Optional, Group: nodeEvictionNodePoolSettingsCyclingRepresentation}, + } + + nodeConfigDetailsCyclingRepresentation = map[string]interface{}{ + "placement_configs": acctest.RepresentationGroup{RepType: acctest.Required, Group: placementConfigsCyclingRepresentation}, + "size": acctest.Representation{RepType: acctest.Required, Create: `1`, Update: `2`}, + "is_pv_encryption_in_transit_enabled": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `true`}, + "defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`}, + "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Finance"}}, + } + + placementConfigsCyclingRepresentation = map[string]interface{}{ + "availability_domain": acctest.Representation{RepType: acctest.Required, Create: `${data.oci_identity_availability_domains.test_availability_domains.availability_domains.0.name}`}, + "subnet_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_core_subnet.nodePool_Subnet_1.id}`}, + } + + nodePoolNodePoolCyclingDetailsRepresentation = map[string]interface{}{ + "cycle_modes": acctest.Representation{RepType: acctest.Optional, Create: []string{"INSTANCE_REPLACE"}, Update: []string{"BOOT_VOLUME_REPLACE"}}, + "is_node_cycling_enabled": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `true`}, + "maximum_surge": acctest.Representation{RepType: acctest.Optional, Create: `1`, Update: `1`}, + "maximum_unavailable": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, + } + + nodeEvictionNodePoolSettingsCyclingRepresentation = map[string]interface{}{ + "eviction_grace_duration": acctest.Representation{RepType: acctest.Optional, Create: `PT1H`, Update: `PT50M`}, + "is_force_action_after_grace_duration": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `false`}, + "is_force_delete_after_grace_duration": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `true`}, + } + + nodePoolResourceCyclingConfig = ContainerengineNodePoolResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_containerengine_node_pool", "test_node_pool", acctest.Optional, acctest.Update, nodePoolCyclingRepresentation) +) + +// issue-routing-tag: containerengine/default +func TestContainerengineNodePoolCycling_basic(t *testing.T) { + httpreplay.SetScenario("TestContainerengineNodePoolCycling_basic") + defer httpreplay.SaveScenario() + + config := acctest.ProviderTestConfig() + + compartmentId := utils.GetEnvSettingWithBlankDefault("compartment_ocid") + compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id\" { default = \"%s\" }\n", compartmentId) + + resourceName := "oci_containerengine_node_pool.test_node_pool" + datasourceName := "data.oci_containerengine_node_pools.test_node_pools" + singularDatasourceName := "data.oci_containerengine_node_pool.test_node_pool" + + 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+ContainerengineNodePoolResourceDependencies+nodePoolResourceConfigForVMStandard+ + acctest.GenerateResourceFromRepresentationMap("oci_containerengine_node_pool", "test_node_pool", acctest.Optional, acctest.Create, nodePoolCyclingRepresentation), "containerengine", "nodePool", t) + + acctest.ResourceTest(t, testAccCheckContainerengineNodePoolDestroy, []resource.TestStep{ + // verify Create with optionals + { + Config: config + compartmentIdVariableStr + ContainerengineNodePoolResourceDependencies + nodePoolResourceConfigForVMStandard + + acctest.GenerateResourceFromRepresentationMap("oci_containerengine_node_pool", "test_node_pool", acctest.Optional, acctest.Create, nodePoolCyclingRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttrSet(resourceName, "cluster_id"), + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "initial_node_labels.#", "1"), + resource.TestCheckResourceAttr(resourceName, "initial_node_labels.0.key", "key"), + resource.TestCheckResourceAttr(resourceName, "initial_node_labels.0.value", "value"), + resource.TestCheckResourceAttrSet(resourceName, "kubernetes_version"), + resource.TestCheckResourceAttr(resourceName, "name", "name"), + resource.TestCheckResourceAttr(resourceName, "node_eviction_node_pool_settings.#", "1"), + resource.TestCheckResourceAttr(resourceName, "node_eviction_node_pool_settings.0.eviction_grace_duration", "PT1H"), + resource.TestCheckResourceAttr(resourceName, "node_eviction_node_pool_settings.0.is_force_action_after_grace_duration", "false"), + resource.TestCheckResourceAttr(resourceName, "node_eviction_node_pool_settings.0.is_force_delete_after_grace_duration", "false"), + resource.TestCheckResourceAttrSet(resourceName, "node_image_id"), + resource.TestCheckResourceAttr(resourceName, "node_metadata.%", "1"), + resource.TestCheckResourceAttr(resourceName, "node_pool_cycling_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "node_pool_cycling_details.0.cycle_modes.#", "1"), + resource.TestCheckResourceAttr(resourceName, "node_pool_cycling_details.0.is_node_cycling_enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "node_pool_cycling_details.0.maximum_surge", "1"), + resource.TestCheckResourceAttr(resourceName, "node_pool_cycling_details.0.maximum_unavailable", "0"), + resource.TestCheckResourceAttr(resourceName, "node_shape", "VM.Standard2.2"), + resource.TestCheckResourceAttr(resourceName, "ssh_public_key", "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDOuBJgh6lTmQvQJ4BA3RCJdSmxRtmiXAQEEIP68/G4gF3XuZdKEYTFeputacmRq9yO5ZnNXgO9akdUgePpf8+CfFtveQxmN5xo3HVCDKxu/70lbMgeu7+wJzrMOlzj+a4zNq2j0Ww2VWMsisJ6eV3bJTnO/9VLGCOC8M9noaOlcKcLgIYy4aDM724MxFX2lgn7o6rVADHRxkvLEXPVqYT4syvYw+8OVSnNgE4MJLxaw8/2K0qp19YlQyiriIXfQpci3ThxwLjymYRPj+kjU1xIxv6qbFQzHR7ds0pSWp1U06cIoKPfCazU9hGWW8yIe/vzfTbWrt2DK6pLwBn/G0x3 sample"), + resource.TestCheckResourceAttr(resourceName, "subnet_ids.#", "1"), + acctest.CheckResourceSetContainsElementWithProperties(resourceName, "node_config_details.0.placement_configs", nil, []string{"capacity_reservation_id"}), + resource.TestCheckResourceAttr(resourceName, "node_config_details.0.size", "1"), + resource.TestCheckResourceAttr(resourceName, "node_config_details.0.is_pv_encryption_in_transit_enabled", "false"), + + func(s *terraform.State) (err error) { + resId, err = acctest.FromInstanceState(s, resourceName, "id") + if isEnableExportCompartment, _ := strconv.ParseBool(utils.GetEnvSettingWithDefault("enable_export_compartment", "true")); isEnableExportCompartment { + if errExport := resourcediscovery.TestExportCompartmentWithResourceName(&resId, &compartmentId, resourceName); errExport != nil { + return errExport + } + } + return err + }, + ), + }, + + // verify updates to updatable parameters + { + Config: config + compartmentIdVariableStr + ContainerengineNodePoolResourceDependencies + nodePoolResourceConfigForVMStandard + + acctest.GenerateResourceFromRepresentationMap("oci_containerengine_node_pool", "test_node_pool", acctest.Optional, acctest.Update, acctest.GetUpdatedRepresentationCopy("node_metadata", acctest.Representation{RepType: acctest.Optional, Update: map[string]string{"nodeMetadata": "nodeMetadata"}}, nodePoolCyclingRepresentation)), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttrSet(resourceName, "cluster_id"), + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "initial_node_labels.#", "1"), + resource.TestCheckResourceAttr(resourceName, "initial_node_labels.0.key", "key2"), + resource.TestCheckResourceAttr(resourceName, "initial_node_labels.0.value", "value2"), + resource.TestCheckResourceAttrSet(resourceName, "kubernetes_version"), + resource.TestCheckResourceAttr(resourceName, "name", "name2"), + resource.TestCheckResourceAttr(resourceName, "node_eviction_node_pool_settings.#", "1"), + resource.TestCheckResourceAttr(resourceName, "node_eviction_node_pool_settings.0.eviction_grace_duration", "PT50M"), + resource.TestCheckResourceAttr(resourceName, "node_eviction_node_pool_settings.0.is_force_action_after_grace_duration", "false"), + resource.TestCheckResourceAttr(resourceName, "node_eviction_node_pool_settings.0.is_force_delete_after_grace_duration", "true"), + resource.TestCheckResourceAttrSet(resourceName, "node_image_id"), + resource.TestCheckResourceAttrSet(resourceName, "node_image_name"), + resource.TestCheckResourceAttr(resourceName, "node_metadata.%", "1"), + resource.TestCheckResourceAttr(resourceName, "node_pool_cycling_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "node_pool_cycling_details.0.cycle_modes.#", "1"), + resource.TestCheckResourceAttr(resourceName, "node_pool_cycling_details.0.is_node_cycling_enabled", "true"), + resource.TestCheckResourceAttr(resourceName, "node_pool_cycling_details.0.maximum_surge", "1"), + resource.TestCheckResourceAttr(resourceName, "node_pool_cycling_details.0.maximum_unavailable", "1"), + resource.TestCheckResourceAttr(resourceName, "node_shape", "VM.Standard2.1"), + resource.TestCheckResourceAttr(resourceName, "ssh_public_key", "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDOuBJgh6lTmQvQJ4BA3RCJdSmxRtmiXAQEEIP68/G4gF3XuZdKEYTFeputacmRq9yO5ZnNXgO9akdUgePpf8+CfFtveQxmN5xo3HVCDKxu/70lbMgeu7+wJzrMOlzj+a4zNq2j0Ww2VWMsisJ6eV3bJTnO/9VLGCOC8M9noaOlcKcLgIYy4aDM724MxFX2lgn7o6rVADHRxkvLEXPVqYT4syvYw+8OVSnNgE4MJLxaw8/2K0qp19YlQyiriIXfQpci3ThxwLjymYRPj+kjU1xIxv6qbFQzHR7ds0pSWp1U06cIoKPfCazU9hGWW8yIe/vzfTbWrt2DK6pLwBn/G0x3 sample"), + resource.TestCheckResourceAttr(resourceName, "node_config_details.0.size", "2"), + resource.TestCheckResourceAttr(resourceName, "node_config_details.0.is_pv_encryption_in_transit_enabled", "true"), + + 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 + }, + ), + }, + // verify datasource + { + Config: config + + acctest.GenerateDataSourceFromRepresentationMap("oci_containerengine_node_pools", "test_node_pools", acctest.Optional, acctest.Update, ContainerengineContainerengineNodePoolDataSourceRepresentation) + + compartmentIdVariableStr + ContainerengineNodePoolResourceDependencies + nodePoolResourceConfigForVMStandard + + acctest.GenerateResourceFromRepresentationMap("oci_containerengine_node_pool", "test_node_pool", acctest.Optional, acctest.Update, nodePoolCyclingRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttrSet(datasourceName, "cluster_id"), + resource.TestCheckResourceAttr(datasourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(datasourceName, "name", "name2"), + + resource.TestCheckResourceAttr(datasourceName, "node_pools.#", "1"), + resource.TestCheckResourceAttrSet(datasourceName, "node_pools.0.cluster_id"), + resource.TestCheckResourceAttr(datasourceName, "node_pools.0.compartment_id", compartmentId), + resource.TestCheckResourceAttr(datasourceName, "node_pools.0.freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(datasourceName, "node_pools.0.id"), + resource.TestCheckResourceAttr(datasourceName, "node_pools.0.initial_node_labels.#", "1"), + resource.TestCheckResourceAttr(datasourceName, "node_pools.0.initial_node_labels.0.key", "key2"), + resource.TestCheckResourceAttr(datasourceName, "node_pools.0.initial_node_labels.0.value", "value2"), + resource.TestCheckResourceAttrSet(datasourceName, "node_pools.0.kubernetes_version"), + resource.TestCheckResourceAttr(datasourceName, "node_pools.0.name", "name2"), + resource.TestCheckResourceAttr(datasourceName, "node_pools.0.node_eviction_node_pool_settings.#", "1"), + resource.TestCheckResourceAttr(datasourceName, "node_pools.0.node_eviction_node_pool_settings.0.eviction_grace_duration", "PT50M"), + resource.TestCheckResourceAttr(datasourceName, "node_pools.0.node_eviction_node_pool_settings.0.is_force_action_after_grace_duration", "false"), + resource.TestCheckResourceAttr(datasourceName, "node_pools.0.node_eviction_node_pool_settings.0.is_force_delete_after_grace_duration", "true"), + resource.TestCheckResourceAttrSet(datasourceName, "node_pools.0.node_image_id"), + resource.TestCheckResourceAttrSet(datasourceName, "node_pools.0.node_image_name"), + resource.TestCheckResourceAttr(datasourceName, "node_pools.0.node_pool_cycling_details.#", "1"), + resource.TestCheckResourceAttr(datasourceName, "node_pools.0.node_pool_cycling_details.0.cycle_modes.#", "1"), + resource.TestCheckResourceAttr(datasourceName, "node_pools.0.node_pool_cycling_details.0.is_node_cycling_enabled", "true"), + resource.TestCheckResourceAttr(datasourceName, "node_pools.0.node_pool_cycling_details.0.maximum_surge", "1"), + resource.TestCheckResourceAttr(datasourceName, "node_pools.0.node_pool_cycling_details.0.maximum_unavailable", "1"), + resource.TestCheckResourceAttr(datasourceName, "node_pools.0.node_shape", "VM.Standard2.1"), + resource.TestCheckResourceAttr(datasourceName, "node_pools.0.node_source.#", "1"), + resource.TestCheckResourceAttr(datasourceName, "node_pools.0.ssh_public_key", "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDOuBJgh6lTmQvQJ4BA3RCJdSmxRtmiXAQEEIP68/G4gF3XuZdKEYTFeputacmRq9yO5ZnNXgO9akdUgePpf8+CfFtveQxmN5xo3HVCDKxu/70lbMgeu7+wJzrMOlzj+a4zNq2j0Ww2VWMsisJ6eV3bJTnO/9VLGCOC8M9noaOlcKcLgIYy4aDM724MxFX2lgn7o6rVADHRxkvLEXPVqYT4syvYw+8OVSnNgE4MJLxaw8/2K0qp19YlQyiriIXfQpci3ThxwLjymYRPj+kjU1xIxv6qbFQzHR7ds0pSWp1U06cIoKPfCazU9hGWW8yIe/vzfTbWrt2DK6pLwBn/G0x3 sample"), + ), + }, + // verify singular datasource + { + Config: config + + acctest.GenerateDataSourceFromRepresentationMap("oci_containerengine_node_pool", "test_node_pool", + acctest.Required, acctest.Create, + ContainerengineContainerengineNodePoolSingularDataSourceRepresentation) + nodePoolResourceConfigForVMStandard + compartmentIdVariableStr + nodePoolResourceCyclingConfig, + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttrSet(singularDatasourceName, "cluster_id"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "node_pool_id"), + + resource.TestCheckResourceAttr(singularDatasourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(singularDatasourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "id"), + resource.TestCheckResourceAttr(singularDatasourceName, "initial_node_labels.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "initial_node_labels.0.key", "key2"), + resource.TestCheckResourceAttr(singularDatasourceName, "initial_node_labels.0.value", "value2"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "kubernetes_version"), + resource.TestCheckResourceAttr(singularDatasourceName, "name", "name2"), + resource.TestCheckResourceAttr(singularDatasourceName, "node_eviction_node_pool_settings.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "node_eviction_node_pool_settings.0.eviction_grace_duration", "PT50M"), + resource.TestCheckResourceAttr(singularDatasourceName, "node_eviction_node_pool_settings.0.is_force_action_after_grace_duration", "false"), + resource.TestCheckResourceAttr(singularDatasourceName, "node_eviction_node_pool_settings.0.is_force_delete_after_grace_duration", "true"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "node_image_id"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "node_image_name"), + resource.TestCheckResourceAttr(singularDatasourceName, "node_metadata.%", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "node_pool_cycling_details.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "node_pool_cycling_details.0.cycle_modes.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "node_pool_cycling_details.0.is_node_cycling_enabled", "true"), + resource.TestCheckResourceAttr(singularDatasourceName, "node_pool_cycling_details.0.maximum_surge", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "node_pool_cycling_details.0.maximum_unavailable", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "node_shape", "VM.Standard2.1"), + resource.TestCheckResourceAttr(singularDatasourceName, "node_source.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "ssh_public_key", "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDOuBJgh6lTmQvQJ4BA3RCJdSmxRtmiXAQEEIP68/G4gF3XuZdKEYTFeputacmRq9yO5ZnNXgO9akdUgePpf8+CfFtveQxmN5xo3HVCDKxu/70lbMgeu7+wJzrMOlzj+a4zNq2j0Ww2VWMsisJ6eV3bJTnO/9VLGCOC8M9noaOlcKcLgIYy4aDM724MxFX2lgn7o6rVADHRxkvLEXPVqYT4syvYw+8OVSnNgE4MJLxaw8/2K0qp19YlQyiriIXfQpci3ThxwLjymYRPj+kjU1xIxv6qbFQzHR7ds0pSWp1U06cIoKPfCazU9hGWW8yIe/vzfTbWrt2DK6pLwBn/G0x3 sample"), + ), + }, + // verify resource import + { + Config: config + NodePoolRequiredOnlyResource, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{}, + ResourceName: resourceName, + }, + }) +} diff --git a/internal/integrationtest/containerengine_node_pool_test.go b/internal/integrationtest/containerengine_node_pool_test.go index 63d5e2eb4f2..cb33a9a59ea 100644 --- a/internal/integrationtest/containerengine_node_pool_test.go +++ b/internal/integrationtest/containerengine_node_pool_test.go @@ -59,7 +59,7 @@ var ( "node_pool_cycling_details": acctest.RepresentationGroup{RepType: acctest.Optional, Group: ContainerengineNodePoolNodePoolCyclingDetailsRepresentation}, "ssh_public_key": acctest.Representation{RepType: acctest.Optional, Create: `ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDOuBJgh6lTmQvQJ4BA3RCJdSmxRtmiXAQEEIP68/G4gF3XuZdKEYTFeputacmRq9yO5ZnNXgO9akdUgePpf8+CfFtveQxmN5xo3HVCDKxu/70lbMgeu7+wJzrMOlzj+a4zNq2j0Ww2VWMsisJ6eV3bJTnO/9VLGCOC8M9noaOlcKcLgIYy4aDM724MxFX2lgn7o6rVADHRxkvLEXPVqYT4syvYw+8OVSnNgE4MJLxaw8/2K0qp19YlQyiriIXfQpci3ThxwLjymYRPj+kjU1xIxv6qbFQzHR7ds0pSWp1U06cIoKPfCazU9hGWW8yIe/vzfTbWrt2DK6pLwBn/G0x3 sample`}, "node_config_details": acctest.RepresentationGroup{RepType: acctest.Required, Group: nodeConfigDetailsRepresentation}, - "node_eviction_node_pool_settings": acctest.RepresentationGroup{RepType: acctest.Optional, Group: nodePoolNodeEvictionNodePoolSettingsRepresentation}, + "node_eviction_node_pool_settings": acctest.RepresentationGroup{RepType: acctest.Optional, Group: ContainerengineNodePoolNodeEvictionNodePoolSettingsRepresentation}, } nodeConfigDetailsRepresentation = map[string]interface{}{ @@ -88,11 +88,14 @@ var ( "key": acctest.Representation{RepType: acctest.Optional, Create: `key`, Update: `key2`}, "value": acctest.Representation{RepType: acctest.Optional, Create: `value`, Update: `value2`}, } - nodePoolNodeEvictionNodePoolSettingsRepresentation = map[string]interface{}{ + + ContainerengineNodePoolNodeEvictionNodePoolSettingsRepresentation = map[string]interface{}{ "eviction_grace_duration": acctest.Representation{RepType: acctest.Optional, Create: `PT1H`, Update: `PT50M`}, + "is_force_action_after_grace_duration": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `false`}, "is_force_delete_after_grace_duration": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `true`}, } ContainerengineNodePoolNodePoolCyclingDetailsRepresentation = map[string]interface{}{ + "cycle_modes": acctest.Representation{RepType: acctest.Optional, Create: []string{"INSTANCE_REPLACE"}, Update: []string{"INSTANCE_REPLACE"}}, "is_node_cycling_enabled": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `false`}, "maximum_surge": acctest.Representation{RepType: acctest.Optional, Create: `1`, Update: `2`}, "maximum_unavailable": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, @@ -164,7 +167,10 @@ var ( })) + acctest.GenerateResourceFromRepresentationMap("oci_core_subnet", "nodePool_Subnet_1", acctest.Required, acctest.Create, acctest.RepresentationCopyWithNewProperties(CoreSubnetRepresentation, map[string]interface{}{"security_list_ids": acctest.Representation{RepType: acctest.Required, Create: []string{`${oci_core_security_list.test_security_list.id}`}}, "route_table_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_core_route_table.test_route_table.id}`}, "availability_domain": acctest.Representation{RepType: acctest.Required, Create: `${lower("${data.oci_identity_availability_domains.test_availability_domains.availability_domains.0.name}")}`}, "cidr_block": acctest.Representation{RepType: acctest.Required, Create: `10.0.22.0/24`}, "dns_label": acctest.Representation{RepType: acctest.Required, Create: `nodepool1`}})) + acctest.GenerateResourceFromRepresentationMap("oci_core_subnet", "nodePool_Subnet_2", acctest.Required, acctest.Create, acctest.RepresentationCopyWithNewProperties(CoreSubnetRepresentation, map[string]interface{}{"security_list_ids": acctest.Representation{RepType: acctest.Required, Create: []string{`${oci_core_security_list.test_security_list.id}`}}, "route_table_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_core_route_table.test_route_table.id}`}, "availability_domain": acctest.Representation{RepType: acctest.Required, Create: `${lower("${data.oci_identity_availability_domains.test_availability_domains.availability_domains.0.name}")}`}, "cidr_block": acctest.Representation{RepType: acctest.Required, Create: `10.0.23.0/24`}, "dns_label": acctest.Representation{RepType: acctest.Required, Create: `nodepool2`}})) + - acctest.GenerateResourceFromRepresentationMap("oci_containerengine_cluster", "test_cluster", acctest.Required, acctest.Create, ContainerengineClusterRepresentation) + + acctest.GenerateResourceFromRepresentationMap("oci_containerengine_cluster", "test_cluster", acctest.Required, acctest.Create, + acctest.RepresentationCopyWithNewProperties(ContainerengineClusterRepresentation, map[string]interface{}{ + "type": acctest.Representation{RepType: acctest.Required, Create: `ENHANCED_CLUSTER`, Update: `ENHANCED_CLUSTER`}, + })) + acctest.GenerateResourceFromRepresentationMap("oci_core_subnet", "clusterSubnet_1", acctest.Required, acctest.Create, acctest.RepresentationCopyWithNewProperties(CoreSubnetRepresentation, map[string]interface{}{"security_list_ids": acctest.Representation{RepType: acctest.Required, Create: []string{`${oci_core_security_list.test_security_list.id}`}}, "availability_domain": acctest.Representation{RepType: acctest.Required, Create: `${lower("${data.oci_identity_availability_domains.test_availability_domains.availability_domains.0.name}")}`}, "cidr_block": acctest.Representation{RepType: acctest.Required, Create: `10.0.20.0/24`}, "dns_label": acctest.Representation{RepType: acctest.Required, Create: `cluster1`}})) + acctest.GenerateResourceFromRepresentationMap("oci_core_subnet", "clusterSubnet_2", acctest.Required, acctest.Create, acctest.RepresentationCopyWithNewProperties(CoreSubnetRepresentation, map[string]interface{}{"security_list_ids": acctest.Representation{RepType: acctest.Required, Create: []string{`${oci_core_security_list.test_security_list.id}`}}, "availability_domain": acctest.Representation{RepType: acctest.Required, Create: `${lower("${data.oci_identity_availability_domains.test_availability_domains.availability_domains.0.name}")}`}, "cidr_block": acctest.Representation{RepType: acctest.Required, Create: `10.0.21.0/24`}, "dns_label": acctest.Representation{RepType: acctest.Required, Create: `cluster2`}})) + AvailabilityDomainConfig + @@ -201,7 +207,8 @@ func TestContainerengineNodePoolResource_basic(t *testing.T) { acctest.ResourceTest(t, testAccCheckContainerengineNodePoolDestroy, []resource.TestStep{ // verify Create { - Config: config + compartmentIdVariableStr + ContainerengineNodePoolResourceDependencies + nodePoolResourceConfigForVMStandard + acctest.GenerateResourceFromRepresentationMap("oci_containerengine_node_pool", "test_node_pool", acctest.Required, acctest.Create, nodePoolRepresentation), + Config: config + compartmentIdVariableStr + ContainerengineNodePoolResourceDependencies + nodePoolResourceConfigForVMStandard + + acctest.GenerateResourceFromRepresentationMap("oci_containerengine_node_pool", "test_node_pool", acctest.Required, acctest.Create, nodePoolRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttrSet(resourceName, "cluster_id"), resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), @@ -235,10 +242,12 @@ func TestContainerengineNodePoolResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "name", "name"), resource.TestCheckResourceAttr(resourceName, "node_eviction_node_pool_settings.#", "1"), resource.TestCheckResourceAttr(resourceName, "node_eviction_node_pool_settings.0.eviction_grace_duration", "PT1H"), + resource.TestCheckResourceAttr(resourceName, "node_eviction_node_pool_settings.0.is_force_action_after_grace_duration", "false"), resource.TestCheckResourceAttr(resourceName, "node_eviction_node_pool_settings.0.is_force_delete_after_grace_duration", "false"), resource.TestCheckResourceAttrSet(resourceName, "node_image_id"), resource.TestCheckResourceAttr(resourceName, "node_metadata.%", "1"), resource.TestCheckResourceAttr(resourceName, "node_pool_cycling_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "node_pool_cycling_details.0.cycle_modes.#", "1"), resource.TestCheckResourceAttr(resourceName, "node_pool_cycling_details.0.is_node_cycling_enabled", "false"), resource.TestCheckResourceAttr(resourceName, "node_pool_cycling_details.0.maximum_surge", "1"), resource.TestCheckResourceAttr(resourceName, "node_pool_cycling_details.0.maximum_unavailable", "0"), @@ -275,6 +284,7 @@ func TestContainerengineNodePoolResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "name", "name2"), resource.TestCheckResourceAttr(resourceName, "node_eviction_node_pool_settings.#", "1"), resource.TestCheckResourceAttr(resourceName, "node_eviction_node_pool_settings.0.eviction_grace_duration", "PT50M"), + resource.TestCheckResourceAttr(resourceName, "node_eviction_node_pool_settings.0.is_force_action_after_grace_duration", "false"), resource.TestCheckResourceAttr(resourceName, "node_eviction_node_pool_settings.0.is_force_delete_after_grace_duration", "true"), resource.TestCheckResourceAttrSet(resourceName, "node_image_id"), resource.TestCheckResourceAttrSet(resourceName, "node_image_name"), @@ -320,6 +330,7 @@ func TestContainerengineNodePoolResource_basic(t *testing.T) { resource.TestCheckResourceAttr(datasourceName, "node_pools.0.name", "name2"), resource.TestCheckResourceAttr(datasourceName, "node_pools.0.node_eviction_node_pool_settings.#", "1"), resource.TestCheckResourceAttr(datasourceName, "node_pools.0.node_eviction_node_pool_settings.0.eviction_grace_duration", "PT50M"), + resource.TestCheckResourceAttr(datasourceName, "node_pools.0.node_eviction_node_pool_settings.0.is_force_action_after_grace_duration", "false"), resource.TestCheckResourceAttr(datasourceName, "node_pools.0.node_eviction_node_pool_settings.0.is_force_delete_after_grace_duration", "true"), resource.TestCheckResourceAttrSet(datasourceName, "node_pools.0.node_image_id"), resource.TestCheckResourceAttrSet(datasourceName, "node_pools.0.node_image_name"), @@ -352,6 +363,7 @@ func TestContainerengineNodePoolResource_basic(t *testing.T) { resource.TestCheckResourceAttr(singularDatasourceName, "name", "name2"), resource.TestCheckResourceAttr(singularDatasourceName, "node_eviction_node_pool_settings.#", "1"), resource.TestCheckResourceAttr(singularDatasourceName, "node_eviction_node_pool_settings.0.eviction_grace_duration", "PT50M"), + resource.TestCheckResourceAttr(singularDatasourceName, "node_eviction_node_pool_settings.0.is_force_action_after_grace_duration", "false"), resource.TestCheckResourceAttr(singularDatasourceName, "node_eviction_node_pool_settings.0.is_force_delete_after_grace_duration", "true"), resource.TestCheckResourceAttrSet(singularDatasourceName, "node_image_id"), resource.TestCheckResourceAttrSet(singularDatasourceName, "node_image_name"), diff --git a/internal/integrationtest/core_instance_test.go b/internal/integrationtest/core_instance_test.go index 907d72a3283..790f2a1ac89 100644 --- a/internal/integrationtest/core_instance_test.go +++ b/internal/integrationtest/core_instance_test.go @@ -892,6 +892,35 @@ data "oci_kms_keys" "test_keys_dependency_RSA" { "subnet_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_core_subnet.test_subnet.id}`}, "state": acctest.Representation{RepType: acctest.Optional, Create: `STOPPED`, Update: `RUNNING`}, } + instanceUpdateShapeAndCapacityReservation = map[string]interface{}{ + "availability_domain": acctest.Representation{RepType: acctest.Required, Create: `${data.oci_identity_availability_domains.test_availability_domains.availability_domains.0.name}`}, + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "shape": acctest.Representation{RepType: acctest.Required, Create: `VM.Standard2.1`, Update: `VM.Standard2.2`}, + "capacity_reservation_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_core_compute_capacity_reservation.before_test_compute_capacity_reservation.id}`, Update: `${oci_core_compute_capacity_reservation.after_test_compute_capacity_reservation.id}`}, + "create_vnic_details": acctest.RepresentationGroup{RepType: acctest.Required, Group: CoreInstanceCreateVnicDetailsRepresentation}, + "display_name": acctest.Representation{RepType: acctest.Required, Create: `displayName`}, + "source_details": acctest.RepresentationGroup{RepType: acctest.Required, Group: CoreInstanceSourceDetailsRepresentation}, + } + createCapacityReservationForInstanceBeforeUpdate = map[string]interface{}{ + "availability_domain": acctest.Representation{RepType: acctest.Required, Create: `${data.oci_identity_availability_domains.test_availability_domains.availability_domains.0.name}`}, + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "instance_reservation_configs": acctest.RepresentationGroup{RepType: acctest.Required, Group: setCapacityReservationShapeBeforeUpdate}, + "is_default_reservation": acctest.Representation{RepType: acctest.Required, Create: `false`}, + } + setCapacityReservationShapeBeforeUpdate = map[string]interface{}{ + "instance_shape": acctest.Representation{RepType: acctest.Required, Create: `VM.Standard2.1`}, + "reserved_count": acctest.Representation{RepType: acctest.Required, Create: `1`}, + } + createCapacityReservationForInstanceAfterUpdate = map[string]interface{}{ + "availability_domain": acctest.Representation{RepType: acctest.Required, Create: `${data.oci_identity_availability_domains.test_availability_domains.availability_domains.0.name}`}, + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "instance_reservation_configs": acctest.RepresentationGroup{RepType: acctest.Required, Group: setCapacityReservationShapeAfterUpdate}, + "is_default_reservation": acctest.Representation{RepType: acctest.Required, Create: `false`}, + } + setCapacityReservationShapeAfterUpdate = map[string]interface{}{ + "instance_shape": acctest.Representation{RepType: acctest.Required, Create: `VM.Standard2.2`}, + "reserved_count": acctest.Representation{RepType: acctest.Required, Create: `1`}, + } ) // issue-routing-tag: core/computeSharedOwnershipVmAndBm @@ -1879,6 +1908,73 @@ func TestCoreInstanceResource_updateBootVolumeKmsKey(t *testing.T) { }) } +func TestCoreInstanceResource_updateShapeAndCapacityReservation(t *testing.T) { + httpreplay.SetScenario("TestCoreInstanceResource_updateShapeAndCapacityReservation") + defer httpreplay.SaveScenario() + + compartmentId := utils.GetEnvSettingWithBlankDefault("compartment_ocid") + compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id\" { default = \"%s\" }\n", compartmentId) + + resourceName := "oci_core_instance.test_instance" + + capacityReservationConfig := + utils.OciImageIdsVariable + + acctest.GenerateResourceFromRepresentationMap("oci_core_network_security_group", "test_network_security_group", acctest.Required, acctest.Create, CoreNetworkSecurityGroupRepresentation) + + acctest.GenerateResourceFromRepresentationMap("oci_core_subnet", "test_subnet", acctest.Required, acctest.Create, acctest.RepresentationCopyWithNewProperties(CoreSubnetRepresentation, map[string]interface{}{ + "dns_label": acctest.Representation{RepType: acctest.Required, Create: `dnslabel`}, + })) + + acctest.GenerateResourceFromRepresentationMap("oci_core_vcn", "test_vcn", acctest.Required, acctest.Create, acctest.RepresentationCopyWithNewProperties(CoreVcnRepresentation, map[string]interface{}{ + "dns_label": acctest.Representation{RepType: acctest.Required, Create: `dnslabel`}, + })) + + acctest.GenerateResourceFromRepresentationMap("oci_core_vlan", "test_vlan", acctest.Required, acctest.Create, + acctest.GetUpdatedRepresentationCopy("cidr_block", acctest.Representation{RepType: acctest.Required, Create: `10.0.1.0/30`}, CoreVlanRepresentation)) + + AvailabilityDomainConfig + + DefinedTagsDependencies + + CoreKeyResourceDependencyConfig + + acctest.ProviderTestConfig() + compartmentIdVariableStr + + acctest.GenerateResourceFromRepresentationMap("oci_core_compute_capacity_reservation", "before_test_compute_capacity_reservation", acctest.Required, acctest.Create, createCapacityReservationForInstanceBeforeUpdate) + + acctest.GenerateResourceFromRepresentationMap("oci_core_compute_capacity_reservation", "after_test_compute_capacity_reservation", acctest.Required, acctest.Create, createCapacityReservationForInstanceAfterUpdate) + + var resId, resId2 string + instanceCreationConfig := capacityReservationConfig + + acctest.GenerateResourceFromRepresentationMap("oci_core_instance", "test_instance", acctest.Required, acctest.Create, + instanceUpdateShapeAndCapacityReservation) + // Save TF content to Create resource with optional properties. + acctest.SaveConfigContent(instanceCreationConfig, "core", "instance", t) + + acctest.ResourceTest(t, testAccCheckCoreInstanceDestroy, []resource.TestStep{ + // verify Create + { + Config: instanceCreationConfig, + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "shape", "VM.Standard2.1"), + + func(s *terraform.State) (err error) { + resId, err = acctest.FromInstanceState(s, resourceName, "id") + return err + }, + ), + }, + // verify update to add kms key id in source details + { + Config: capacityReservationConfig + + acctest.GenerateResourceFromRepresentationMap("oci_core_instance", "test_instance", acctest.Required, acctest.Update, + instanceUpdateShapeAndCapacityReservation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "shape", "VM.Standard2.2"), + + 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 + }, + ), + }, + }) +} + // this test uses a hard coded cluster placement group due to Platform team will not implement // Terraform provider for MVP stage func TestCoreInstanceResource_clusterPlacementGroup(t *testing.T) { diff --git a/internal/integrationtest/database_autonomous_database_resource_test.go b/internal/integrationtest/database_autonomous_database_resource_test.go index d5a12975bb5..566c50b27ba 100644 --- a/internal/integrationtest/database_autonomous_database_resource_test.go +++ b/internal/integrationtest/database_autonomous_database_resource_test.go @@ -4687,7 +4687,7 @@ func TestDatabaseAutonomousDatabaseResource_DeveloperDatabases(t *testing.T) { t.Skip("Skipping TestDatabaseAutonomousDatabase_opsi_dbms test.\n" + "Current TF_VAR_should_skip_adbs_test=" + shouldSkipADBStest) } - httpreplay.SetScenario("TestDatabaseAutonomousDatabaseResource_scheduledOperations") + httpreplay.SetScenario("TestDatabaseAutonomousDatabaseResource_DeveloperDatabases") defer httpreplay.SaveScenario() config := acctest.ProviderTestConfig() @@ -5011,6 +5011,46 @@ func TestDatabaseAutonomousDatabaseResource_scheduledOperations(t *testing.T) { }, ), }, + //test to verify if the plan fails. + { + Config: config + compartmentIdVariableStr + DatabaseAutonomousDatabaseResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_database_autonomous_database", "test_autonomous_database", acctest.Optional, acctest.Create, + acctest.RepresentationCopyWithNewProperties(autonomousDatabaseRepresentationForScheduledOperations, + map[string]interface{}{ + "enable_delete_scheduled_operations": acctest.Representation{RepType: acctest.Optional, Create: `true`}, + })), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "admin_password", "BEstrO0ng_#11"), + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + // verify computed field db_workload to be defaulted to OLTP + resource.TestCheckResourceAttr(resourceName, "db_workload", "OLTP"), + func(s *terraform.State) (err error) { + _, err = acctest.FromInstanceState(s, resourceName, "id") + return err + }, + ), + }, + { + Config: config + compartmentIdVariableStr + DatabaseAutonomousDatabaseResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_database_autonomous_database", "test_autonomous_database", acctest.Optional, acctest.Create, + acctest.RepresentationCopyWithNewProperties(autonomousDatabaseRepresentationForScheduledOperations, + map[string]interface{}{ + "enable_delete_scheduled_operations": acctest.Representation{RepType: acctest.Optional, Create: `true`}, + "cpu_core_count": acctest.Representation{RepType: acctest.Optional, Create: `10`}, + })), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "admin_password", "BEstrO0ng_#11"), + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + // verify computed field db_workload to be defaulted to OLTP + resource.TestCheckResourceAttr(resourceName, "db_workload", "OLTP"), + resource.TestCheckResourceAttr(resourceName, "scheduled_operations.#", "0"), + resource.TestCheckResourceAttr(resourceName, "cpu_core_count", "10"), + func(s *terraform.State) (err error) { + _, err = acctest.FromInstanceState(s, resourceName, "id") + return err + }, + ), + }, }) } @@ -5021,7 +5061,7 @@ func TestDatabaseAutonomousDatabaseResource_dbTools(t *testing.T) { t.Skip("Skipping TestDatabaseAutonomousDatabaseResource_dbTools test.\n" + "Current TF_VAR_should_skip_adbs_test=" + shouldSkipADBStest) } - httpreplay.SetScenario("TestDatabaseAutonomousDatabaseResource_scheduledOperations") + httpreplay.SetScenario("TestDatabaseAutonomousDatabaseResource_dbTools") defer httpreplay.SaveScenario() config := acctest.ProviderTestConfig() diff --git a/internal/integrationtest/disaster_recovery_dr_plan_execution_test.go b/internal/integrationtest/disaster_recovery_dr_plan_execution_test.go index b6277bffaba..02e2758df58 100644 --- a/internal/integrationtest/disaster_recovery_dr_plan_execution_test.go +++ b/internal/integrationtest/disaster_recovery_dr_plan_execution_test.go @@ -50,10 +50,10 @@ var ( DisasterRecoveryDrPlanExecutionRepresentation = map[string]interface{}{ "execution_options": acctest.RepresentationGroup{RepType: acctest.Required, Group: DisasterRecoveryDrPlanExecutionExecutionOptionsRepresentation}, "plan_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_disaster_recovery_dr_plan.test_dr_plan.id}`}, - "defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, - "display_name": acctest.Representation{RepType: acctest.Optional, Create: `Precheck Switchover from PHX to IAD`, Update: `displayName2`}, - "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}}, - "lifecycle": acctest.RepresentationGroup{RepType: acctest.Optional, Group: DefinedTagsIgnoreRepresentation}, + //"defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, + "display_name": acctest.Representation{RepType: acctest.Optional, Create: `Precheck Switchover from PHX to IAD`, Update: `displayName2`}, + "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}}, + "lifecycle": acctest.RepresentationGroup{RepType: acctest.Optional, Group: DefinedTagsIgnoreRepresentation}, } DisasterRecoveryDrPlanExecutionExecutionOptionsRepresentation = map[string]interface{}{ "plan_execution_type": acctest.Representation{RepType: acctest.Required, Create: `SWITCHOVER_PRECHECK`}, @@ -62,11 +62,10 @@ var ( } DisasterRecoveryDrPlanExecutionResourceDependencies = acctest.GenerateResourceFromRepresentationMap("oci_disaster_recovery_dr_protection_group", "test_peer", acctest.Optional, acctest.Create, DisasterRecoveryPeerDrProtectionGroupRepresentation) + - OKEClusterDependencyConfig + ObjectStorageBucketDependencyConfig + VolumeGroupDependencyConfig + - AvailabilityDomainConfig + - DefinedTagsDependencies + AvailabilityDomainConfig + //DefinedTagsDependencies DrProtectionGroupConfig = acctest.GenerateResourceFromRepresentationMap("oci_disaster_recovery_dr_protection_group", "test_dr_protection_group", acctest.Optional, acctest.Create, DisasterRecoveryDrProtectionGroupRepresentation) diff --git a/internal/integrationtest/disaster_recovery_dr_plan_test.go b/internal/integrationtest/disaster_recovery_dr_plan_test.go index fd28d7647b7..40de6af51de 100644 --- a/internal/integrationtest/disaster_recovery_dr_plan_test.go +++ b/internal/integrationtest/disaster_recovery_dr_plan_test.go @@ -58,8 +58,8 @@ var ( "display_name": acctest.Representation{RepType: acctest.Required, Create: `Switchover from PHX to IAD`, Update: `displayName2`}, "dr_protection_group_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_disaster_recovery_dr_protection_group.test_peer.id}`}, "type": acctest.Representation{RepType: acctest.Required, Create: `SWITCHOVER`}, - "defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, - "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}}, + //"defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, + "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}}, //"source_plan_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_disaster_recovery_source_plan.test_source_plan.id}`}, "refresh_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, "verify_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, @@ -70,8 +70,8 @@ var ( "display_name": acctest.Representation{RepType: acctest.Required, Create: `Switchover from PHX to IAD`, Update: `displayName2`}, "dr_protection_group_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_disaster_recovery_dr_protection_group.test_peer.id}`}, "type": acctest.Representation{RepType: acctest.Required, Create: `SWITCHOVER`}, - "defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, - "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}}, + //"defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, + "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}}, //"source_plan_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_disaster_recovery_source_plan.test_source_plan.id}`}, "lifecycle": acctest.RepresentationGroup{RepType: acctest.Optional, Group: DefinedTagsIgnoreRepresentation}, } @@ -97,11 +97,10 @@ var ( ` DisasterRecoveryDrPlanResourceDependencies = acctest.GenerateResourceFromRepresentationMap("oci_disaster_recovery_dr_protection_group", "test_peer", acctest.Optional, acctest.Create, DisasterRecoveryPeerDrProtectionGroupRepresentation) + - OKEClusterDependencyConfig + ObjectStorageBucketDependencyConfig + VolumeGroupDependencyConfig + - AvailabilityDomainConfig + - DefinedTagsDependencies + AvailabilityDomainConfig + //DefinedTagsDependencies ) // issue-routing-tag: disaster_recovery/default @@ -239,7 +238,7 @@ func TestDisasterRecoveryDrPlanResource_basic(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "peer_dr_protection_group_id"), resource.TestCheckResourceAttrSet(resourceName, "peer_region"), //resource.TestCheckResourceAttrSet(resourceName, "source_plan_id"), - resource.TestCheckResourceAttr(resourceName, "plan_groups.#", "4"), + resource.TestCheckResourceAttr(resourceName, "plan_groups.#", "3"), resource.TestCheckResourceAttrSet(resourceName, "state"), resource.TestCheckResourceAttrSet(resourceName, "time_created"), resource.TestCheckResourceAttrSet(resourceName, "time_updated"), @@ -272,7 +271,7 @@ func TestDisasterRecoveryDrPlanResource_basic(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "peer_dr_protection_group_id"), resource.TestCheckResourceAttrSet(resourceName, "peer_region"), //resource.TestCheckResourceAttrSet(resourceName, "source_plan_id"), - resource.TestCheckResourceAttr(resourceName, "plan_groups.#", "4"), + resource.TestCheckResourceAttr(resourceName, "plan_groups.#", "3"), resource.TestCheckResourceAttrSet(resourceName, "state"), resource.TestCheckResourceAttrSet(resourceName, "time_created"), resource.TestCheckResourceAttrSet(resourceName, "time_updated"), @@ -339,7 +338,7 @@ func TestDisasterRecoveryDrPlanResource_basic(t *testing.T) { }, // Disassociate DrProtectionGroup { - Config: config + compartmentIdVariableStr + DisasterRecoveryDrPlanResourceDependencies + + Config: config + compartmentIdVariableStr + DisasterRecoveryDrPlanExecutionResourceDependencies + DrProtectionGroupWithDisassociateTriggerConfig, Check: acctest.ComposeAggregateTestCheckFuncWrapper( func(s *terraform.State) (err error) { diff --git a/internal/integrationtest/disaster_recovery_dr_protection_group_test.go b/internal/integrationtest/disaster_recovery_dr_protection_group_test.go index 8a3503f134e..2724fc6cc06 100644 --- a/internal/integrationtest/disaster_recovery_dr_protection_group_test.go +++ b/internal/integrationtest/disaster_recovery_dr_protection_group_test.go @@ -42,19 +42,18 @@ var ( "role": acctest.Representation{RepType: acctest.Optional, Create: `PRIMARY`}, "state": acctest.Representation{RepType: acctest.Optional, Create: `ACTIVE`}, "filter": acctest.RepresentationGroup{RepType: acctest.Required, Group: DisasterRecoveryDrProtectionGroupDataSourceFilterRepresentation}} - DisasterRecoveryDrProtectionGroupDataSourceFilterRepresentation = map[string]interface{}{ "name": acctest.Representation{RepType: acctest.Required, Create: `id`}, "values": acctest.Representation{RepType: acctest.Required, Create: []string{`${oci_disaster_recovery_dr_protection_group.test_dr_protection_group.id}`}}, } DisasterRecoveryDrProtectionGroupRepresentation = map[string]interface{}{ - "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, - "display_name": acctest.Representation{RepType: acctest.Required, Create: `My DR Protection Group`, Update: `displayName2`}, - "log_location": acctest.RepresentationGroup{RepType: acctest.Required, Group: DisasterRecoveryDrProtectionGroupLogLocationRepresentation}, - "association": acctest.RepresentationGroup{RepType: acctest.Optional, Group: DisasterRecoveryDrProtectionGroupAssociationRepresentation}, - "members": acctest.RepresentationGroup{RepType: acctest.Required, Group: DisasterRecoveryDrProtectionGroupMembersRepresentation}, - "defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "display_name": acctest.Representation{RepType: acctest.Required, Create: `My DR Protection Group`, Update: `displayName2`}, + "log_location": acctest.RepresentationGroup{RepType: acctest.Required, Group: DisasterRecoveryDrProtectionGroupLogLocationRepresentation}, + "association": acctest.RepresentationGroup{RepType: acctest.Optional, Group: DisasterRecoveryDrProtectionGroupAssociationRepresentation}, + "members": acctest.RepresentationGroup{RepType: acctest.Required, Group: DisasterRecoveryDrProtectionGroupMembersRepresentation}, + //"defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}}, "lifecycle": acctest.RepresentationGroup{RepType: acctest.Optional, Group: DefinedTagsIgnoreRepresentation}, "disassociate_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`}, @@ -64,7 +63,6 @@ var ( "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, "display_name": acctest.Representation{RepType: acctest.Required, Create: `peerDisplayName`}, "log_location": acctest.RepresentationGroup{RepType: acctest.Required, Group: DisasterRecoveryDrProtectionGroupLogLocationRepresentation}, - "members": acctest.RepresentationGroup{RepType: acctest.Required, Group: DisasterRecoveryPeerDrProtectionGroupMembersRepresentation}, } DefinedTagsIgnoreRepresentation = map[string]interface{}{ @@ -82,31 +80,10 @@ var ( } DisasterRecoveryDrProtectionGroupMembersRepresentation = map[string]interface{}{ - "member_id": acctest.Representation{RepType: acctest.Required, Create: `${data.oci_containerengine_clusters.test_clusters.clusters[0].id}`}, - "member_type": acctest.Representation{RepType: acctest.Required, Create: `OKE_CLUSTER`}, - "peer_cluster_id": acctest.Representation{RepType: acctest.Required, Create: `${data.oci_containerengine_clusters.peer_clusters.clusters[0].id}`}, - "backup_location": acctest.RepresentationGroup{RepType: acctest.Required, Group: OKEClusterBackupLocationRep}, - "backup_config": acctest.RepresentationGroup{RepType: acctest.Required, Group: OKEClusterBackupConfigRep}, - } - - DisasterRecoveryPeerDrProtectionGroupMembersRepresentation = map[string]interface{}{ - "member_id": acctest.Representation{RepType: acctest.Required, Create: `${data.oci_containerengine_clusters.peer_clusters.clusters[0].id}`}, - "member_type": acctest.Representation{RepType: acctest.Required, Create: `OKE_CLUSTER`}, - "peer_cluster_id": acctest.Representation{RepType: acctest.Required, Create: `${data.oci_containerengine_clusters.test_clusters.clusters[0].id}`}, - "backup_location": acctest.RepresentationGroup{RepType: acctest.Required, Group: OKEClusterBackupLocationRep}, - "backup_config": acctest.RepresentationGroup{RepType: acctest.Required, Group: OKEClusterBackupConfigRep}, - } - - OKEClusterBackupLocationRep = map[string]interface{}{ - "bucket": acctest.Representation{RepType: acctest.Required, Create: `${data.oci_objectstorage_bucket.oke_test_bucket.name}`}, - "namespace": acctest.Representation{RepType: acctest.Required, Create: `${data.oci_objectstorage_namespace.test_namespace.namespace}`}, - } - - OKEClusterBackupConfigRep = map[string]interface{}{ - "backup_schedule": acctest.Representation{RepType: acctest.Required, Create: `FREQ=HOURLY;BYHOUR=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16;INTERVAL=1`, Update: `FREQ=HOURLY;BYHOUR=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16;INTERVAL=2`}, - "namespaces": acctest.Representation{RepType: acctest.Required, Create: []string{}}, - "max_number_of_backups_retained": acctest.Representation{RepType: acctest.Required, Create: `10`, Update: `11`}, - "replicate_images": acctest.Representation{RepType: acctest.Required, Create: `DISABLE`, Update: `ENABLE`}, + "member_id": acctest.Representation{RepType: acctest.Required, Create: `${data.oci_objectstorage_bucket.test_member_bucket.bucket_id}`}, + "member_type": acctest.Representation{RepType: acctest.Required, Create: `OBJECT_STORAGE_BUCKET`}, + "bucket": acctest.Representation{RepType: acctest.Required, Create: `${data.oci_objectstorage_bucket.test_member_bucket.name}`}, + "namespace": acctest.Representation{RepType: acctest.Required, Create: `${data.oci_objectstorage_namespace.test_namespace.namespace}`}, } DisasterRecoveryDrProtectionGroupWithComputeMemberConfig = ` @@ -119,11 +96,11 @@ var ( bucket = data.oci_objectstorage_bucket.test_bucket.name namespace = data.oci_objectstorage_namespace.test_namespace.namespace } - members { + members { member_id = data.oci_core_instances.dr_instances.instances[0].id member_type = "COMPUTE_INSTANCE_MOVABLE" } - } + } ` ObjectStorageBucketDependencyConfig = ` @@ -143,9 +120,15 @@ var ( namespace = data.oci_objectstorage_namespace.test_namespace.namespace name = "example-bucket-source" } - data "oci_objectstorage_bucket" "oke_test_bucket" { - namespace = data.oci_objectstorage_namespace.test_namespace.namespace - name = "oke-backup-bucket" + ` + + ComputeInstanceDependencyConfig = ` + data "oci_core_instances" "dr_instances" { + #Required + compartment_id = var.compartment_id + + #Optional + display_name = "example-instance" } ` @@ -159,43 +142,85 @@ var ( display_name = "example-volume-group" state = "AVAILABLE" } + data "oci_core_volume_backup_policies" "test_backup_policy" { + #Required + compartment_id = var.compartment_id + } ` - OKEClusterDependencyConfig = ` - data "oci_containerengine_clusters" "test_clusters" { - #Required - compartment_id = var.compartment_id + FileSystemDependencyConfig = ` + data "oci_file_storage_file_systems" "test_file_systems" { + #Required + compartment_id = var.compartment_id - #Optional - name = "myCluster" + #Optional + display_name = "example-file-system" + availability_domain = data.oci_identity_availability_domains.test_availability_domains.availability_domains[0].name } + ` - data "oci_containerengine_clusters" "peer_clusters" { - #Required - compartment_id = var.compartment_id - - #Optional - name = "peerCluster" + DisasterRecoveryDrProtectionGroupWithVolumeGroupMemberConfig = ` + resource "oci_disaster_recovery_dr_protection_group" "test_dr_protection_group" { + #Required + compartment_id = var.compartment_id + display_name = "My DR Protection Group" + log_location { + #Required + bucket = data.oci_objectstorage_bucket.test_bucket.name + namespace = data.oci_objectstorage_namespace.test_namespace.namespace + } + members { + member_id = data.oci_core_volume_groups.test_volume_groups.volume_groups[0].id + member_type = "VOLUME_GROUP" + destination_backup_policy_id = data.oci_core_volume_backup_policies.test_backup_policy.volume_backup_policies[0].id + } + + # Optional + association { + role = "PRIMARY" + peer_id = oci_disaster_recovery_dr_protection_group.test_peer.id + peer_region = var.region + } } ` - ComputeInstanceDependencyConfig = ` - data "oci_core_instances" "dr_instances" { - #Required - compartment_id = var.compartment_id - - #Optional - display_name = "example-instance" + DisasterRecoveryDrProtectionGroupWithFileSystemMemberConfig = ` + resource "oci_disaster_recovery_dr_protection_group" "test_dr_protection_group" { + #Required + compartment_id = var.compartment_id + display_name = "My DR Protection Group" + log_location { + #Required + bucket = data.oci_objectstorage_bucket.test_bucket.name + namespace = data.oci_objectstorage_namespace.test_namespace.namespace + } + members { + member_id = "ocid1.filesystem.oc1.uk_london_1.aaaaaaaaaalfsel3nruhellqojxwiotvnmwwy33omrxw4ljrfvqwiljr" + member_type = "FILE_SYSTEM" + destination_availability_domain = "MGpW:UK-LONDON-1-AD-2" + destination_snapshot_policy_id = "ocid1.filesystemsnapshotpolicy.oc1.uk_london_1.aaaaaby27vie7y7znruhellqojxwiotvnmwwy33omrxw4ljrfvqwiljs" + export_mappings { + export_id = "ocid1.export.oc1.uk_london_1.aaaaacvipp24kiennruhellqojxwiotvnmwwy33omrxw4ljrfvqwiljr" + destination_mount_target_id = "ocid1.mounttarget.oc1.uk_london_1.aaaaaa4np2vysybcnruhellqojxwiotvnmwwy33omrxw4ljrfvqwiljs" + } + } + + # Optional + association { + role = "PRIMARY" + peer_id = oci_disaster_recovery_dr_protection_group.test_peer.id + peer_region = var.region + } } ` DisasterRecoveryDrProtectionGroupResourceDependencies = acctest.GenerateResourceFromRepresentationMap("oci_disaster_recovery_dr_protection_group", "test_peer", acctest.Optional, acctest.Create, DisasterRecoveryPeerDrProtectionGroupRepresentation) + ObjectStorageBucketDependencyConfig + - OKEClusterDependencyConfig + VolumeGroupDependencyConfig + ComputeInstanceDependencyConfig + - AvailabilityDomainConfig + - DefinedTagsDependencies + FileSystemDependencyConfig + + AvailabilityDomainConfig + //DefinedTagsDependencies ) // issue-routing-tag: disaster_recovery/default @@ -247,7 +272,7 @@ func TestDisasterRecoveryDrProtectionGroupResource_basic(t *testing.T) { }, ), }, - // Create with OKE + // verify Create with Object Storage Bucket as member of DR Protection Group { Config: config + compartmentIdVariableStr + DisasterRecoveryDrProtectionGroupResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_disaster_recovery_dr_protection_group", "test_dr_protection_group", acctest.Required, acctest.Create, DisasterRecoveryDrProtectionGroupRepresentation), @@ -259,7 +284,7 @@ func TestDisasterRecoveryDrProtectionGroupResource_basic(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "log_location.0.namespace"), resource.TestCheckResourceAttr(resourceName, "members.#", "1"), resource.TestCheckResourceAttrSet(resourceName, "members.0.member_id"), - resource.TestCheckResourceAttr(resourceName, "members.0.member_type", "OKE_CLUSTER"), + resource.TestCheckResourceAttr(resourceName, "members.0.member_type", "OBJECT_STORAGE_BUCKET"), func(s *terraform.State) (err error) { resId, err = acctest.FromInstanceState(s, resourceName, "id") @@ -267,19 +292,20 @@ func TestDisasterRecoveryDrProtectionGroupResource_basic(t *testing.T) { }, ), }, - // Update member of DR Protection Group: Remove OKE Cluster, Add Compute Instance + + // Remove members from DR Protection Group { Config: config + compartmentIdVariableStr + DisasterRecoveryDrProtectionGroupResourceDependencies + - DisasterRecoveryDrProtectionGroupWithComputeMemberConfig, + acctest.GenerateResourceFromRepresentationMap("oci_disaster_recovery_dr_protection_group", "test_dr_protection_group", acctest.Required, acctest.Create, acctest.RepresentationCopyWithRemovedProperties(DisasterRecoveryDrProtectionGroupRepresentation, []string{"members"})), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), resource.TestCheckResourceAttr(resourceName, "display_name", "My DR Protection Group"), resource.TestCheckResourceAttr(resourceName, "log_location.#", "1"), resource.TestCheckResourceAttr(resourceName, "log_location.0.bucket", "testBucketName"), resource.TestCheckResourceAttrSet(resourceName, "log_location.0.namespace"), - resource.TestCheckResourceAttr(resourceName, "members.#", "1"), - resource.TestCheckResourceAttrSet(resourceName, "members.0.member_id"), - resource.TestCheckResourceAttr(resourceName, "members.0.member_type", "COMPUTE_INSTANCE_MOVABLE"), + resource.TestCheckResourceAttr(resourceName, "members.#", "0"), + resource.TestCheckNoResourceAttr(resourceName, "members.0.member_id"), + resource.TestCheckNoResourceAttr(resourceName, "members.0.member_type"), func(s *terraform.State) (err error) { resId, err = acctest.FromInstanceState(s, resourceName, "id") @@ -288,67 +314,105 @@ func TestDisasterRecoveryDrProtectionGroupResource_basic(t *testing.T) { ), }, - // Remove members from DR Protection Group + // delete before next Create + { + Config: config + compartmentIdVariableStr + DisasterRecoveryDrProtectionGroupResourceDependencies, + }, + // verify Create with optionals { Config: config + compartmentIdVariableStr + DisasterRecoveryDrProtectionGroupResourceDependencies + - acctest.GenerateResourceFromRepresentationMap("oci_disaster_recovery_dr_protection_group", "test_dr_protection_group", acctest.Required, acctest.Create, acctest.RepresentationCopyWithRemovedProperties(DisasterRecoveryDrProtectionGroupRepresentation, []string{"members"})), + acctest.GenerateResourceFromRepresentationMap("oci_disaster_recovery_dr_protection_group", "test_dr_protection_group", acctest.Optional, acctest.Create, DisasterRecoveryDrProtectionGroupRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "association.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "association.0.peer_id"), + resource.TestCheckResourceAttr(resourceName, "association.0.peer_region", region), + resource.TestCheckResourceAttr(resourceName, "association.0.role", "PRIMARY"), resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), resource.TestCheckResourceAttr(resourceName, "display_name", "My DR Protection Group"), + resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(resourceName, "id"), resource.TestCheckResourceAttr(resourceName, "log_location.#", "1"), resource.TestCheckResourceAttr(resourceName, "log_location.0.bucket", "testBucketName"), resource.TestCheckResourceAttrSet(resourceName, "log_location.0.namespace"), - resource.TestCheckResourceAttr(resourceName, "members.#", "0"), - resource.TestCheckNoResourceAttr(resourceName, "members.0.member_id"), - resource.TestCheckNoResourceAttr(resourceName, "members.0.member_type"), + resource.TestCheckResourceAttr(resourceName, "members.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "members.0.member_id"), + resource.TestCheckResourceAttr(resourceName, "members.0.member_type", "OBJECT_STORAGE_BUCKET"), + resource.TestCheckResourceAttrSet(resourceName, "role"), + resource.TestCheckResourceAttrSet(resourceName, "state"), + resource.TestCheckResourceAttrSet(resourceName, "time_created"), + resource.TestCheckResourceAttrSet(resourceName, "time_updated"), func(s *terraform.State) (err error) { resId, err = acctest.FromInstanceState(s, resourceName, "id") + if isEnableExportCompartment, _ := strconv.ParseBool(utils.GetEnvSettingWithDefault("enable_export_compartment", "true")); isEnableExportCompartment { + if errExport := resourcediscovery.TestExportCompartmentWithResourceName(&resId, &compartmentId, resourceName); errExport != nil { + return errExport + } + } return err }, ), }, - // delete before next Create - { - Config: config + compartmentIdVariableStr + DisasterRecoveryDrProtectionGroupResourceDependencies, - }, - // verify Create with optionals + // Verify create with optionals, add VolumeGroup with Backup policy configured as a member { Config: config + compartmentIdVariableStr + DisasterRecoveryDrProtectionGroupResourceDependencies + - acctest.GenerateResourceFromRepresentationMap("oci_disaster_recovery_dr_protection_group", "test_dr_protection_group", acctest.Optional, acctest.Create, DisasterRecoveryDrProtectionGroupRepresentation), + DisasterRecoveryDrProtectionGroupWithVolumeGroupMemberConfig, Check: acctest.ComposeAggregateTestCheckFuncWrapper( - // Basic Resource Configuration + resource.TestCheckResourceAttr(resourceName, "association.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "association.0.peer_id"), + resource.TestCheckResourceAttr(resourceName, "association.0.peer_region", region), + resource.TestCheckResourceAttr(resourceName, "association.0.role", "PRIMARY"), resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), resource.TestCheckResourceAttr(resourceName, "display_name", "My DR Protection Group"), resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "log_location.#", "1"), + resource.TestCheckResourceAttr(resourceName, "log_location.0.bucket", "testBucketName"), + resource.TestCheckResourceAttrSet(resourceName, "log_location.0.namespace"), + resource.TestCheckResourceAttr(resourceName, "members.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "members.0.member_id"), + resource.TestCheckResourceAttr(resourceName, "members.0.member_type", "VOLUME_GROUP"), + resource.TestCheckResourceAttrSet(resourceName, "role"), resource.TestCheckResourceAttrSet(resourceName, "state"), resource.TestCheckResourceAttrSet(resourceName, "time_created"), resource.TestCheckResourceAttrSet(resourceName, "time_updated"), - // Association Configuration + func(s *terraform.State) (err error) { + resId, err = acctest.FromInstanceState(s, resourceName, "id") + if isEnableExportCompartment, _ := strconv.ParseBool(utils.GetEnvSettingWithDefault("enable_export_compartment", "true")); isEnableExportCompartment { + if errExport := resourcediscovery.TestExportCompartmentWithResourceName(&resId, &compartmentId, resourceName); errExport != nil { + return errExport + } + } + return err + }, + ), + }, + + // Verify create with optionals, add FileSystem with Snapshot policy configured as a member + { + Config: config + compartmentIdVariableStr + DisasterRecoveryDrProtectionGroupResourceDependencies + + DisasterRecoveryDrProtectionGroupWithFileSystemMemberConfig, + Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttr(resourceName, "association.#", "1"), resource.TestCheckResourceAttrSet(resourceName, "association.0.peer_id"), resource.TestCheckResourceAttr(resourceName, "association.0.peer_region", region), resource.TestCheckResourceAttr(resourceName, "association.0.role", "PRIMARY"), - resource.TestCheckResourceAttrSet(resourceName, "role"), - - // Log Location Configuration + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(resourceName, "display_name", "My DR Protection Group"), + resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(resourceName, "id"), resource.TestCheckResourceAttr(resourceName, "log_location.#", "1"), resource.TestCheckResourceAttr(resourceName, "log_location.0.bucket", "testBucketName"), resource.TestCheckResourceAttrSet(resourceName, "log_location.0.namespace"), - - // Members Configuration resource.TestCheckResourceAttr(resourceName, "members.#", "1"), resource.TestCheckResourceAttrSet(resourceName, "members.0.member_id"), - resource.TestCheckResourceAttr(resourceName, "members.0.member_type", "OKE_CLUSTER"), - - // Backup Configuration - resource.TestCheckResourceAttr(resourceName, "members.0.backup_config.#", "1"), - resource.TestCheckResourceAttr(resourceName, "members.0.backup_config.0.backup_schedule", "FREQ=HOURLY;BYHOUR=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16;INTERVAL=1"), - resource.TestCheckResourceAttr(resourceName, "members.0.backup_config.0.max_number_of_backups_retained", "10"), - resource.TestCheckResourceAttr(resourceName, "members.0.backup_config.0.replicate_images", "DISABLE"), + resource.TestCheckResourceAttr(resourceName, "members.0.member_type", "FILE_SYSTEM"), + resource.TestCheckResourceAttrSet(resourceName, "role"), + resource.TestCheckResourceAttrSet(resourceName, "state"), + resource.TestCheckResourceAttrSet(resourceName, "time_created"), + resource.TestCheckResourceAttrSet(resourceName, "time_updated"), func(s *terraform.State) (err error) { resId, err = acctest.FromInstanceState(s, resourceName, "id") @@ -364,43 +428,30 @@ func TestDisasterRecoveryDrProtectionGroupResource_basic(t *testing.T) { // verify Update to the compartment (the compartment will be switched back in the next step) { - // Test configuration for compartment update verification Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + DisasterRecoveryDrProtectionGroupResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_disaster_recovery_dr_protection_group", "test_dr_protection_group", acctest.Optional, acctest.Create, acctest.RepresentationCopyWithNewProperties(DisasterRecoveryDrProtectionGroupRepresentation, map[string]interface{}{ "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id_for_update}`}, })), Check: acctest.ComposeAggregateTestCheckFuncWrapper( - // Basic Resource Configuration - resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentIdU), - resource.TestCheckResourceAttr(resourceName, "display_name", "My DR Protection Group"), - resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), - resource.TestCheckResourceAttrSet(resourceName, "id"), - resource.TestCheckResourceAttrSet(resourceName, "state"), - resource.TestCheckResourceAttrSet(resourceName, "time_created"), - resource.TestCheckResourceAttrSet(resourceName, "time_updated"), - - // Association Configuration resource.TestCheckResourceAttr(resourceName, "association.#", "1"), resource.TestCheckResourceAttrSet(resourceName, "association.0.peer_id"), resource.TestCheckResourceAttr(resourceName, "association.0.peer_region", region), resource.TestCheckResourceAttr(resourceName, "association.0.role", "PRIMARY"), - resource.TestCheckResourceAttrSet(resourceName, "role"), - - // Log Location Configuration + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentIdU), + resource.TestCheckResourceAttr(resourceName, "display_name", "My DR Protection Group"), + resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(resourceName, "id"), resource.TestCheckResourceAttr(resourceName, "log_location.#", "1"), resource.TestCheckResourceAttr(resourceName, "log_location.0.bucket", "testBucketName"), resource.TestCheckResourceAttrSet(resourceName, "log_location.0.namespace"), - - // Members Configuration resource.TestCheckResourceAttr(resourceName, "members.#", "1"), resource.TestCheckResourceAttrSet(resourceName, "members.0.member_id"), - resource.TestCheckResourceAttr(resourceName, "members.0.member_type", "OKE_CLUSTER"), - - // Backup Configuration - resource.TestCheckResourceAttr(resourceName, "members.0.backup_config.#", "1"), - resource.TestCheckResourceAttr(resourceName, "members.0.backup_config.0.backup_schedule", "FREQ=HOURLY;BYHOUR=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16;INTERVAL=1"), - resource.TestCheckResourceAttr(resourceName, "members.0.backup_config.0.max_number_of_backups_retained", "10"), + resource.TestCheckResourceAttr(resourceName, "members.0.member_type", "OBJECT_STORAGE_BUCKET"), + resource.TestCheckResourceAttrSet(resourceName, "role"), + resource.TestCheckResourceAttrSet(resourceName, "state"), + resource.TestCheckResourceAttrSet(resourceName, "time_created"), + resource.TestCheckResourceAttrSet(resourceName, "time_updated"), func(s *terraform.State) (err error) { resId2, err = acctest.FromInstanceState(s, resourceName, "id") @@ -414,40 +465,27 @@ func TestDisasterRecoveryDrProtectionGroupResource_basic(t *testing.T) { // verify updates to updatable parameters { - // Test configuration for general property updates Config: config + compartmentIdVariableStr + DisasterRecoveryDrProtectionGroupResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_disaster_recovery_dr_protection_group", "test_dr_protection_group", acctest.Optional, acctest.Update, DisasterRecoveryDrProtectionGroupRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( - // Basic Resource Configuration - resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), - resource.TestCheckResourceAttr(resourceName, "display_name", "displayName2"), // Updated - resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), - resource.TestCheckResourceAttrSet(resourceName, "id"), - resource.TestCheckResourceAttrSet(resourceName, "state"), - resource.TestCheckResourceAttrSet(resourceName, "time_created"), - resource.TestCheckResourceAttrSet(resourceName, "time_updated"), - - // Association Configuration resource.TestCheckResourceAttr(resourceName, "association.#", "1"), resource.TestCheckResourceAttrSet(resourceName, "association.0.peer_id"), resource.TestCheckResourceAttr(resourceName, "association.0.peer_region", region), resource.TestCheckResourceAttr(resourceName, "association.0.role", "PRIMARY"), - resource.TestCheckResourceAttrSet(resourceName, "role"), - - // Log Location Configuration - Updated Values + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(resourceName, "display_name", "displayName2"), + resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(resourceName, "id"), resource.TestCheckResourceAttr(resourceName, "log_location.#", "1"), - resource.TestCheckResourceAttr(resourceName, "log_location.0.bucket", "testBucketName_1"), // Updated + resource.TestCheckResourceAttr(resourceName, "log_location.0.bucket", "testBucketName_1"), resource.TestCheckResourceAttrSet(resourceName, "log_location.0.namespace"), - - // Members Configuration resource.TestCheckResourceAttr(resourceName, "members.#", "1"), resource.TestCheckResourceAttrSet(resourceName, "members.0.member_id"), - resource.TestCheckResourceAttr(resourceName, "members.0.member_type", "OKE_CLUSTER"), - - // Backup Configuration - resource.TestCheckResourceAttr(resourceName, "members.0.backup_config.#", "1"), - resource.TestCheckResourceAttr(resourceName, "members.0.backup_config.0.backup_schedule", "FREQ=HOURLY;BYHOUR=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16;INTERVAL=2"), // Updated - resource.TestCheckResourceAttr(resourceName, "members.0.backup_config.0.max_number_of_backups_retained", "11"), // Updated + resource.TestCheckResourceAttr(resourceName, "members.0.member_type", "OBJECT_STORAGE_BUCKET"), + resource.TestCheckResourceAttrSet(resourceName, "role"), + resource.TestCheckResourceAttrSet(resourceName, "state"), + resource.TestCheckResourceAttrSet(resourceName, "time_created"), + resource.TestCheckResourceAttrSet(resourceName, "time_updated"), func(s *terraform.State) (err error) { resId2, err = acctest.FromInstanceState(s, resourceName, "id") @@ -477,43 +515,27 @@ func TestDisasterRecoveryDrProtectionGroupResource_basic(t *testing.T) { }, // verify singular datasource { - // Test configuration for singular data source Config: config + - acctest.GenerateDataSourceFromRepresentationMap("oci_disaster_recovery_dr_protection_group", "test_dr_protection_group", - acctest.Required, acctest.Create, DisasterRecoveryDisasterRecoveryDrProtectionGroupSingularDataSourceRepresentation) + + acctest.GenerateDataSourceFromRepresentationMap("oci_disaster_recovery_dr_protection_group", "test_dr_protection_group", acctest.Required, acctest.Create, DisasterRecoveryDisasterRecoveryDrProtectionGroupSingularDataSourceRepresentation) + compartmentIdVariableStr + DisasterRecoveryDrProtectionGroupResourceConfig, Check: acctest.ComposeAggregateTestCheckFuncWrapper( - // Basic Data Source Attributes resource.TestCheckResourceAttrSet(singularDatasourceName, "dr_protection_group_id"), - resource.TestCheckResourceAttrSet(singularDatasourceName, "id"), resource.TestCheckResourceAttr(singularDatasourceName, "compartment_id", compartmentId), resource.TestCheckResourceAttr(singularDatasourceName, "display_name", "displayName2"), resource.TestCheckResourceAttr(singularDatasourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "id"), resource.TestCheckNoResourceAttr(singularDatasourceName, "life_cycle_details"), - - // Log Location Configuration resource.TestCheckResourceAttr(singularDatasourceName, "log_location.#", "1"), resource.TestCheckResourceAttr(singularDatasourceName, "log_location.0.bucket", "testBucketName_1"), resource.TestCheckResourceAttrSet(singularDatasourceName, "log_location.0.namespace"), - - // Association and Role Configuration + resource.TestCheckResourceAttr(singularDatasourceName, "members.#", "1"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "members.0.member_type"), resource.TestCheckResourceAttrSet(singularDatasourceName, "peer_id"), resource.TestCheckResourceAttrSet(singularDatasourceName, "peer_region"), resource.TestCheckResourceAttrSet(singularDatasourceName, "role"), - - // Members Configuration - resource.TestCheckResourceAttr(singularDatasourceName, "members.#", "1"), - resource.TestCheckResourceAttrSet(singularDatasourceName, "members.0.member_type"), - - // Lifecycle Attributes resource.TestCheckResourceAttrSet(singularDatasourceName, "state"), resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"), resource.TestCheckResourceAttrSet(singularDatasourceName, "time_updated"), - - // Backup Configuration - resource.TestCheckResourceAttr(resourceName, "members.0.backup_config.#", "1"), - resource.TestCheckResourceAttr(resourceName, "members.0.backup_config.0.backup_schedule", "FREQ=HOURLY;BYHOUR=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16;INTERVAL=2"), // Updated - resource.TestCheckResourceAttr(resourceName, "members.0.backup_config.0.max_number_of_backups_retained", "11"), ), }, // verify resource import diff --git a/internal/integrationtest/mysql_mysql_db_system_test.go b/internal/integrationtest/mysql_mysql_db_system_test.go index be703eb082f..f48bc337d72 100644 --- a/internal/integrationtest/mysql_mysql_db_system_test.go +++ b/internal/integrationtest/mysql_mysql_db_system_test.go @@ -114,7 +114,7 @@ var ( mysqlDbSystemDeletionPolicyRepresentation = map[string]interface{}{ // Don't update these as setting the deletion policy to true or backup retention to retain will leave resources // that can't be removed. - "automatic_backup_retention": acctest.Representation{RepType: acctest.Optional, Create: `DELETE`, Update: `RETAIN`}, + "automatic_backup_retention": acctest.Representation{RepType: acctest.Optional, Create: `RETAIN`, Update: `DELETE`}, "final_backup": acctest.Representation{RepType: acctest.Optional, Create: `SKIP_FINAL_BACKUP`, Update: `REQUIRE_FINAL_BACKUP`}, //"is_delete_protected": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `true`}, "is_delete_protected": acctest.Representation{RepType: acctest.Optional, Create: `false`}, @@ -208,7 +208,7 @@ func TestMysqlMysqlDbSystemResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "database_management", "DISABLED"), resource.TestCheckResourceAttr(resourceName, "database_mode", "READ_WRITE"), resource.TestCheckResourceAttr(resourceName, "deletion_policy.#", "1"), - resource.TestCheckResourceAttr(resourceName, "deletion_policy.0.automatic_backup_retention", "DELETE"), + resource.TestCheckResourceAttr(resourceName, "deletion_policy.0.automatic_backup_retention", "RETAIN"), resource.TestCheckResourceAttr(resourceName, "deletion_policy.0.final_backup", "SKIP_FINAL_BACKUP"), resource.TestCheckResourceAttr(resourceName, "deletion_policy.0.is_delete_protected", "false"), resource.TestCheckResourceAttr(resourceName, "description", "MySQL Database Service"), @@ -272,7 +272,7 @@ func TestMysqlMysqlDbSystemResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "database_management", "DISABLED"), resource.TestCheckResourceAttr(resourceName, "database_mode", "READ_WRITE"), resource.TestCheckResourceAttr(resourceName, "deletion_policy.#", "1"), - resource.TestCheckResourceAttr(resourceName, "deletion_policy.0.automatic_backup_retention", "RETAIN"), + resource.TestCheckResourceAttr(resourceName, "deletion_policy.0.automatic_backup_retention", "DELETE"), resource.TestCheckResourceAttr(resourceName, "deletion_policy.0.final_backup", "REQUIRE_FINAL_BACKUP"), resource.TestCheckResourceAttr(resourceName, "deletion_policy.0.is_delete_protected", "false"), resource.TestCheckResourceAttr(resourceName, "description", "description2"), @@ -334,7 +334,7 @@ func TestMysqlMysqlDbSystemResource_basic(t *testing.T) { resource.TestCheckResourceAttr(datasourceName, "db_systems.0.database_management", "DISABLED"), resource.TestCheckResourceAttr(datasourceName, "db_systems.0.database_mode", "READ_WRITE"), resource.TestCheckResourceAttr(datasourceName, "db_systems.0.deletion_policy.#", "1"), - resource.TestCheckResourceAttr(datasourceName, "db_systems.0.deletion_policy.0.automatic_backup_retention", "RETAIN"), + resource.TestCheckResourceAttr(datasourceName, "db_systems.0.deletion_policy.0.automatic_backup_retention", "DELETE"), resource.TestCheckResourceAttr(datasourceName, "db_systems.0.deletion_policy.0.final_backup", "REQUIRE_FINAL_BACKUP"), resource.TestCheckResourceAttr(datasourceName, "db_systems.0.deletion_policy.0.is_delete_protected", "false"), resource.TestCheckResourceAttr(datasourceName, "db_systems.0.description", "description2"), @@ -383,7 +383,7 @@ func TestMysqlMysqlDbSystemResource_basic(t *testing.T) { resource.TestCheckResourceAttr(singularDatasourceName, "database_management", "DISABLED"), resource.TestCheckResourceAttr(singularDatasourceName, "database_mode", "READ_WRITE"), resource.TestCheckResourceAttr(singularDatasourceName, "deletion_policy.#", "1"), - resource.TestCheckResourceAttr(singularDatasourceName, "deletion_policy.0.automatic_backup_retention", "RETAIN"), + resource.TestCheckResourceAttr(singularDatasourceName, "deletion_policy.0.automatic_backup_retention", "DELETE"), resource.TestCheckResourceAttr(singularDatasourceName, "deletion_policy.0.final_backup", "REQUIRE_FINAL_BACKUP"), resource.TestCheckResourceAttr(singularDatasourceName, "deletion_policy.0.is_delete_protected", "false"), resource.TestCheckResourceAttr(singularDatasourceName, "description", "description2"), diff --git a/internal/integrationtest/nosql_table_replica_test.go b/internal/integrationtest/nosql_table_replica_test.go index e8ec4d9b18d..ea92931e96b 100644 --- a/internal/integrationtest/nosql_table_replica_test.go +++ b/internal/integrationtest/nosql_table_replica_test.go @@ -75,6 +75,18 @@ func TestNosqlTableReplicaResource_basic(t *testing.T) { Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttr(resourceName, "region", "ca-montreal-1"), resource.TestCheckResourceAttrSet(resourceName, "table_name_or_id"), + resource.TestCheckResourceAttr(resourceName, "max_write_units", "10"), + ), + }, + + // update the max_read_units/max_write_units of the resource, the changes should be ignored + { + Config: config + compartmentIdVariableStr + NosqlTableReplicaResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_nosql_table_replica", "test_table_replica", acctest.Optional, acctest.Create, NosqlTableReplicaRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "region", "ca-montreal-1"), + resource.TestCheckResourceAttrSet(resourceName, "table_name_or_id"), + resource.TestCheckResourceAttr(resourceName, "max_write_units", "10"), ), }, diff --git a/internal/integrationtest/nosql_table_resource_test.go b/internal/integrationtest/nosql_table_resource_test.go index 204bcbf4deb..3809478bad4 100644 --- a/internal/integrationtest/nosql_table_resource_test.go +++ b/internal/integrationtest/nosql_table_resource_test.go @@ -102,6 +102,9 @@ func TestNosqlTableResource_test(t *testing.T) { compartmentId := utils.GetEnvSettingWithBlankDefault("compartment_ocid") compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id\" { default = \"%s\" }\n", compartmentId) + compartmentIdU := utils.GetEnvSettingWithDefault("compartment_id_for_update", compartmentId) + compartmentIdUVariableStr := fmt.Sprintf("variable \"compartment_id_for_update\" { default = \"%s\" }\n", compartmentIdU) + ondemandResourceName := "oci_nosql_table.test_ondemand" ondemandDatasourceName := "data.oci_nosql_tables.test_tables" ondemandSingularDatasourceName := "data.oci_nosql_table.test_ondemand" @@ -240,7 +243,22 @@ func TestNosqlTableResource_test(t *testing.T) { resource.TestCheckResourceAttr(childResourceName, "compartment_id", compartmentId), resource.TestCheckResourceAttr(childResourceName, "ddl_statement", childTableDdlStatement), resource.TestCheckResourceAttr(childResourceName, "name", "test_table.test_child"), - resource.TestCheckNoResourceAttr(childResourceName, "table_limits"), + resource.TestCheckResourceAttr(childResourceName, "table_limits.#", "0"), + ), + }, + + // verify updating compartment of the child table will be ignored + { + Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + ChildTableResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_nosql_table", "test_child", acctest.Required, acctest.Create, + acctest.RepresentationCopyWithNewProperties(childTableRepresentation, map[string]interface{}{ + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id_for_update}`}, + })), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr(childResourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(childResourceName, "ddl_statement", childTableDdlStatement), + resource.TestCheckResourceAttr(childResourceName, "name", "test_table.test_child"), + resource.TestCheckResourceAttr(childResourceName, "table_limits.#", "0"), ), }, @@ -257,7 +275,7 @@ func TestNosqlTableResource_test(t *testing.T) { resource.TestCheckResourceAttrSet(childDataResourceName, "table_collection.0.id"), resource.TestCheckResourceAttr(childDataResourceName, "table_collection.0.name", "test_table.test_child"), resource.TestCheckResourceAttr(childDataResourceName, "table_collection.0.state", "ACTIVE"), - resource.TestCheckNoResourceAttr(childDataResourceName, "table_limits"), + resource.TestCheckResourceAttr(childDataResourceName, "table_limits.#", "0"), ), }, @@ -276,7 +294,7 @@ func TestNosqlTableResource_test(t *testing.T) { resource.TestCheckResourceAttr(singularChildDatasourceName, "state", "ACTIVE"), resource.TestCheckResourceAttrSet(singularChildDatasourceName, "time_created"), resource.TestCheckResourceAttrSet(singularChildDatasourceName, "time_updated"), - resource.TestCheckNoResourceAttr(singularChildDatasourceName, "table_limits"), + resource.TestCheckResourceAttr(singularChildDatasourceName, "table_limits.#", "0"), ), }, diff --git a/internal/integrationtest/resource_scheduler_schedule_sync_update_test.go b/internal/integrationtest/resource_scheduler_schedule_sync_update_test.go index a82cf8aa962..2d72fdc3597 100644 --- a/internal/integrationtest/resource_scheduler_schedule_sync_update_test.go +++ b/internal/integrationtest/resource_scheduler_schedule_sync_update_test.go @@ -15,7 +15,6 @@ import ( ) var ( - computeInstanceUpdateSyncOcid = utils.GetEnvSettingWithBlankDefault("computeInstance_ocid") ResourceScheduleUpdateSyncRequiredOnlyResource = ResourceSchedulerScheduleResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_resource_scheduler_schedule", "test_schedule", acctest.Required, acctest.Create, ResourceScheduleUpdateSyncRepresentation) @@ -39,15 +38,15 @@ var ( // Optionals "description": acctest.Representation{RepType: acctest.Optional, Create: `provider description1`, Update: `provider description2`}, "display_name": acctest.Representation{RepType: acctest.Optional, Create: `provider displayName1`, Update: `provider displayName2`}, - "time_ends": acctest.Representation{RepType: acctest.Optional, Create: `2024-11-20T00:00:00Z`, Update: `2024-11-20T00:00:00Z`}, - "time_starts": acctest.Representation{RepType: acctest.Optional, Create: `2024-11-15T00:00:00Z`, Update: `2024-11-15T00:00:00Z`}, + "time_ends": acctest.Representation{RepType: acctest.Optional, Create: `2025-12-31T00:00:00Z`, Update: `2025-12-25T00:00:00Z`}, + "time_starts": acctest.Representation{RepType: acctest.Optional, Create: `2025-05-01T00:00:00Z`, Update: `2025-05-11T00:00:00Z`}, "defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Finance"}}, "lifecycle": acctest.RepresentationGroup{RepType: acctest.Optional, Group: ignoreChangesDefinedTagsResourceSchedulerRepresentation}, } ResourceSchedulerScheduleResourcesUpdateSyncRepresentation = map[string]interface{}{ - "id": acctest.Representation{RepType: acctest.Required, Create: computeInstanceUpdateSyncOcid, Update: computeInstanceUpdateSyncOcid}, + "id": acctest.Representation{RepType: acctest.Required, Create: `${var.compute_ocid}`, Update: `${var.compute_ocid}`}, // mimic customer's behavior "metadata": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"metadata": "metadata"}, Update: map[string]string{"metadata": "metadata"}}, } @@ -62,6 +61,9 @@ func TestResourceScheduleUpdateSync(t *testing.T) { compartmentId := utils.GetEnvSettingWithBlankDefault("compartment_ocid") compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id\" { default = \"%s\" }\n", compartmentId) + computeOcid := utils.GetEnvSettingWithBlankDefault("compute_ocid") + computeOcidVariableStr := fmt.Sprintf("variable \"compute_ocid\" { default = \"%s\" }\n", computeOcid) + resourceName := "oci_resource_scheduler_schedule.test_schedule" singularDatasourceName := "data.oci_resource_scheduler_schedule.test_schedule" datasourceName := "data.oci_resource_scheduler_schedules.test_schedules" @@ -74,7 +76,7 @@ func TestResourceScheduleUpdateSync(t *testing.T) { acctest.ResourceTest(t, testAccCheckResourceSchedulerScheduleDestroy, []resource.TestStep{ //verify Create with Required - resource ocids { - Config: config + compartmentIdVariableStr + ResourceSchedulerScheduleResourceDependencies + + Config: config + compartmentIdVariableStr + computeOcidVariableStr + ResourceSchedulerScheduleResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_resource_scheduler_schedule", "test_schedule", acctest.Required, acctest.Create, ResourceScheduleUpdateSyncRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( @@ -100,7 +102,7 @@ func TestResourceScheduleUpdateSync(t *testing.T) { // verify create with optionals - resourceOCID { - Config: config + compartmentIdVariableStr + ResourceSchedulerScheduleResourceDependencies + + Config: config + compartmentIdVariableStr + computeOcidVariableStr + ResourceSchedulerScheduleResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_resource_scheduler_schedule", "test_schedule", acctest.Optional, acctest.Create, ResourceScheduleUpdateSyncRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( @@ -111,11 +113,11 @@ func TestResourceScheduleUpdateSync(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "recurrence_type", "ICAL"), resource.TestCheckResourceAttr(resourceName, "description", "provider description1"), resource.TestCheckResourceAttr(resourceName, "display_name", "provider displayName1"), - resource.TestCheckResourceAttr(resourceName, "time_ends", "2024-11-20T00:00:00Z"), - resource.TestCheckResourceAttr(resourceName, "time_starts", "2024-11-15T00:00:00Z"), + resource.TestCheckResourceAttr(resourceName, "time_ends", "2025-12-31T00:00:00Z"), + resource.TestCheckResourceAttr(resourceName, "time_starts", "2025-05-01T00:00:00Z"), resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), resource.TestCheckResourceAttr(resourceName, "resources.#", "1"), - resource.TestCheckResourceAttr(resourceName, "resources.0.id", computeInstanceUpdateSyncOcid), + resource.TestCheckResourceAttr(resourceName, "resources.0.id", computeOcid), resource.TestCheckResourceAttr(resourceName, "resources.0.metadata.%", "1"), func(s *terraform.State) (err error) { @@ -127,7 +129,7 @@ func TestResourceScheduleUpdateSync(t *testing.T) { //verify updates to updatable parameters { - Config: config + compartmentIdVariableStr + ResourceSchedulerScheduleResourceDependencies + + Config: config + compartmentIdVariableStr + computeOcidVariableStr + ResourceSchedulerScheduleResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_resource_scheduler_schedule", "test_schedule", acctest.Optional, acctest.Update, ResourceScheduleUpdateSyncRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttrSet(resourceName, "id"), @@ -138,16 +140,15 @@ func TestResourceScheduleUpdateSync(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "recurrence_type", "ICAL"), resource.TestCheckResourceAttr(resourceName, "description", "provider description2"), resource.TestCheckResourceAttr(resourceName, "display_name", "provider displayName2"), - resource.TestCheckResourceAttr(resourceName, "time_ends", "2024-11-20T00:00:00Z"), - resource.TestCheckResourceAttr(resourceName, "time_starts", "2024-11-15T00:00:00Z"), + resource.TestCheckResourceAttr(resourceName, "time_ends", "2025-12-25T00:00:00Z"), + resource.TestCheckResourceAttr(resourceName, "time_starts", "2025-05-11T00:00:00Z"), resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), resource.TestCheckResourceAttr(resourceName, "resources.#", "1"), - resource.TestCheckResourceAttr(resourceName, "resources.0.id", computeInstanceOcid), + resource.TestCheckResourceAttr(resourceName, "resources.0.id", computeOcid), resource.TestCheckResourceAttr(resourceName, "resources.0.metadata.%", "1"), func(s *terraform.State) (err error) { resId2, err = acctest.FromInstanceState(s, resourceName, "id") - fmt.Printf("xiaotong printing resId and resId2, %s, %s", resId, resId2) if resId != resId2 { return fmt.Errorf("Resource recreated when it was supposed to be updated.") } @@ -160,7 +161,7 @@ func TestResourceScheduleUpdateSync(t *testing.T) { { Config: config + acctest.GenerateDataSourceFromRepresentationMap("oci_resource_scheduler_schedule", "test_schedule", acctest.Required, acctest.Create, ResourceScheduleUpdateSyncSingularDataSourceRepresentation) + - compartmentIdVariableStr + ResourceScheduleUpdateSyncRequiredOnlyResource, + compartmentIdVariableStr + computeOcidVariableStr + ResourceScheduleUpdateSyncRequiredOnlyResource, Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttrSet(singularDatasourceName, "id"), @@ -177,7 +178,7 @@ func TestResourceScheduleUpdateSync(t *testing.T) { // verify datasources { - Config: config + compartmentIdVariableStr + ResourceSchedulerScheduleResourceDependencies + + Config: config + compartmentIdVariableStr + computeOcidVariableStr + ResourceSchedulerScheduleResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_resource_scheduler_schedule", "test_schedule", acctest.Required, acctest.Create, ResourceScheduleUpdateSyncRepresentation) + acctest.GenerateDataSourceFromRepresentationMap("oci_resource_scheduler_schedules", "test_schedules", acctest.Required, acctest.Create, ResourceScheduleUpdateSyncDataSourceRepresentation), diff --git a/internal/integrationtest/resource_scheduler_schedule_test.go b/internal/integrationtest/resource_scheduler_schedule_test.go index c1ef6e896cf..d67824a2c15 100644 --- a/internal/integrationtest/resource_scheduler_schedule_test.go +++ b/internal/integrationtest/resource_scheduler_schedule_test.go @@ -24,9 +24,6 @@ import ( ) var ( - autonomousDatabaseOcid = utils.GetEnvSettingWithBlankDefault("autonomousDatabase_ocid") - computeInstanceOcid = utils.GetEnvSettingWithBlankDefault("computeInstance_ocid") - ResourceSchedulerScheduleWithResourceOcidRequiredOnlyResource = ResourceSchedulerScheduleResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_resource_scheduler_schedule", "test_schedule", acctest.Required, acctest.Create, ResourceSchedulerScheduleWithResourceOcidRepresentation) @@ -34,6 +31,14 @@ var ( "schedule_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_resource_scheduler_schedule.test_schedule.id}`}, } + //ResourceSchedulerScheduleDataSourceRepresentation = map[string]interface{}{ + // "compartment_id": acctest.Representation{RepType: acctest.Optional, Create: `${var.compartment_id}`}, + // "display_name": acctest.Representation{RepType: acctest.Optional, Create: `displayName`, Update: `displayName2`}, + // "resource_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_cloud_guard_resource.test_resource.id}`}, + // "schedule_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_resource_scheduler_schedule.test_schedule.id}`}, + // "state": acctest.Representation{RepType: acctest.Optional, Create: `AVAILABLE`}, + // "filter": acctest.RepresentationGroup{RepType: acctest.Required, Group: ResourceSchedulerScheduleDataSourceFilterRepresentation}} + ResourceSchedulerScheduleDataSourceRepresentation = map[string]interface{}{ // must include at least one of `compartmentId` and `schedule_id` "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, @@ -59,18 +64,45 @@ var ( // Optionals "description": acctest.Representation{RepType: acctest.Optional, Create: `provider description1`, Update: `provider description2`}, "display_name": acctest.Representation{RepType: acctest.Optional, Create: `provider displayName1`, Update: `provider displayName2`}, - "time_ends": acctest.Representation{RepType: acctest.Optional, Create: `2024-11-20T00:00:00Z`, Update: `2024-11-30T00:00:00Z`}, - "time_starts": acctest.Representation{RepType: acctest.Optional, Create: `2024-11-15T00:00:00Z`, Update: `2024-11-19T00:00:00Z`}, + "time_ends": acctest.Representation{RepType: acctest.Optional, Create: `2025-12-31T00:00:00Z`, Update: `2025-12-25T00:00:00Z`}, + "time_starts": acctest.Representation{RepType: acctest.Optional, Create: `2025-05-01T00:00:00Z`, Update: `2025-05-11T00:00:00Z`}, + "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}}, + "defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, + "lifecycle": acctest.RepresentationGroup{RepType: acctest.Optional, Group: ignoreChangesDefinedTagsResourceSchedulerRepresentation}, + } + + ResourceSchedulerScheduleRepresentation = map[string]interface{}{ + // Required + "action": acctest.Representation{RepType: acctest.Required, Create: `START_RESOURCE`, Update: `START_RESOURCE`}, + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "recurrence_details": acctest.Representation{RepType: acctest.Required, Create: `FREQ=DAILY;INTERVAL=1`, Update: `FREQ=DAILY;INTERVAL=2`}, + "recurrence_type": acctest.Representation{RepType: acctest.Required, Create: `ICAL`, Update: `ICAL`}, + // Must include either `resources` or `resource_filters` when creating schedules + "resources": acctest.RepresentationGroup{RepType: acctest.Required, Group: ResourceSchedulerScheduleResourcesRepresentation}, + // Optionals + "description": acctest.Representation{RepType: acctest.Optional, Create: `provider description1`, Update: `provider description2`}, + "display_name": acctest.Representation{RepType: acctest.Optional, Create: `provider displayName1`, Update: `provider displayName2`}, + "time_ends": acctest.Representation{RepType: acctest.Optional, Create: `2025-12-31T00:00:00Z`, Update: `2025-12-25T00:00:00Z`}, + "time_starts": acctest.Representation{RepType: acctest.Optional, Create: `2025-05-01T00:00:00Z`, Update: `2025-05-11T00:00:00Z`}, "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}}, "defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, "lifecycle": acctest.RepresentationGroup{RepType: acctest.Optional, Group: ignoreChangesDefinedTagsResourceSchedulerRepresentation}, } ResourceSchedulerScheduleResourcesRepresentation = map[string]interface{}{ - "id": acctest.Representation{RepType: acctest.Required, Create: autonomousDatabaseOcid, Update: computeInstanceOcid}, - "metadata": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"metadata": "metadata"}, Update: map[string]string{"metadata2": "metadata2"}}, + "id": acctest.Representation{RepType: acctest.Required, Create: `${var.function_ocid}`, Update: `${var.function_ocid}`}, + "metadata": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"metadata": "metadata"}, Update: map[string]string{"metadata2": "metadata2"}}, + "parameters": acctest.RepresentationGroup{RepType: acctest.Optional, Group: ResourceSchedulerScheduleResourcesParametersParametersRepresentation}, + } + + ResourceSchedulerScheduleResourcesParametersParametersRepresentation = map[string]interface{}{ + "parameter_type": acctest.Representation{RepType: acctest.Required, Create: `BODY`, Update: `BODY`}, + "value": acctest.Representation{RepType: acctest.Optional, Create: []string{`{\"dummyKey\": \"dummyValue\"}`}, Update: []string{`{\"dummyKey2\": \"dummyValue2\"}`}}, } + //ResourceSchedulerScheduleResourceDependencies = acctest.GenerateDataSourceFromRepresentationMap("oci_cloud_guard_resources", "test_resources", acctest.Required, acctest.Create, CloudGuardResourceDataSourceRepresentation) + + // DefinedTagsDependencies + + // acctest.GenerateResourceFromRepresentationMap("oci_resource_scheduler_schedule", "test_schedule", acctest.Required, acctest.Create, ResourceSchedulerScheduleRepresentation) ResourceSchedulerScheduleResourceDependencies = DefinedTagsDependencies ) @@ -84,6 +116,15 @@ func TestResourceSchedulerScheduleResource_basic(t *testing.T) { compartmentId := utils.GetEnvSettingWithBlankDefault("compartment_ocid") compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id\" { default = \"%s\" }\n", compartmentId) + compartmentIdU := utils.GetEnvSettingWithDefault("compartment_id_for_update", compartmentId) + compartmentIdUVariableStr := fmt.Sprintf("variable \"compartment_id_for_update\" { default = \"%s\" }\n", compartmentIdU) + + functionOcid := utils.GetEnvSettingWithBlankDefault("function_ocid") + functionOcidVariableStr := fmt.Sprintf("variable \"function_ocid\" { default = \"%s\" }\n", functionOcid) + + //computeOcid := utils.GetEnvSettingWithBlankDefault("function_ocid") + //computeOcidVariableStr := fmt.Sprintf("variable \"compute_ocid\" { default = \"%s\" }\n", computeOcid) + resourceName := "oci_resource_scheduler_schedule.test_schedule" singularDatasourceName := "data.oci_resource_scheduler_schedule.test_schedule" datasourceName := "data.oci_resource_scheduler_schedules.test_schedules" @@ -96,7 +137,7 @@ func TestResourceSchedulerScheduleResource_basic(t *testing.T) { acctest.ResourceTest(t, testAccCheckResourceSchedulerScheduleDestroy, []resource.TestStep{ //verify Create with Required - resourceOCID { - Config: config + compartmentIdVariableStr + ResourceSchedulerScheduleResourceDependencies + + Config: config + compartmentIdVariableStr + functionOcidVariableStr + ResourceSchedulerScheduleResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_resource_scheduler_schedule", "test_schedule", acctest.Required, acctest.Create, ResourceSchedulerScheduleWithResourceOcidRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( @@ -106,7 +147,7 @@ func TestResourceSchedulerScheduleResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "recurrence_details", "FREQ=DAILY;INTERVAL=1"), resource.TestCheckResourceAttr(resourceName, "recurrence_type", "ICAL"), resource.TestCheckResourceAttr(resourceName, "resources.#", "1"), - resource.TestCheckResourceAttr(resourceName, "resources.0.id", autonomousDatabaseOcid), + resource.TestCheckResourceAttr(resourceName, "resources.0.id", functionOcid), resource.TestCheckResourceAttr(resourceName, "resources.0.metadata.%", "0"), func(s *terraform.State) (err error) { @@ -123,23 +164,30 @@ func TestResourceSchedulerScheduleResource_basic(t *testing.T) { // verify create with optionals - resourceOCID { - Config: config + compartmentIdVariableStr + ResourceSchedulerScheduleResourceDependencies + + Config: config + compartmentIdVariableStr + functionOcidVariableStr + ResourceSchedulerScheduleResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_resource_scheduler_schedule", "test_schedule", acctest.Optional, acctest.Create, ResourceSchedulerScheduleWithResourceOcidRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttrSet(resourceName, "time_created"), + resource.TestCheckResourceAttr(resourceName, "action", "START_RESOURCE"), resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), resource.TestCheckResourceAttr(resourceName, "recurrence_details", "FREQ=DAILY;INTERVAL=1"), resource.TestCheckResourceAttr(resourceName, "recurrence_type", "ICAL"), resource.TestCheckResourceAttr(resourceName, "description", "provider description1"), resource.TestCheckResourceAttr(resourceName, "display_name", "provider displayName1"), - resource.TestCheckResourceAttr(resourceName, "time_ends", "2024-11-20T00:00:00Z"), - resource.TestCheckResourceAttr(resourceName, "time_starts", "2024-11-15T00:00:00Z"), + resource.TestCheckResourceAttr(resourceName, "time_ends", "2025-12-31T00:00:00Z"), + resource.TestCheckResourceAttr(resourceName, "time_starts", "2025-05-01T00:00:00Z"), resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), resource.TestCheckResourceAttr(resourceName, "resources.#", "1"), - resource.TestCheckResourceAttr(resourceName, "resources.0.id", autonomousDatabaseOcid), + resource.TestCheckResourceAttr(resourceName, "resources.0.id", functionOcid), resource.TestCheckResourceAttr(resourceName, "resources.0.metadata.%", "1"), + resource.TestCheckResourceAttr(resourceName, "resources.0.parameters.#", "1"), + resource.TestCheckResourceAttr(resourceName, "resources.0.parameters.0.parameter_type", "BODY"), + resource.TestCheckResourceAttr(resourceName, "resources.0.parameters.0.value.#", "1"), + resource.TestCheckResourceAttr(resourceName, "time_ends", "2025-12-31T00:00:00Z"), + resource.TestCheckResourceAttr(resourceName, "time_starts", "2025-05-01T00:00:00Z"), func(s *terraform.State) (err error) { resId, err = acctest.FromInstanceState(s, resourceName, "id") @@ -148,9 +196,36 @@ func TestResourceSchedulerScheduleResource_basic(t *testing.T) { ), }, + // verify Update to the compartment (the compartment will be switched back in the next step) + { + Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + functionOcidVariableStr + ResourceSchedulerScheduleResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_resource_scheduler_schedule", "test_schedule", acctest.Optional, acctest.Create, + acctest.RepresentationCopyWithNewProperties(ResourceSchedulerScheduleRepresentation, map[string]interface{}{ + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id_for_update}`}, + })), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttrSet(resourceName, "time_created"), + resource.TestCheckResourceAttr(resourceName, "action", "START_RESOURCE"), + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentIdU), + resource.TestCheckResourceAttr(resourceName, "recurrence_details", "FREQ=DAILY;INTERVAL=1"), + resource.TestCheckResourceAttr(resourceName, "recurrence_type", "ICAL"), + resource.TestCheckResourceAttr(resourceName, "resources.#", "1"), + resource.TestCheckResourceAttr(resourceName, "resources.0.id", functionOcid), + + 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 + }, + ), + }, + //verify updates to updatable parameters { - Config: config + compartmentIdVariableStr + ResourceSchedulerScheduleResourceDependencies + + Config: config + compartmentIdVariableStr + functionOcidVariableStr + ResourceSchedulerScheduleResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_resource_scheduler_schedule", "test_schedule", acctest.Optional, acctest.Update, ResourceSchedulerScheduleWithResourceOcidRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttrSet(resourceName, "id"), @@ -161,12 +236,16 @@ func TestResourceSchedulerScheduleResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "recurrence_type", "ICAL"), resource.TestCheckResourceAttr(resourceName, "description", "provider description2"), resource.TestCheckResourceAttr(resourceName, "display_name", "provider displayName2"), - resource.TestCheckResourceAttr(resourceName, "time_ends", "2024-11-30T00:00:00Z"), - resource.TestCheckResourceAttr(resourceName, "time_starts", "2024-11-19T00:00:00Z"), + resource.TestCheckResourceAttr(resourceName, "time_ends", "2025-12-25T00:00:00Z"), + resource.TestCheckResourceAttr(resourceName, "time_starts", "2025-05-11T00:00:00Z"), resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), resource.TestCheckResourceAttr(resourceName, "resources.#", "1"), - resource.TestCheckResourceAttr(resourceName, "resources.0.id", computeInstanceOcid), + resource.TestCheckResourceAttr(resourceName, "resources.0.id", functionOcid), resource.TestCheckResourceAttr(resourceName, "resources.0.metadata.%", "1"), + resource.TestCheckResourceAttr(resourceName, "resources.0.parameters.#", "1"), + resource.TestCheckResourceAttr(resourceName, "resources.0.parameters.0.parameter_type", "BODY"), + resource.TestCheckResourceAttr(resourceName, "resources.0.parameters.0.value.#", "1"), + resource.TestCheckTypeSetElemAttr(resourceName, "resources.0.parameters.0.value.*", `{"dummyKey2":"dummyValue2"}`), func(s *terraform.State) (err error) { resId2, err = acctest.FromInstanceState(s, resourceName, "id") @@ -178,36 +257,35 @@ func TestResourceSchedulerScheduleResource_basic(t *testing.T) { ), }, + // verify datasource + { + Config: config + + acctest.GenerateDataSourceFromRepresentationMap("oci_resource_scheduler_schedules", "test_schedules", acctest.Optional, acctest.Update, ResourceSchedulerScheduleDataSourceRepresentation) + + compartmentIdVariableStr + functionOcidVariableStr + ResourceSchedulerScheduleResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_resource_scheduler_schedule", "test_schedule", acctest.Optional, acctest.Update, ResourceSchedulerScheduleRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(datasourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(datasourceName, "schedule_collection.#", "1"), + ), + }, + // verify singular datasource { Config: config + acctest.GenerateDataSourceFromRepresentationMap("oci_resource_scheduler_schedule", "test_schedule", acctest.Required, acctest.Create, ResourceSchedulerScheduleSingularDataSourceRepresentation) + - compartmentIdVariableStr + ResourceSchedulerScheduleWithResourceOcidRequiredOnlyResource, + compartmentIdVariableStr + functionOcidVariableStr + ResourceSchedulerScheduleWithResourceOcidRequiredOnlyResource, Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttrSet(singularDatasourceName, "id"), resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"), resource.TestCheckResourceAttr(singularDatasourceName, "action", "START_RESOURCE"), resource.TestCheckResourceAttr(singularDatasourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(singularDatasourceName, "recurrence_details", "FREQ=DAILY;INTERVAL=1"), resource.TestCheckResourceAttr(singularDatasourceName, "recurrence_type", "ICAL"), resource.TestCheckResourceAttr(singularDatasourceName, "resources.#", "1"), - resource.TestCheckResourceAttr(singularDatasourceName, "resources.0.id", autonomousDatabaseOcid), - ), - }, - - // verify datasources - { - Config: config + compartmentIdVariableStr + ResourceSchedulerScheduleResourceDependencies + - acctest.GenerateResourceFromRepresentationMap("oci_resource_scheduler_schedule", "test_schedule", acctest.Required, acctest.Create, ResourceSchedulerScheduleWithResourceOcidRepresentation) + - acctest.GenerateDataSourceFromRepresentationMap("oci_resource_scheduler_schedules", "test_schedules", acctest.Required, acctest.Create, ResourceSchedulerScheduleDataSourceRepresentation), - - Check: acctest.ComposeAggregateTestCheckFuncWrapper( - - resource.TestCheckResourceAttr(datasourceName, "compartment_id", compartmentId), - - resource.TestCheckResourceAttr(datasourceName, "schedule_collection.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "resources.0.id", functionOcid), ), }, diff --git a/internal/service/containerengine/containerengine_cluster_data_source.go b/internal/service/containerengine/containerengine_cluster_data_source.go index ab7231c87e5..0d5705736f0 100644 --- a/internal/service/containerengine/containerengine_cluster_data_source.go +++ b/internal/service/containerengine/containerengine_cluster_data_source.go @@ -19,6 +19,10 @@ func ContainerengineClusterDataSource() *schema.Resource { Type: schema.TypeString, Required: true, } + fieldMap["should_include_oidc_config_file"] = &schema.Schema{ + Type: schema.TypeString, + Optional: true, + } return tfresource.GetSingularDataSourceItemSchema(ContainerengineClusterResource(), fieldMap, readSingularContainerengineCluster) } @@ -48,6 +52,11 @@ func (s *ContainerengineClusterDataSourceCrud) Get() error { request.ClusterId = &tmp } + if shouldIncludeOidcConfigFile, ok := s.D.GetOkExists("should_include_oidc_config_file"); ok { + tmp := shouldIncludeOidcConfigFile.(bool) + request.ShouldIncludeOidcConfigFile = &tmp + } + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(false, "containerengine") response, err := s.Client.GetCluster(context.Background(), request) diff --git a/internal/service/containerengine/containerengine_cluster_resource.go b/internal/service/containerengine/containerengine_cluster_resource.go index 92f0da22c26..68e0447b55c 100644 --- a/internal/service/containerengine/containerengine_cluster_resource.go +++ b/internal/service/containerengine/containerengine_cluster_resource.go @@ -961,6 +961,11 @@ func (s *ContainerengineClusterResourceCrud) Get() error { tmp := s.D.Id() request.ClusterId = &tmp + if shouldIncludeOidcConfigFile, ok := s.D.GetOkExists("should_include_oidc_config_file"); ok { + tmp := shouldIncludeOidcConfigFile.(bool) + request.ShouldIncludeOidcConfigFile = &tmp + } + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "containerengine") response, err := s.Client.GetCluster(context.Background(), request) diff --git a/internal/service/containerengine/containerengine_node_pool_resource.go b/internal/service/containerengine/containerengine_node_pool_resource.go index e1a84936838..aaff504b011 100644 --- a/internal/service/containerengine/containerengine_node_pool_resource.go +++ b/internal/service/containerengine/containerengine_node_pool_resource.go @@ -300,6 +300,11 @@ func ContainerengineNodePoolResource() *schema.Resource { Optional: true, Computed: true, }, + "is_force_action_after_grace_duration": { + Type: schema.TypeBool, + Optional: true, + Computed: true, + }, "is_force_delete_after_grace_duration": { Type: schema.TypeBool, Optional: true, @@ -343,6 +348,14 @@ func ContainerengineNodePoolResource() *schema.Resource { // Required // Optional + "cycle_modes": { + Type: schema.TypeList, + Optional: true, + Computed: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, "is_node_cycling_enabled": { Type: schema.TypeBool, Optional: true, @@ -1631,6 +1644,11 @@ func (s *ContainerengineNodePoolResourceCrud) mapToNodeEvictionNodePoolSettings( result.EvictionGraceDuration = &tmp } + if isForceActionAfterGraceDuration, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "is_force_action_after_grace_duration")); ok { + tmp := isForceActionAfterGraceDuration.(bool) + result.IsForceActionAfterGraceDuration = &tmp + } + if isForceDeleteAfterGraceDuration, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "is_force_delete_after_grace_duration")); ok { tmp := isForceDeleteAfterGraceDuration.(bool) result.IsForceDeleteAfterGraceDuration = &tmp @@ -1646,6 +1664,10 @@ func NodeEvictionNodePoolSettingsToMap(obj *oci_containerengine.NodeEvictionNode result["eviction_grace_duration"] = string(*obj.EvictionGraceDuration) } + if obj.IsForceActionAfterGraceDuration != nil { + result["is_force_action_after_grace_duration"] = bool(*obj.IsForceActionAfterGraceDuration) + } + if obj.IsForceDeleteAfterGraceDuration != nil { result["is_force_delete_after_grace_duration"] = bool(*obj.IsForceDeleteAfterGraceDuration) } @@ -1656,6 +1678,19 @@ func NodeEvictionNodePoolSettingsToMap(obj *oci_containerengine.NodeEvictionNode func (s *ContainerengineNodePoolResourceCrud) mapToNodePoolCyclingDetails(fieldKeyFormat string) (oci_containerengine.NodePoolCyclingDetails, error) { result := oci_containerengine.NodePoolCyclingDetails{} + if cycleModes, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "cycle_modes")); ok { + interfaces := cycleModes.([]interface{}) + tmp := make([]oci_containerengine.CycleModeEnum, len(interfaces)) + for i := range interfaces { + if interfaces[i] != nil { + tmp[i] = oci_containerengine.CycleModeEnum(interfaces[i].(string)) + } + } + if len(tmp) != 0 || s.D.HasChange(fmt.Sprintf(fieldKeyFormat, "cycle_modes")) { + result.CycleModes = tmp + } + } + if isNodeCyclingEnabled, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "is_node_cycling_enabled")); ok { tmp := isNodeCyclingEnabled.(bool) result.IsNodeCyclingEnabled = &tmp @@ -1677,6 +1712,8 @@ func (s *ContainerengineNodePoolResourceCrud) mapToNodePoolCyclingDetails(fieldK func NodePoolCyclingDetailsToMap(obj *oci_containerengine.NodePoolCyclingDetails) map[string]interface{} { result := map[string]interface{}{} + result["cycle_modes"] = obj.CycleModes + if obj.IsNodeCyclingEnabled != nil { result["is_node_cycling_enabled"] = bool(*obj.IsNodeCyclingEnabled) } diff --git a/internal/service/core/core_instance_resource.go b/internal/service/core/core_instance_resource.go index 06548cefe7c..72f8f48b1e8 100644 --- a/internal/service/core/core_instance_resource.go +++ b/internal/service/core/core_instance_resource.go @@ -1501,10 +1501,6 @@ func (s *CoreInstanceResourceCrud) Update() error { } } - if capacityReservationId, ok := s.D.GetOkExists("capacity_reservation_id"); ok { - tmp := capacityReservationId.(string) - request.CapacityReservationId = &tmp - } if dedicatedVmHostId, ok := s.D.GetOkExists("dedicated_vm_host_id"); ok { tmp := dedicatedVmHostId.(string) request.DedicatedVmHostId = &tmp @@ -4075,6 +4071,11 @@ func (s *CoreInstanceResourceCrud) updateOptionsViaWorkRequest() error { } } + if capacityReservationId, ok := s.D.GetOkExists("capacity_reservation_id"); ok { + tmp := capacityReservationId.(string) + request.CapacityReservationId = &tmp + } + if platformConfig, ok := s.D.GetOkExists("platform_config"); ok && s.D.HasChange("platform_config") { if tmpList := platformConfig.([]interface{}); len(tmpList) > 0 { fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "platform_config", 0) diff --git a/internal/service/database/database_autonomous_database_resource.go b/internal/service/database/database_autonomous_database_resource.go index cfb3b96a292..71713fcff28 100644 --- a/internal/service/database/database_autonomous_database_resource.go +++ b/internal/service/database/database_autonomous_database_resource.go @@ -222,6 +222,11 @@ func DatabaseAutonomousDatabaseResource() *schema.Resource { }, }, }, + // Optional + "enable_delete_scheduled_operations": { + Type: schema.TypeBool, + Optional: true, + }, "db_version": { Type: schema.TypeString, Optional: true, @@ -518,16 +523,17 @@ func DatabaseAutonomousDatabaseResource() *schema.Resource { }, }, "scheduled_operations": { - Type: schema.TypeSet, - Set: scheduledOperationsForSets, - Optional: true, - Computed: true, + Type: schema.TypeSet, + Set: scheduledOperationsForSets, + Optional: true, + Computed: true, + DiffSuppressFunc: tfresource.ScheduledOperationDbSuppressfunc, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ // Required "day_of_week": { Type: schema.TypeList, - Required: true, + Optional: true, MaxItems: 1, MinItems: 1, Elem: &schema.Resource{ @@ -2153,6 +2159,12 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) Update() error { request.ScheduledOperations = tmp } } + if enableDeleteScheduledOps, ok := s.D.GetOkExists("enable_delete_scheduled_operations"); ok && s.D.HasChange("enable_delete_scheduled_operations") { + _, scheduledOpsOk := s.D.GetOkExists("scheduled_operations") + if enableDeleteScheduledOps == true && scheduledOpsOk { + request.ScheduledOperations = []oci_database.ScheduledOperationDetails{} + } + } if dbToolsDetails, ok := s.D.GetOkExists("db_tools_details"); ok && s.D.HasChange("db_tools_details") { set := dbToolsDetails.(*schema.Set) diff --git a/internal/service/devops/devops_deploy_artifact_resource.go b/internal/service/devops/devops_deploy_artifact_resource.go index 7922d3f7c9c..ef5e58041e8 100644 --- a/internal/service/devops/devops_deploy_artifact_resource.go +++ b/internal/service/devops/devops_deploy_artifact_resource.go @@ -5,7 +5,6 @@ package devops import ( "context" - b64 "encoding/base64" "fmt" "log" "strings" @@ -733,7 +732,7 @@ func DeployArtifactSourceToMap(obj *oci_devops.DeployArtifactSource) map[string] if v.Base64EncodedContent != nil { contentReader := v.Base64EncodedContent - result["base64encoded_content"] = DevopsDeployArtifactBase64Decode(contentReader) + result["base64encoded_content"] = string(contentReader) } case oci_devops.OcirDeployArtifactSource: result["deploy_artifact_source_type"] = "OCIR" @@ -881,8 +880,3 @@ func VerificationKeySourceToMap(obj *oci_devops.VerificationKeySource) map[strin return result } - -func DevopsDeployArtifactBase64Decode(content []byte) string { - text := b64.StdEncoding.EncodeToString(content) - return text -} diff --git a/internal/service/disaster_recovery/disaster_recovery_dr_plan_execution_resource.go b/internal/service/disaster_recovery/disaster_recovery_dr_plan_execution_resource.go index 893d6cf669c..d933e4edcfd 100644 --- a/internal/service/disaster_recovery/disaster_recovery_dr_plan_execution_resource.go +++ b/internal/service/disaster_recovery/disaster_recovery_dr_plan_execution_resource.go @@ -217,6 +217,10 @@ func DisasterRecoveryDrPlanExecutionResource() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "type_display_name": { + Type: schema.TypeString, + Computed: true, + }, }, }, }, @@ -1030,5 +1034,9 @@ func DrPlanStepExecutionToMap(obj oci_disaster_recovery.DrPlanStepExecution) map result["type"] = string(obj.Type) + if obj.TypeDisplayName != nil { + result["type_display_name"] = string(*obj.TypeDisplayName) + } + return result } diff --git a/internal/service/disaster_recovery/disaster_recovery_dr_plan_resource.go b/internal/service/disaster_recovery/disaster_recovery_dr_plan_resource.go index a879f199151..179bd579b68 100644 --- a/internal/service/disaster_recovery/disaster_recovery_dr_plan_resource.go +++ b/internal/service/disaster_recovery/disaster_recovery_dr_plan_resource.go @@ -169,6 +169,10 @@ func DisasterRecoveryDrPlanResource() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "type_display_name": { + Type: schema.TypeString, + Computed: true, + }, "user_defined_step": { Type: schema.TypeList, Computed: true, @@ -965,6 +969,10 @@ func DrPlanStepToMap(obj oci_disaster_recovery.DrPlanStep) map[string]interface{ result["type"] = string(obj.Type) + if obj.TypeDisplayName != nil { + result["type_display_name"] = string(*obj.TypeDisplayName) + } + if obj.UserDefinedStep != nil { userDefinedStepArray := []interface{}{} if userDefinedStepMap := DrPlanUserDefinedStepToMap(&obj.UserDefinedStep); userDefinedStepMap != nil { @@ -1128,6 +1136,17 @@ func (s *DisasterRecoveryDrPlanResourceCrud) mapToUpdateDrPlanUserDefinedStepDet case strings.ToLower("INVOKE_FUNCTION_PRECHECK"): details := oci_disaster_recovery.UpdateInvokeFunctionPrecheckStepDetails{} baseObject = details + case strings.ToLower("INVOKE_FUNCTION_USER_DEFINED_CUSTOM_PRECHECK"): + details := oci_disaster_recovery.UpdateInvokeFunctionUserDefinedCustomPrecheckStepDetails{} + if functionId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "function_id")); ok { + tmp := functionId.(string) + details.FunctionId = &tmp + } + if requestBody, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "request_body")); ok { + tmp := requestBody.(string) + details.RequestBody = &tmp + } + baseObject = details case strings.ToLower("RUN_LOCAL_SCRIPT"): details := oci_disaster_recovery.UpdateRunLocalScriptUserDefinedStepDetails{} if runAsUser, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "run_as_user")); ok { @@ -1146,6 +1165,21 @@ func (s *DisasterRecoveryDrPlanResourceCrud) mapToUpdateDrPlanUserDefinedStepDet case strings.ToLower("RUN_LOCAL_SCRIPT_PRECHECK"): details := oci_disaster_recovery.UpdateLocalScriptPrecheckStepDetails{} baseObject = details + case strings.ToLower("RUN_LOCAL_SCRIPT_USER_DEFINED_CUSTOM_PRECHECK"): + details := oci_disaster_recovery.UpdateRunLocalScriptUserDefinedCustomPrecheckStepDetails{} + if runAsUser, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "run_as_user")); ok { + tmp := runAsUser.(string) + details.RunAsUser = &tmp + } + if runOnInstanceId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "run_on_instance_id")); ok { + tmp := runOnInstanceId.(string) + details.RunOnInstanceId = &tmp + } + if scriptCommand, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "script_command")); ok { + tmp := scriptCommand.(string) + details.ScriptCommand = &tmp + } + baseObject = details case strings.ToLower("RUN_OBJECTSTORE_SCRIPT"): details := oci_disaster_recovery.UpdateRunObjectStoreScriptUserDefinedStepDetails{} if objectStorageScriptLocation, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "object_storage_script_location")); ok { @@ -1166,6 +1200,23 @@ func (s *DisasterRecoveryDrPlanResourceCrud) mapToUpdateDrPlanUserDefinedStepDet case strings.ToLower("RUN_OBJECTSTORE_SCRIPT_PRECHECK"): details := oci_disaster_recovery.UpdateObjectStoreScriptPrecheckStepDetails{} baseObject = details + case strings.ToLower("RUN_OBJECTSTORE_SCRIPT_USER_DEFINED_CUSTOM_PRECHECK"): + details := oci_disaster_recovery.UpdateRunObjectStoreScriptUserDefinedCustomPrecheckStepDetails{} + if objectStorageScriptLocation, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "object_storage_script_location")); ok { + if tmpList := objectStorageScriptLocation.([]interface{}); len(tmpList) > 0 { + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "object_storage_script_location"), 0) + tmp, err := s.mapToUpdateObjectStorageScriptLocationDetails(fieldKeyFormatNextLevel) + if err != nil { + return details, fmt.Errorf("unable to convert object_storage_script_location, encountered error: %v", err) + } + details.ObjectStorageScriptLocation = &tmp + } + } + if runOnInstanceId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "run_on_instance_id")); ok { + tmp := runOnInstanceId.(string) + details.RunOnInstanceId = &tmp + } + baseObject = details default: return nil, fmt.Errorf("unknown step_type '%v' was specified", stepType) } @@ -1187,6 +1238,16 @@ func DrPlanUserDefinedStepToMap(obj *oci_disaster_recovery.DrPlanUserDefinedStep } case oci_disaster_recovery.UpdateInvokeFunctionPrecheckStepDetails: result["step_type"] = "INVOKE_FUNCTION_PRECHECK" + case oci_disaster_recovery.UpdateInvokeFunctionUserDefinedCustomPrecheckStepDetails: + result["step_type"] = "INVOKE_FUNCTION_USER_DEFINED_CUSTOM_PRECHECK" + + if v.FunctionId != nil { + result["function_id"] = string(*v.FunctionId) + } + + if v.RequestBody != nil { + result["request_body"] = string(*v.RequestBody) + } case oci_disaster_recovery.UpdateRunLocalScriptUserDefinedStepDetails: result["step_type"] = "RUN_LOCAL_SCRIPT" @@ -1203,6 +1264,20 @@ func DrPlanUserDefinedStepToMap(obj *oci_disaster_recovery.DrPlanUserDefinedStep } case oci_disaster_recovery.UpdateLocalScriptPrecheckStepDetails: result["step_type"] = "RUN_LOCAL_SCRIPT_PRECHECK" + case oci_disaster_recovery.UpdateRunLocalScriptUserDefinedCustomPrecheckStepDetails: + result["step_type"] = "RUN_LOCAL_SCRIPT_USER_DEFINED_CUSTOM_PRECHECK" + + if v.RunAsUser != nil { + result["run_as_user"] = string(*v.RunAsUser) + } + + if v.RunOnInstanceId != nil { + result["run_on_instance_id"] = string(*v.RunOnInstanceId) + } + + if v.ScriptCommand != nil { + result["script_command"] = string(*v.ScriptCommand) + } case oci_disaster_recovery.UpdateRunObjectStoreScriptUserDefinedStepDetails: result["step_type"] = "RUN_OBJECTSTORE_SCRIPT" @@ -1215,6 +1290,16 @@ func DrPlanUserDefinedStepToMap(obj *oci_disaster_recovery.DrPlanUserDefinedStep } case oci_disaster_recovery.UpdateObjectStoreScriptPrecheckStepDetails: result["step_type"] = "RUN_OBJECTSTORE_SCRIPT_PRECHECK" + case oci_disaster_recovery.UpdateRunObjectStoreScriptUserDefinedCustomPrecheckStepDetails: + result["step_type"] = "RUN_OBJECTSTORE_SCRIPT_USER_DEFINED_CUSTOM_PRECHECK" + + if v.ObjectStorageScriptLocation != nil { + result["object_storage_script_location"] = []interface{}{UpdateObjectStorageScriptLocationDetailsToMap(v.ObjectStorageScriptLocation)} + } + + if v.RunOnInstanceId != nil { + result["run_on_instance_id"] = string(*v.RunOnInstanceId) + } default: log.Printf("[WARN] Received 'step_type' of unknown type %v", *obj) return nil diff --git a/internal/service/disaster_recovery/disaster_recovery_dr_protection_group_resource.go b/internal/service/disaster_recovery/disaster_recovery_dr_protection_group_resource.go index 778d282d705..75665311d22 100644 --- a/internal/service/disaster_recovery/disaster_recovery_dr_protection_group_resource.go +++ b/internal/service/disaster_recovery/disaster_recovery_dr_protection_group_resource.go @@ -256,6 +256,65 @@ func DisasterRecoveryDrProtectionGroupResource() *schema.Resource { }, }, }, + "block_volume_attach_and_mount_operations": { + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + "attachments": { + Type: schema.TypeList, + Optional: true, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + "block_volume_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "volume_attachment_reference_instance_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + // Computed + }, + }, + }, + "mounts": { + Type: schema.TypeList, + Optional: true, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + "mount_point": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + // Computed + }, + }, + }, + + // Computed + }, + }, + }, "block_volume_operations": { Type: schema.TypeList, Optional: true, @@ -322,6 +381,32 @@ func DisasterRecoveryDrProtectionGroupResource() *schema.Resource { Optional: true, Computed: true, }, + "common_destination_key": { + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + "encryption_key_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "vault_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + // Computed + }, + }, + }, "bucket": { Type: schema.TypeString, Optional: true, @@ -332,6 +417,11 @@ func DisasterRecoveryDrProtectionGroupResource() *schema.Resource { Optional: true, Computed: true, }, + "destination_backup_policy_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, "destination_capacity_reservation_id": { Type: schema.TypeString, Optional: true, @@ -347,6 +437,32 @@ func DisasterRecoveryDrProtectionGroupResource() *schema.Resource { Optional: true, Computed: true, }, + "destination_encryption_key": { + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + "encryption_key_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "vault_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + // Computed + }, + }, + }, "destination_load_balancer_id": { Type: schema.TypeString, Optional: true, @@ -357,6 +473,11 @@ func DisasterRecoveryDrProtectionGroupResource() *schema.Resource { Optional: true, Computed: true, }, + "destination_snapshot_policy_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, "export_mappings": { Type: schema.TypeList, Optional: true, @@ -565,6 +686,51 @@ func DisasterRecoveryDrProtectionGroupResource() *schema.Resource { Optional: true, Computed: true, }, + "source_volume_to_destination_encryption_key_mappings": { + Type: schema.TypeList, + Optional: true, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + "destination_encryption_key": { + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + "encryption_key_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "vault_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + // Computed + }, + }, + }, + "source_volume_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + // Computed + }, + }, + }, "vault_mappings": { Type: schema.TypeList, Optional: true, @@ -677,6 +843,11 @@ func DisasterRecoveryDrProtectionGroupResource() *schema.Resource { Optional: true, Computed: true, }, + "destination_reserved_public_ip_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, "destination_subnet_id": { Type: schema.TypeString, Optional: true, @@ -1308,6 +1479,11 @@ func (s *DisasterRecoveryDrProtectionGroupResourceCrud) mapToComputeInstanceMova result.DestinationPrimaryPrivateIpHostnameLabel = &tmp } + if destinationReservedPublicIpId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "destination_reserved_public_ip_id")); ok { + tmp := destinationReservedPublicIpId.(string) + result.DestinationReservedPublicIpId = &tmp + } + if destinationSubnetId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "destination_subnet_id")); ok { tmp := destinationSubnetId.(string) result.DestinationSubnetId = &tmp @@ -1334,6 +1510,10 @@ func ComputeInstanceMovableVnicMappingDetailsToMap(obj oci_disaster_recovery.Com result["destination_primary_private_ip_hostname_label"] = string(*obj.DestinationPrimaryPrivateIpHostnameLabel) } + if obj.DestinationReservedPublicIpId != nil { + result["destination_reserved_public_ip_id"] = string(*obj.DestinationReservedPublicIpId) + } + if obj.DestinationSubnetId != nil { result["destination_subnet_id"] = string(*obj.DestinationSubnetId) } @@ -1552,6 +1732,182 @@ func ComputeInstanceMovableFileSystemOperationToMap(obj oci_disaster_recovery.Co return result } +func (s *DisasterRecoveryDrProtectionGroupResourceCrud) mapToCreateComputeInstanceNonMovableBlockVolumeAttachAndMountOperationsDetails(fieldKeyFormat string) (oci_disaster_recovery.CreateComputeInstanceNonMovableBlockVolumeAttachAndMountOperationsDetails, error) { + result := oci_disaster_recovery.CreateComputeInstanceNonMovableBlockVolumeAttachAndMountOperationsDetails{} + + if attachments, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "attachments")); ok { + interfaces := attachments.([]interface{}) + tmp := make([]oci_disaster_recovery.CreateComputeInstanceNonMovableBlockVolumeAttachOperationDetails, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "attachments"), stateDataIndex) + converted, err := s.mapToCreateComputeInstanceNonMovableBlockVolumeAttachOperationDetails(fieldKeyFormatNextLevel) + if err != nil { + return result, err + } + tmp[i] = converted + } + if len(tmp) != 0 || s.D.HasChange(fmt.Sprintf(fieldKeyFormat, "attachments")) { + result.Attachments = tmp + } + } + + if mounts, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "mounts")); ok { + interfaces := mounts.([]interface{}) + tmp := make([]oci_disaster_recovery.CreateComputeInstanceNonMovableBlockVolumeMountOperationDetails, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "mounts"), stateDataIndex) + converted, err := s.mapToCreateComputeInstanceNonMovableBlockVolumeMountOperationDetails(fieldKeyFormatNextLevel) + if err != nil { + return result, err + } + tmp[i] = converted + } + if len(tmp) != 0 || s.D.HasChange(fmt.Sprintf(fieldKeyFormat, "mounts")) { + result.Mounts = tmp + } + } + + return result, nil +} + +func (s *DisasterRecoveryDrProtectionGroupResourceCrud) mapToUpdateComputeInstanceNonMovableBlockVolumeAttachAndMountOperationsDetails(fieldKeyFormat string) (oci_disaster_recovery.UpdateComputeInstanceNonMovableBlockVolumeAttachAndMountOperationsDetails, error) { + result := oci_disaster_recovery.UpdateComputeInstanceNonMovableBlockVolumeAttachAndMountOperationsDetails{} + + if attachments, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "attachments")); ok { + interfaces := attachments.([]interface{}) + tmp := make([]oci_disaster_recovery.UpdateComputeInstanceNonMovableBlockVolumeAttachOperationDetails, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "attachments"), stateDataIndex) + converted, err := s.mapToUpdateComputeInstanceNonMovableBlockVolumeAttachOperationDetails(fieldKeyFormatNextLevel) + if err != nil { + return result, err + } + tmp[i] = converted + } + if len(tmp) != 0 || s.D.HasChange(fmt.Sprintf(fieldKeyFormat, "attachments")) { + result.Attachments = tmp + } + } + + if mounts, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "mounts")); ok { + interfaces := mounts.([]interface{}) + tmp := make([]oci_disaster_recovery.UpdateComputeInstanceNonMovableBlockVolumeMountOperationDetails, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "mounts"), stateDataIndex) + converted, err := s.mapToUpdateComputeInstanceNonMovableBlockVolumeMountOperationDetails(fieldKeyFormatNextLevel) + if err != nil { + return result, err + } + tmp[i] = converted + } + if len(tmp) != 0 || s.D.HasChange(fmt.Sprintf(fieldKeyFormat, "mounts")) { + result.Mounts = tmp + } + } + + return result, nil +} + +func ComputeInstanceNonMovableBlockVolumeAttachAndMountOperationsDetailsToMap(obj *oci_disaster_recovery.ComputeInstanceNonMovableBlockVolumeAttachAndMountOperationsDetails) map[string]interface{} { + result := map[string]interface{}{} + + attachments := []interface{}{} + for _, item := range obj.Attachments { + attachments = append(attachments, ComputeInstanceNonMovableBlockVolumeAttachOperationDetailsToMap(item)) + } + result["attachments"] = attachments + + mounts := []interface{}{} + for _, item := range obj.Mounts { + mounts = append(mounts, ComputeInstanceNonMovableBlockVolumeMountOperationDetailsToMap(item)) + } + result["mounts"] = mounts + + return result +} + +func (s *DisasterRecoveryDrProtectionGroupResourceCrud) mapToCreateComputeInstanceNonMovableBlockVolumeAttachOperationDetails(fieldKeyFormat string) (oci_disaster_recovery.CreateComputeInstanceNonMovableBlockVolumeAttachOperationDetails, error) { + result := oci_disaster_recovery.CreateComputeInstanceNonMovableBlockVolumeAttachOperationDetails{} + + if blockVolumeId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "block_volume_id")); ok { + tmp := blockVolumeId.(string) + result.BlockVolumeId = &tmp + } + + if volumeAttachmentReferenceInstanceId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "volume_attachment_reference_instance_id")); ok { + tmp := volumeAttachmentReferenceInstanceId.(string) + result.VolumeAttachmentReferenceInstanceId = &tmp + } + + return result, nil +} + +func (s *DisasterRecoveryDrProtectionGroupResourceCrud) mapToUpdateComputeInstanceNonMovableBlockVolumeAttachOperationDetails(fieldKeyFormat string) (oci_disaster_recovery.UpdateComputeInstanceNonMovableBlockVolumeAttachOperationDetails, error) { + result := oci_disaster_recovery.UpdateComputeInstanceNonMovableBlockVolumeAttachOperationDetails{} + + if blockVolumeId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "block_volume_id")); ok { + tmp := blockVolumeId.(string) + result.BlockVolumeId = &tmp + } + + if volumeAttachmentReferenceInstanceId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "volume_attachment_reference_instance_id")); ok { + tmp := volumeAttachmentReferenceInstanceId.(string) + result.VolumeAttachmentReferenceInstanceId = &tmp + } + + return result, nil +} + +func ComputeInstanceNonMovableBlockVolumeAttachOperationDetailsToMap(obj oci_disaster_recovery.ComputeInstanceNonMovableBlockVolumeAttachOperationDetails) map[string]interface{} { + result := map[string]interface{}{} + + if obj.BlockVolumeId != nil { + result["block_volume_id"] = string(*obj.BlockVolumeId) + } + + if obj.VolumeAttachmentReferenceInstanceId != nil { + result["volume_attachment_reference_instance_id"] = string(*obj.VolumeAttachmentReferenceInstanceId) + } + + return result +} + +func (s *DisasterRecoveryDrProtectionGroupResourceCrud) mapToCreateComputeInstanceNonMovableBlockVolumeMountOperationDetails(fieldKeyFormat string) (oci_disaster_recovery.CreateComputeInstanceNonMovableBlockVolumeMountOperationDetails, error) { + result := oci_disaster_recovery.CreateComputeInstanceNonMovableBlockVolumeMountOperationDetails{} + + if mountPoint, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "mount_point")); ok { + tmp := mountPoint.(string) + result.MountPoint = &tmp + } + + return result, nil +} + +func (s *DisasterRecoveryDrProtectionGroupResourceCrud) mapToUpdateComputeInstanceNonMovableBlockVolumeMountOperationDetails(fieldKeyFormat string) (oci_disaster_recovery.UpdateComputeInstanceNonMovableBlockVolumeMountOperationDetails, error) { + result := oci_disaster_recovery.UpdateComputeInstanceNonMovableBlockVolumeMountOperationDetails{} + + if mountPoint, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "mount_point")); ok { + tmp := mountPoint.(string) + result.MountPoint = &tmp + } + + return result, nil +} + +func ComputeInstanceNonMovableBlockVolumeMountOperationDetailsToMap(obj oci_disaster_recovery.ComputeInstanceNonMovableBlockVolumeMountOperationDetails) map[string]interface{} { + result := map[string]interface{}{} + + if obj.MountPoint != nil { + result["mount_point"] = string(*obj.MountPoint) + } + + return result +} + func (s *DisasterRecoveryDrProtectionGroupResourceCrud) mapToCreateComputeInstanceNonMovableBlockVolumeOperationDetails(fieldKeyFormat string) (oci_disaster_recovery.CreateComputeInstanceNonMovableBlockVolumeOperationDetails, error) { result := oci_disaster_recovery.CreateComputeInstanceNonMovableBlockVolumeOperationDetails{} @@ -1648,7 +2004,7 @@ func (s *DisasterRecoveryDrProtectionGroupResourceCrud) mapToCreateDrProtectionG } switch strings.ToLower(memberType) { case strings.ToLower("AUTONOMOUS_CONTAINER_DATABASE"): - details := oci_disaster_recovery.UpdateDrProtectionGroupMemberAutonomousContainerDatabaseDetails{} + details := oci_disaster_recovery.CreateDrProtectionGroupMemberAutonomousContainerDatabaseDetails{} if connectionStringType, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "connection_string_type")); ok { details.ConnectionStringType = oci_disaster_recovery.AutonomousContainerDatabaseSnapshotStandbyConnectionStringTypeEnum(connectionStringType.(string)) } @@ -1658,15 +2014,24 @@ func (s *DisasterRecoveryDrProtectionGroupResourceCrud) mapToCreateDrProtectionG } baseObject = details case strings.ToLower("AUTONOMOUS_DATABASE"): - details := oci_disaster_recovery.UpdateDrProtectionGroupMemberAutonomousDatabaseDetails{} + details := oci_disaster_recovery.CreateDrProtectionGroupMemberAutonomousDatabaseDetails{} if autonomousDatabaseStandbyTypeForDrDrills, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "autonomous_database_standby_type_for_dr_drills")); ok { details.AutonomousDatabaseStandbyTypeForDrDrills = oci_disaster_recovery.AutonomousDatabaseStandbyTypeForDrDrillsEnum(autonomousDatabaseStandbyTypeForDrDrills.(string)) } + if destinationEncryptionKey, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "destination_encryption_key")); ok { + if tmpList := destinationEncryptionKey.([]interface{}); len(tmpList) > 0 { + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "destination_encryption_key"), 0) + tmp, err := s.mapToCreateVaultAndEncryptionKeyDetails(fieldKeyFormatNextLevel) + if err != nil { + return details, fmt.Errorf("unable to convert destination_encryption_key, encountered error: %v", err) + } + details.DestinationEncryptionKey = &tmp + } + } if passwordVaultSecretId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "password_vault_secret_id")); ok { tmp := passwordVaultSecretId.(string) details.PasswordVaultSecretId = &tmp } - details = oci_disaster_recovery.UpdateDrProtectionGroupMemberAutonomousDatabaseDetails{} if memberId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "member_id")); ok { tmp := memberId.(string) details.MemberId = &tmp @@ -1822,6 +2187,22 @@ func (s *DisasterRecoveryDrProtectionGroupResourceCrud) mapToCreateDrProtectionG tmp := destinationAvailabilityDomain.(string) details.DestinationAvailabilityDomain = &tmp } + if destinationEncryptionKey, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "destination_encryption_key")); ok { + if tmpList := destinationEncryptionKey.([]interface{}); len(tmpList) > 0 { + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "destination_encryption_key"), 0) + tmp, err := s.mapToCreateVaultAndEncryptionKeyDetails(fieldKeyFormatNextLevel) + if err != nil { + return details, fmt.Errorf("unable to convert destination_encryption_key, encountered error: %v", err) + } + details.DestinationEncryptionKey = &tmp + } + } + if destinationSnapshotPolicyId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "destination_snapshot_policy_id")); ok { + tmp := destinationSnapshotPolicyId.(string) + if tmp != "" { + details.DestinationSnapshotPolicyId = &tmp + } + } if exportMappings, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "export_mappings")); ok { interfaces := exportMappings.([]interface{}) tmp := make([]oci_disaster_recovery.FileSystemExportMappingDetails, len(interfaces)) @@ -2074,6 +2455,16 @@ func (s *DisasterRecoveryDrProtectionGroupResourceCrud) mapToUpdateDrProtectionG details.AutonomousDatabaseStandbyTypeForDrDrills = oci_disaster_recovery.AutonomousDatabaseStandbyTypeForDrDrillsEnum(tmp) } } + if destinationEncryptionKey, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "destination_encryption_key")); ok { + if tmpList := destinationEncryptionKey.([]interface{}); len(tmpList) > 0 { + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "destination_encryption_key"), 0) + tmp, err := s.mapToUpdateVaultAndEncryptionKeyDetails(fieldKeyFormatNextLevel) + if err != nil { + return details, fmt.Errorf("unable to convert destination_encryption_key, encountered error: %v", err) + } + details.DestinationEncryptionKey = &tmp + } + } if passwordVaultSecretId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "password_vault_secret_id")); ok { tmp := passwordVaultSecretId.(string) if tmp != "" { @@ -2193,6 +2584,16 @@ func (s *DisasterRecoveryDrProtectionGroupResourceCrud) mapToUpdateDrProtectionG baseObject = details case strings.ToLower("COMPUTE_INSTANCE_NON_MOVABLE"): details := oci_disaster_recovery.UpdateDrProtectionGroupMemberComputeInstanceNonMovableDetails{} + if blockVolumeAttachAndMountOperations, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "block_volume_attach_and_mount_operations")); ok { + if tmpList := blockVolumeAttachAndMountOperations.([]interface{}); len(tmpList) > 0 { + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "block_volume_attach_and_mount_operations"), 0) + tmp, err := s.mapToUpdateComputeInstanceNonMovableBlockVolumeAttachAndMountOperationsDetails(fieldKeyFormatNextLevel) + if err != nil { + return details, fmt.Errorf("unable to convert block_volume_attach_and_mount_operations, encountered error: %v", err) + } + details.BlockVolumeAttachAndMountOperations = &tmp + } + } if blockVolumeOperations, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "block_volume_operations")); ok { interfaces := blockVolumeOperations.([]interface{}) tmp := make([]oci_disaster_recovery.UpdateComputeInstanceNonMovableBlockVolumeOperationDetails, len(interfaces)) @@ -2259,6 +2660,22 @@ func (s *DisasterRecoveryDrProtectionGroupResourceCrud) mapToUpdateDrProtectionG details.DestinationAvailabilityDomain = &tmp } } + if destinationEncryptionKey, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "destination_encryption_key")); ok { + if tmpList := destinationEncryptionKey.([]interface{}); len(tmpList) > 0 { + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "destination_encryption_key"), 0) + tmp, err := s.mapToUpdateVaultAndEncryptionKeyDetails(fieldKeyFormatNextLevel) + if err != nil { + return details, fmt.Errorf("unable to convert destination_encryption_key, encountered error: %v", err) + } + details.DestinationEncryptionKey = &tmp + } + } + if destinationSnapshotPolicyId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "destination_snapshot_policy_id")); ok { + tmp := destinationSnapshotPolicyId.(string) + if tmp != "" { + details.DestinationSnapshotPolicyId = &tmp + } + } if exportMappings, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "export_mappings")); ok { interfaces := exportMappings.([]interface{}) tmp := make([]oci_disaster_recovery.FileSystemExportMappingDetails, len(interfaces)) @@ -2488,6 +2905,36 @@ func (s *DisasterRecoveryDrProtectionGroupResourceCrud) mapToUpdateDrProtectionG baseObject = details case strings.ToLower("VOLUME_GROUP"): details := oci_disaster_recovery.UpdateDrProtectionGroupMemberVolumeGroupDetails{} + if commonDestinationKey, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "common_destination_key")); ok { + if tmpList := commonDestinationKey.([]interface{}); len(tmpList) > 0 { + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "common_destination_key"), 0) + tmp, err := s.mapToUpdateVaultAndEncryptionKeyDetails(fieldKeyFormatNextLevel) + if err != nil { + return details, fmt.Errorf("unable to convert common_destination_key, encountered error: %v", err) + } + details.CommonDestinationKey = &tmp + } + } + if destinationBackupPolicyId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "destination_backup_policy_id")); ok { + tmp := destinationBackupPolicyId.(string) + details.DestinationBackupPolicyId = &tmp + } + if sourceVolumeToDestinationEncryptionKeyMappings, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "source_volume_to_destination_encryption_key_mappings")); ok { + interfaces := sourceVolumeToDestinationEncryptionKeyMappings.([]interface{}) + tmp := make([]oci_disaster_recovery.UpdateSourceVolumeToDestinationEncryptionKeyMappingDetails, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "source_volume_to_destination_encryption_key_mappings"), stateDataIndex) + converted, err := s.mapToUpdateSourceVolumeToDestinationEncryptionKeyMappingDetails(fieldKeyFormatNextLevel) + if err != nil { + return details, err + } + tmp[i] = converted + } + if len(tmp) != 0 || s.D.HasChange(fmt.Sprintf(fieldKeyFormat, "source_volume_to_destination_encryption_key_mappings")) { + details.SourceVolumeToDestinationEncryptionKeyMappings = tmp + } + } if memberId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "member_id")); ok { tmp := memberId.(string) details.MemberId = &tmp @@ -2516,6 +2963,10 @@ func DrProtectionGroupMemberToMap(obj oci_disaster_recovery.DrProtectionGroupMem result["autonomous_database_standby_type_for_dr_drills"] = string(v.AutonomousDatabaseStandbyTypeForDrDrills) + if v.DestinationEncryptionKey != nil { + result["destination_encryption_key"] = []interface{}{VaultAndEncryptionKeyToMap(v.DestinationEncryptionKey)} + } + if v.PasswordVaultSecretId != nil { result["password_vault_secret_id"] = string(*v.PasswordVaultSecretId) } @@ -2584,6 +3035,10 @@ func DrProtectionGroupMemberToMap(obj oci_disaster_recovery.DrProtectionGroupMem case oci_disaster_recovery.DrProtectionGroupMemberComputeInstanceNonMovable: result["member_type"] = "COMPUTE_INSTANCE_NON_MOVABLE" + if v.BlockVolumeAttachAndMountOperations != nil { + result["block_volume_attach_and_mount_operations"] = []interface{}{ComputeInstanceNonMovableBlockVolumeAttachAndMountOperationsDetailsToMap(v.BlockVolumeAttachAndMountOperations)} + } + blockVolumeOperations := []interface{}{} for _, item := range v.BlockVolumeOperations { blockVolumeOperations = append(blockVolumeOperations, ComputeInstanceNonMovableBlockVolumeOperationToMap(item)) @@ -2620,6 +3075,14 @@ func DrProtectionGroupMemberToMap(obj oci_disaster_recovery.DrProtectionGroupMem result["destination_availability_domain"] = string(*v.DestinationAvailabilityDomain) } + if v.DestinationEncryptionKey != nil { + result["destination_encryption_key"] = []interface{}{VaultAndEncryptionKeyToMap(v.DestinationEncryptionKey)} + } + + if v.DestinationSnapshotPolicyId != nil { + result["destination_snapshot_policy_id"] = string(*v.DestinationSnapshotPolicyId) + } + exportMappings := []interface{}{} for _, item := range v.ExportMappings { exportMappings = append(exportMappings, FileSystemExportMappingDetailsToMap(item)) @@ -2675,7 +3138,7 @@ func DrProtectionGroupMemberToMap(obj oci_disaster_recovery.DrProtectionGroupMem if v.MemberId != nil { result["member_id"] = string(*v.MemberId) } - + case oci_disaster_recovery.UpdateDrProtectionGroupMemberOkeClusterDetails: case oci_disaster_recovery.DrProtectionGroupMemberOkeCluster: result["member_type"] = "OKE_CLUSTER" @@ -2732,6 +3195,20 @@ func DrProtectionGroupMemberToMap(obj oci_disaster_recovery.DrProtectionGroupMem case oci_disaster_recovery.DrProtectionGroupMemberVolumeGroup: result["member_type"] = "VOLUME_GROUP" + if v.CommonDestinationKey != nil { + result["common_destination_key"] = []interface{}{VaultAndEncryptionKeyToMap(v.CommonDestinationKey)} + } + + if v.DestinationBackupPolicyId != nil { + result["destination_backup_policy_id"] = string(*v.DestinationBackupPolicyId) + } + + sourceVolumeToDestinationEncryptionKeyMappings := []interface{}{} + for _, item := range v.SourceVolumeToDestinationEncryptionKeyMappings { + sourceVolumeToDestinationEncryptionKeyMappings = append(sourceVolumeToDestinationEncryptionKeyMappings, SourceVolumeToDestinationEncryptionKeyMappingToMap(item)) + } + result["source_volume_to_destination_encryption_key_mappings"] = sourceVolumeToDestinationEncryptionKeyMappings + if v.MemberId != nil { result["member_id"] = string(*v.MemberId) } @@ -3271,6 +3748,126 @@ func OkeClusterVirtualNodePoolConfigurationToMap(obj oci_disaster_recovery.OkeCl return result } +func (s *DisasterRecoveryDrProtectionGroupResourceCrud) mapToCreateSourceVolumeToDestinationEncryptionKeyMappingDetails(fieldKeyFormat string) (oci_disaster_recovery.CreateSourceVolumeToDestinationEncryptionKeyMappingDetails, error) { + result := oci_disaster_recovery.CreateSourceVolumeToDestinationEncryptionKeyMappingDetails{} + + if destinationEncryptionKey, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "destination_encryption_key")); ok { + if tmpList := destinationEncryptionKey.([]interface{}); len(tmpList) > 0 { + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "destination_encryption_key"), 0) + tmp, err := s.mapToCreateVaultAndEncryptionKeyDetails(fieldKeyFormatNextLevel) + if err != nil { + return result, fmt.Errorf("unable to convert destination_encryption_key, encountered error: %v", err) + } + if tmp.EncryptionKeyId != nil || tmp.VaultId != nil { + result.DestinationEncryptionKey = &tmp + } + } + } + + if sourceVolumeId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "source_volume_id")); ok { + tmp := sourceVolumeId.(string) + if tmp != "" { + result.SourceVolumeId = &tmp + } + } + + return result, nil +} + +func (s *DisasterRecoveryDrProtectionGroupResourceCrud) mapToUpdateSourceVolumeToDestinationEncryptionKeyMappingDetails(fieldKeyFormat string) (oci_disaster_recovery.UpdateSourceVolumeToDestinationEncryptionKeyMappingDetails, error) { + result := oci_disaster_recovery.UpdateSourceVolumeToDestinationEncryptionKeyMappingDetails{} + + if destinationEncryptionKey, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "destination_encryption_key")); ok { + if tmpList := destinationEncryptionKey.([]interface{}); len(tmpList) > 0 { + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "destination_encryption_key"), 0) + tmp, err := s.mapToUpdateVaultAndEncryptionKeyDetails(fieldKeyFormatNextLevel) + if err != nil { + return result, fmt.Errorf("unable to convert destination_encryption_key, encountered error: %v", err) + } + if tmp.EncryptionKeyId != nil || tmp.VaultId != nil { + result.DestinationEncryptionKey = &tmp + } + } + } + + if sourceVolumeId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "source_volume_id")); ok { + tmp := sourceVolumeId.(string) + if tmp != "" { + result.SourceVolumeId = &tmp + } + } + + return result, nil +} + +func SourceVolumeToDestinationEncryptionKeyMappingToMap(obj oci_disaster_recovery.SourceVolumeToDestinationEncryptionKeyMapping) map[string]interface{} { + result := map[string]interface{}{} + + if obj.DestinationEncryptionKey != nil { + result["destination_encryption_key"] = []interface{}{VaultAndEncryptionKeyToMap(obj.DestinationEncryptionKey)} + } + + if obj.SourceVolumeId != nil { + result["source_volume_id"] = string(*obj.SourceVolumeId) + } + + return result +} + +func (s *DisasterRecoveryDrProtectionGroupResourceCrud) mapToCreateVaultAndEncryptionKeyDetails(fieldKeyFormat string) (oci_disaster_recovery.CreateVaultAndEncryptionKeyDetails, error) { + result := oci_disaster_recovery.CreateVaultAndEncryptionKeyDetails{} + + if encryptionKeyId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "encryption_key_id")); ok { + tmp := encryptionKeyId.(string) + if tmp != "" { + result.EncryptionKeyId = &tmp + } + } + + if vaultId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "vault_id")); ok { + tmp := vaultId.(string) + if tmp != "" { + result.VaultId = &tmp + } + } + + return result, nil +} + +func (s *DisasterRecoveryDrProtectionGroupResourceCrud) mapToUpdateVaultAndEncryptionKeyDetails(fieldKeyFormat string) (oci_disaster_recovery.UpdateVaultAndEncryptionKeyDetails, error) { + result := oci_disaster_recovery.UpdateVaultAndEncryptionKeyDetails{} + + if encryptionKeyId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "encryption_key_id")); ok { + tmp := encryptionKeyId.(string) + if tmp != "" { + result.EncryptionKeyId = &tmp + } + } + + if vaultId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "vault_id")); ok { + tmp := vaultId.(string) + if tmp != "" { + result.VaultId = &tmp + } + } + + return result, nil +} + +func VaultAndEncryptionKeyToMap(obj *oci_disaster_recovery.VaultAndEncryptionKey) map[string]interface{} { + result := map[string]interface{}{} + + if obj.EncryptionKeyId != nil { + result["encryption_key_id"] = string(*obj.EncryptionKeyId) + } + + if obj.VaultId != nil { + result["vault_id"] = string(*obj.VaultId) + } + + return result +} + func DrProtectionGroupSummaryToMap(obj oci_disaster_recovery.DrProtectionGroupSummary) map[string]interface{} { result := map[string]interface{}{} @@ -3476,6 +4073,48 @@ func UpdateComputeInstanceMovableFileSystemOperationDetailsToMap(obj oci_disaste return result } +func UpdateComputeInstanceNonMovableBlockVolumeAttachAndMountOperationsDetailsToMap(obj *oci_disaster_recovery.UpdateComputeInstanceNonMovableBlockVolumeAttachAndMountOperationsDetails) map[string]interface{} { + result := map[string]interface{}{} + + attachments := []interface{}{} + for _, item := range obj.Attachments { + attachments = append(attachments, UpdateComputeInstanceNonMovableBlockVolumeAttachOperationDetailsToMap(item)) + } + result["attachments"] = attachments + + mounts := []interface{}{} + for _, item := range obj.Mounts { + mounts = append(mounts, UpdateComputeInstanceNonMovableBlockVolumeMountOperationDetailsToMap(item)) + } + result["mounts"] = mounts + + return result +} + +func UpdateComputeInstanceNonMovableBlockVolumeAttachOperationDetailsToMap(obj oci_disaster_recovery.UpdateComputeInstanceNonMovableBlockVolumeAttachOperationDetails) map[string]interface{} { + result := map[string]interface{}{} + + if obj.BlockVolumeId != nil { + result["block_volume_id"] = string(*obj.BlockVolumeId) + } + + if obj.VolumeAttachmentReferenceInstanceId != nil { + result["volume_attachment_reference_instance_id"] = string(*obj.VolumeAttachmentReferenceInstanceId) + } + + return result +} + +func UpdateComputeInstanceNonMovableBlockVolumeMountOperationDetailsToMap(obj oci_disaster_recovery.UpdateComputeInstanceNonMovableBlockVolumeMountOperationDetails) map[string]interface{} { + result := map[string]interface{}{} + + if obj.MountPoint != nil { + result["mount_point"] = string(*obj.MountPoint) + } + + return result +} + func UpdateComputeInstanceNonMovableBlockVolumeOperationDetailsToMap(obj oci_disaster_recovery.UpdateComputeInstanceNonMovableBlockVolumeOperationDetails) map[string]interface{} { result := map[string]interface{}{} @@ -3688,66 +4327,33 @@ func UpdateOkeClusterVirtualNodePoolConfigurationDetailsToMap(obj oci_disaster_r return result } -/*func (s *DisasterRecoveryDrProtectionGroupResourceCrud) populateTopLevelPolymorphicUpdateDrProtectionGroupRequest(request *oci_disaster_recovery.UpdateDrProtectionGroupRequest) error { - //discriminator - typeRaw, ok := s.D.GetOkExists("type") - var type_ string - if ok { - type_ = typeRaw.(string) - } else { - type_ = "" // default value +func UpdateSourceVolumeToDestinationEncryptionKeyMappingDetailsToMap(obj oci_disaster_recovery.UpdateSourceVolumeToDestinationEncryptionKeyMappingDetails) map[string]interface{} { + result := map[string]interface{}{} + + if obj.DestinationEncryptionKey != nil { + result["destination_encryption_key"] = []interface{}{UpdateVaultAndEncryptionKeyDetailsToMap(obj.DestinationEncryptionKey)} } - switch strings.ToLower(type_) { - case strings.ToLower("DEFAULT"): - details := oci_disaster_recovery.DisassociateDrProtectionGroupDefaultDetails{} - if definedTags, ok := s.D.GetOkExists("defined_tags"); ok { - convertedDefinedTags, err := tfresource.MapToDefinedTags(definedTags.(map[string]interface{})) - if err != nil { - return err - } - details.DefinedTags = convertedDefinedTags - } - if displayName, ok := s.D.GetOkExists("display_name"); ok { - tmp := displayName.(string) - details.DisplayName = &tmp - } - tmp := s.D.Id() - request.DrProtectionGroupId = &tmp - if freeformTags, ok := s.D.GetOkExists("freeform_tags"); ok { - details.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) - } - if logLocation, ok := s.D.GetOkExists("log_location"); ok { - if tmpList := logLocation.([]interface{}); len(tmpList) > 0 { - fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "log_location", 0) - tmp, err := s.mapToUpdateObjectStorageLogLocationDetails(fieldKeyFormat) - if err != nil { - return err - } - details.LogLocation = &tmp - } - } - if members, ok := s.D.GetOkExists("members"); ok { - interfaces := members.([]interface{}) - tmp := make([]oci_disaster_recovery.UpdateDrProtectionGroupMemberDetails, len(interfaces)) - for i := range interfaces { - stateDataIndex := i - fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "members", stateDataIndex) - converted, err := s.mapToUpdateDrProtectionGroupMemberDetails(fieldKeyFormat) - if err != nil { - return err - } - tmp[i] = converted - } - if len(tmp) != 0 || s.D.HasChange("members") { - details.Members = tmp - } - } - request.DisassociateDrProtectionGroupDetails = details - default: - return fmt.Errorf("unknown type '%v' was specified", type_) + + if obj.SourceVolumeId != nil { + result["source_volume_id"] = string(*obj.SourceVolumeId) } - return nil -}*/ + + return result +} + +func UpdateVaultAndEncryptionKeyDetailsToMap(obj *oci_disaster_recovery.UpdateVaultAndEncryptionKeyDetails) map[string]interface{} { + result := map[string]interface{}{} + + if obj.EncryptionKeyId != nil { + result["encryption_key_id"] = string(*obj.EncryptionKeyId) + } + + if obj.VaultId != nil { + result["vault_id"] = string(*obj.VaultId) + } + + return result +} func (s *DisasterRecoveryDrProtectionGroupResourceCrud) updateCompartment(compartment interface{}) error { changeCompartmentRequest := oci_disaster_recovery.ChangeDrProtectionGroupCompartmentRequest{} diff --git a/internal/service/nosql/nosql_table_replica_resource.go b/internal/service/nosql/nosql_table_replica_resource.go index bfc9b1b0d40..13364ef0e76 100644 --- a/internal/service/nosql/nosql_table_replica_resource.go +++ b/internal/service/nosql/nosql_table_replica_resource.go @@ -355,6 +355,9 @@ func (s *NosqlTableReplicaResourceCrud) Delete() error { } func (s *NosqlTableReplicaResourceCrud) SetData() error { + if s.Res == nil { + return nil + } region, tableNameOrId, err := parseTableReplicaCompositeId(s.D.Id()) if err == nil { s.D.Set("region", ®ion) @@ -391,8 +394,9 @@ func parseTableReplicaCompositeId(compositeId string) (region string, tableNameO } func anyChangeSuppressFunction(k string, old string, new string, d *schema.ResourceData) bool { - if old == "" && new != "" { + if d.Id() == "" { return false } + log.Printf("[INFO] Replica resource doesn't support update, ignoring change to %s, k=%s, old=%s, new=%s", d.Id(), k, old, new) return true } diff --git a/internal/service/nosql/nosql_table_resource.go b/internal/service/nosql/nosql_table_resource.go index cdf49431da6..d1ecb5005d1 100644 --- a/internal/service/nosql/nosql_table_resource.go +++ b/internal/service/nosql/nosql_table_resource.go @@ -33,8 +33,9 @@ func NosqlTableResource() *schema.Resource { Schema: map[string]*schema.Schema{ // Required "compartment_id": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + DiffSuppressFunc: compartmentIdSuppressFunction, }, "ddl_statement": { Type: schema.TypeString, @@ -1036,3 +1037,19 @@ func tableLimitsSuppressFunction(k string, old string, new string, d *schema.Res } return false } + +func compartmentIdSuppressFunction(k string, old string, new string, d *schema.ResourceData) bool { + if tableName, ok := d.GetOkExists("name"); ok { + /* + * Ignore changing compartmentId for child table + */ + if strings.Contains(tableName.(string), ".") { + if old != "" { + log.Printf(" Suppress compartmentId change to the child table %s from %s to %s", + tableName, old, new) + } + return (old != "") + } + } + return false +} diff --git a/internal/service/resource_scheduler/resource_scheduler_schedule_data_source.go b/internal/service/resource_scheduler/resource_scheduler_schedule_data_source.go index acfc74b8c62..4a50f3d6cb0 100644 --- a/internal/service/resource_scheduler/resource_scheduler_schedule_data_source.go +++ b/internal/service/resource_scheduler/resource_scheduler_schedule_data_source.go @@ -87,6 +87,8 @@ func (s *ResourceSchedulerScheduleDataSourceCrud) SetData() error { s.D.Set("freeform_tags", s.Res.FreeformTags) + s.D.Set("last_run_status", s.Res.LastRunStatus) + if s.Res.RecurrenceDetails != nil { s.D.Set("recurrence_details", *s.Res.RecurrenceDetails) } diff --git a/internal/service/resource_scheduler/resource_scheduler_schedule_resource.go b/internal/service/resource_scheduler/resource_scheduler_schedule_resource.go index 504b5924302..79ba3870ef4 100644 --- a/internal/service/resource_scheduler/resource_scheduler_schedule_resource.go +++ b/internal/service/resource_scheduler/resource_scheduler_schedule_resource.go @@ -5,6 +5,7 @@ package resource_scheduler import ( "context" + "encoding/json" "fmt" "log" "strings" @@ -40,7 +41,6 @@ func ResourceSchedulerScheduleResource() *schema.Resource { "compartment_id": { Type: schema.TypeString, Required: true, - ForceNew: true, }, "recurrence_details": { Type: schema.TypeString, @@ -159,6 +159,43 @@ func ResourceSchedulerScheduleResource() *schema.Resource { Computed: true, Elem: schema.TypeString, }, + "parameters": { + Type: schema.TypeList, + Optional: true, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + "parameter_type": { + Type: schema.TypeString, + Required: true, + DiffSuppressFunc: tfresource.EqualIgnoreCaseSuppressDiff, + ValidateFunc: validation.StringInSlice([]string{ + "BODY", + "HEADER", + "PATH", + "QUERY", + }, true), + }, + + // Optional + "value": { + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + MinItems: 1, + DiffSuppressFunc: tfresource.JsonStringDiffSuppressFunction, + Elem: &schema.Schema{ + Type: schema.TypeString, // Store as a JSON string to handle both cases + ValidateFunc: validation.StringIsJSON, + DiffSuppressFunc: tfresource.JsonStringDiffSuppressFunction}, + }, + + // Computed + }, + }, + }, // Computed }, @@ -188,6 +225,10 @@ func ResourceSchedulerScheduleResource() *schema.Resource { }, // Computed + "last_run_status": { + Type: schema.TypeString, + Computed: true, + }, "system_tags": { Type: schema.TypeMap, Computed: true, @@ -594,6 +635,15 @@ func (s *ResourceSchedulerScheduleResourceCrud) Get() error { } func (s *ResourceSchedulerScheduleResourceCrud) Update() error { + if compartment, ok := s.D.GetOkExists("compartment_id"); ok && s.D.HasChange("compartment_id") { + oldRaw, newRaw := s.D.GetChange("compartment_id") + if newRaw != "" && oldRaw != "" { + err := s.updateCompartment(compartment) + if err != nil { + return err + } + } + } request := oci_resource_scheduler.UpdateScheduleRequest{} if action, ok := s.D.GetOkExists("action"); ok { @@ -728,6 +778,8 @@ func (s *ResourceSchedulerScheduleResourceCrud) SetData() error { s.D.Set("freeform_tags", s.Res.FreeformTags) + s.D.Set("last_run_status", s.Res.LastRunStatus) + if s.Res.RecurrenceDetails != nil { s.D.Set("recurrence_details", *s.Res.RecurrenceDetails) } @@ -852,6 +904,116 @@ func DefinedTagFilterValueToMap(obj oci_resource_scheduler.DefinedTagFilterValue return result } +func (s *ResourceSchedulerScheduleResourceCrud) mapToParameter(fieldKeyFormat string) (oci_resource_scheduler.Parameter, error) { + var baseObject oci_resource_scheduler.Parameter + //discriminator + parameterTypeRaw, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "parameter_type")) + var parameterType string + if ok { + parameterType = parameterTypeRaw.(string) + } else { + parameterType = "" // default value + } + switch strings.ToLower(parameterType) { + case strings.ToLower("BODY"): + details := oci_resource_scheduler.BodyParameter{} + if value, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "value")); ok { + if tmpList, ok := value.([]interface{}); ok && len(tmpList) > 0 { + jsonStr, ok := tmpList[0].(string) + if !ok { + return details, fmt.Errorf("expected string, got %T", tmpList[0]) + } + + var bodyParameterMap map[string]interface{} + if err := json.Unmarshal([]byte(jsonStr), &bodyParameterMap); err != nil { + return details, fmt.Errorf("failed to parse JSON string: %v", err) + } + + var bodyParameterInterface interface{} = bodyParameterMap + details.Value = &bodyParameterInterface + } + } + baseObject = details + case strings.ToLower("HEADER"): + details := oci_resource_scheduler.HeaderParameter{} + if value, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "value")); ok { + valueList, isList := value.([]interface{}) + if isList && len(valueList) > 0 { + if valueMap, isMap := valueList[0].(map[string]interface{}); isMap { + details.Value = tfresource.ObjectMapToStringMap(valueMap) + } + } + } + baseObject = details + case strings.ToLower("PATH"): + details := oci_resource_scheduler.PathParameter{} + if value, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "value")); ok { + valueList, isList := value.([]interface{}) + if isList && len(valueList) > 0 { + if valueMap, isMap := valueList[0].(map[string]interface{}); isMap { + details.Value = tfresource.ObjectMapToStringMap(valueMap) + } + } + } + baseObject = details + case strings.ToLower("QUERY"): + details := oci_resource_scheduler.QueryParameter{} + if value, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "value")); ok { + valueList, isList := value.([]interface{}) + if isList && len(valueList) > 0 { + if valueMap, isMap := valueList[0].(map[string]interface{}); isMap { + details.Value = tfresource.ObjectMapToStringMap(valueMap) + } + } + } + baseObject = details + default: + return nil, fmt.Errorf("unknown parameter_type '%v' was specified", parameterType) + } + return baseObject, nil +} +func marshalToJSONString(v interface{}) string { + jsonBytes, err := json.Marshal(v) + if err != nil { + log.Printf("[WARN] Failed to marshal value to JSON: %v", err) + return "{}" + } + return string(jsonBytes) +} + +func ParameterToMap(obj oci_resource_scheduler.Parameter) map[string]interface{} { + result := map[string]interface{}{} + switch v := (obj).(type) { + case oci_resource_scheduler.BodyParameter: + result["parameter_type"] = "BODY" + + if v.Value != nil { + jsonStr := marshalToJSONString(v.Value) + result["value"] = []interface{}{jsonStr} + } + case oci_resource_scheduler.HeaderParameter: + result["parameter_type"] = "HEADER" + + jsonStr := marshalToJSONString(v.Value) + result["value"] = []interface{}{jsonStr} + case oci_resource_scheduler.PathParameter: + result["parameter_type"] = "PATH" + + jsonStr := marshalToJSONString(v.Value) + result["value"] = []interface{}{jsonStr} + case oci_resource_scheduler.QueryParameter: + result["parameter_type"] = "QUERY" + + jsonStr := marshalToJSONString(v.Value) + result["value"] = []interface{}{jsonStr} + default: + log.Printf("[WARN] Received 'parameter_type' of unknown type %v", obj) + return nil + } + + return result +} + func (s *ResourceSchedulerScheduleResourceCrud) mapToResource(fieldKeyFormat string) (oci_resource_scheduler.Resource, error) { result := oci_resource_scheduler.Resource{} @@ -864,6 +1026,23 @@ func (s *ResourceSchedulerScheduleResourceCrud) mapToResource(fieldKeyFormat str result.Metadata = tfresource.ObjectMapToStringMap(metadata.(map[string]interface{})) } + if parameters, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "parameters")); ok { + interfaces := parameters.([]interface{}) + tmp := make([]oci_resource_scheduler.Parameter, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormatNextLevel := fmt.Sprintf("%s.%d.%%s", fmt.Sprintf(fieldKeyFormat, "parameters"), stateDataIndex) + converted, err := s.mapToParameter(fieldKeyFormatNextLevel) + if err != nil { + return result, err + } + tmp[i] = converted + } + if len(tmp) != 0 || s.D.HasChange(fmt.Sprintf(fieldKeyFormat, "parameters")) { + result.Parameters = tmp + } + } + return result, nil } @@ -876,6 +1055,12 @@ func ResourceToMap(obj oci_resource_scheduler.Resource) map[string]interface{} { result["metadata"] = obj.Metadata + parameters := []interface{}{} + for _, item := range obj.Parameters { + parameters = append(parameters, ParameterToMap(item)) + } + result["parameters"] = parameters + return result } @@ -1125,3 +1310,29 @@ func ScheduleSummaryToMap(obj oci_resource_scheduler.ScheduleSummary) map[string return result } + +func (s *ResourceSchedulerScheduleResourceCrud) updateCompartment(compartment interface{}) error { + changeCompartmentRequest := oci_resource_scheduler.ChangeScheduleCompartmentRequest{} + + compartmentTmp := compartment.(string) + changeCompartmentRequest.CompartmentId = &compartmentTmp + + idTmp := s.D.Id() + changeCompartmentRequest.ScheduleId = &idTmp + + changeCompartmentRequest.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "resource_scheduler") + + response, err := s.Client.ChangeScheduleCompartment(context.Background(), changeCompartmentRequest) + if err != nil { + return err + } + + workId := response.OpcWorkRequestId + return s.getScheduleFromWorkRequest(workId, tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "resource_scheduler"), []oci_resource_scheduler.ActionTypeEnum{oci_resource_scheduler.ActionTypeUpdated}, s.D.Timeout(schema.TimeoutUpdate)) +} + +func objectToMap(obj *interface{}) map[string]interface{} { + result := map[string]interface{}{} + + return result +} diff --git a/internal/service/resource_scheduler/resource_scheduler_schedules_data_source.go b/internal/service/resource_scheduler/resource_scheduler_schedules_data_source.go index db1aa9e5726..6ef4f15fc72 100644 --- a/internal/service/resource_scheduler/resource_scheduler_schedules_data_source.go +++ b/internal/service/resource_scheduler/resource_scheduler_schedules_data_source.go @@ -26,6 +26,10 @@ func ResourceSchedulerSchedulesDataSource() *schema.Resource { Type: schema.TypeString, Optional: true, }, + "resource_id": { + Type: schema.TypeString, + Optional: true, + }, "schedule_id": { Type: schema.TypeString, Optional: true, @@ -83,6 +87,11 @@ func (s *ResourceSchedulerSchedulesDataSourceCrud) Get() error { request.DisplayName = &tmp } + if resourceId, ok := s.D.GetOkExists("resource_id"); ok { + tmp := resourceId.(string) + request.ResourceId = &tmp + } + if scheduleId, ok := s.D.GetOkExists("id"); ok { tmp := scheduleId.(string) request.ScheduleId = &tmp diff --git a/internal/tfresource/crud_helpers.go b/internal/tfresource/crud_helpers.go index 623ba4237b5..dddc11ed816 100644 --- a/internal/tfresource/crud_helpers.go +++ b/internal/tfresource/crud_helpers.go @@ -1461,3 +1461,10 @@ func ValidateBoolInSlice(valid []bool) schema.SchemaValidateFunc { return } } +func ScheduledOperationDbSuppressfunc(k string, old, new string, d *schema.ResourceData) bool { + enableSchduledOpDelete, _ := d.GetOkExists("enable_delete_scheduled_operations") + if enableSchduledOpDelete.(bool) { + return true + } + return false +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/regions.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/regions.go index 56803fb649b..3c9172a5c65 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/common/regions.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/regions.go @@ -84,12 +84,6 @@ const ( RegionAPSingapore2 Region = "ap-singapore-2" //RegionMERiyadh1 region Riyadh RegionMERiyadh1 Region = "me-riyadh-1" - //RegionAPBatam1 region Batam - RegionAPBatam1 Region = "ap-batam-1" - //RegionUSDallas1 region Dallas - RegionUSDallas1 Region = "us-dallas-1" - //RegionUSAbilene1 region Abilene - RegionUSAbilene1 Region = "us-abilene-1" //RegionUSLangley1 region Langley RegionUSLangley1 Region = "us-langley-1" //RegionUSLuke1 region Luke @@ -199,9 +193,6 @@ var shortNameRegion = map[string]Region{ "vap": RegionSAValparaiso1, "xsp": RegionAPSingapore2, "ruh": RegionMERiyadh1, - "hsg": RegionAPBatam1, - "dfw": RegionUSDallas1, - "abl": RegionUSAbilene1, "lfi": RegionUSLangley1, "luf": RegionUSLuke1, "ric": RegionUSGovAshburn1, @@ -298,9 +289,6 @@ var regionRealm = map[Region]string{ RegionSAValparaiso1: "oc1", RegionAPSingapore2: "oc1", RegionMERiyadh1: "oc1", - RegionAPBatam1: "oc1", - RegionUSDallas1: "oc1", - RegionUSAbilene1: "oc1", RegionUSLangley1: "oc2", RegionUSLuke1: "oc2", diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/regions.json b/vendor/github.com/oracle/oci-go-sdk/v65/common/regions.json index d3d55d854c9..84ffa621cdf 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/common/regions.json +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/regions.json @@ -436,23 +436,5 @@ "realmKey": "oc26", "regionIdentifier": "me-alain-1", "realmDomainComponent": "oraclecloud26.com" - }, - { - "regionKey": "hsg", - "realmKey": "oc1", - "regionIdentifier": "ap-batam-1", - "realmDomainComponent": "oraclecloud.com" - }, - { - "regionKey": "dfw", - "realmKey": "oc1", - "regionIdentifier": "us-dallas-1", - "realmDomainComponent": "oraclecloud.com" - }, - { - "regionKey": "abl", - "realmKey": "oc1", - "regionIdentifier": "us-abilene-1", - "realmDomainComponent": "oraclecloud.com" } ] \ No newline at end of file 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 6686d285a3b..ac82d9cbe04 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 = "89" - patch = "2" + patch = "3" tag = "" ) diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/block_volume_attachment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/block_volume_attachment_details.go index d5bd0062206..e896dd907f1 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/block_volume_attachment_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/block_volume_attachment_details.go @@ -18,11 +18,12 @@ import ( "strings" ) -// BlockVolumeAttachmentDetails The details for attaching or detaching a block volume. +// BlockVolumeAttachmentDetails Deprecated. Use the 'ComputeInstanceNonMovableBlockVolumeAttachOperationDetails' definition instead of this. +// The details for attaching or detaching a block volume. type BlockVolumeAttachmentDetails struct { - // The OCID of the reference compute instance from which to obtain the attachment details for the volume. - // This reference compute instance is from the peer DR protection group. + // The OCID of the reference compute instance needed to obtain the volume attachment details. + // This reference compute instance belongs to the peer DR protection group. // Example: `ocid1.instance.oc1..uniqueID` VolumeAttachmentReferenceInstanceId *string `mandatory:"true" json:"volumeAttachmentReferenceInstanceId"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/block_volume_mount_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/block_volume_mount_details.go index 201e41d1cbe..216f2ab5ea5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/block_volume_mount_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/block_volume_mount_details.go @@ -18,7 +18,8 @@ import ( "strings" ) -// BlockVolumeMountDetails The details for mounting or unmounting the file system on a block volume. +// BlockVolumeMountDetails Deprecated. Use the 'ComputeInstanceNonMovableBlockVolumeMountOperationDetails' definition instead of this. +// The details for mounting or unmounting the file system on a block volume. type BlockVolumeMountDetails struct { // The physical mount point used for mounting and unmounting the file system on a block volume. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/compute_instance_movable_vnic_mapping.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/compute_instance_movable_vnic_mapping.go index 828cb160aa7..0810504041e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/compute_instance_movable_vnic_mapping.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/compute_instance_movable_vnic_mapping.go @@ -40,6 +40,10 @@ type ComputeInstanceMovableVnicMapping struct { // Example: `myhost1` DestinationPrimaryPrivateIpHostnameLabel *string `mandatory:"false" json:"destinationPrimaryPrivateIpHostnameLabel"` + // The OCID of the reserved public IP address to be assigned to the compute instance in the destination region. + // Example: `ocid1.publicip.oc1..uniqueID` + DestinationReservedPublicIpId *string `mandatory:"false" json:"destinationReservedPublicIpId"` + // A list of OCIDs of network security groups (NSG) in the destination region which should be assigned to // the source VNIC. // Example: `[ ocid1.networksecuritygroup.oc1..uniqueID, ocid1.networksecuritygroup.oc1..uniqueID ]` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/compute_instance_movable_vnic_mapping_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/compute_instance_movable_vnic_mapping_details.go index eba4ae92389..18f8580d7db 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/compute_instance_movable_vnic_mapping_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/compute_instance_movable_vnic_mapping_details.go @@ -40,6 +40,10 @@ type ComputeInstanceMovableVnicMappingDetails struct { // Example: `myhost1` DestinationPrimaryPrivateIpHostnameLabel *string `mandatory:"false" json:"destinationPrimaryPrivateIpHostnameLabel"` + // The OCID of the reserved public IP address to be assigned to the compute instance in the destination region. + // Example: `ocid1.publicip.oc1..uniqueID` + DestinationReservedPublicIpId *string `mandatory:"false" json:"destinationReservedPublicIpId"` + // A list of OCIDs of network security groups (NSG) in the destination region which should be assigned to // the source VNIC. // Example: `[ ocid1.networksecuritygroup.oc1..uniqueID, ocid1.networksecuritygroup.oc1..uniqueID ]` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/compute_instance_non_movable_block_volume_attach_and_mount_operations_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/compute_instance_non_movable_block_volume_attach_and_mount_operations_details.go new file mode 100644 index 00000000000..52fec52d458 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/compute_instance_non_movable_block_volume_attach_and_mount_operations_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeInstanceNonMovableBlockVolumeAttachAndMountOperationsDetails The details of the block volume operations performed on the non-movable compute instance. +type ComputeInstanceNonMovableBlockVolumeAttachAndMountOperationsDetails struct { + + // A list of details of attach or detach operations performed on block volumes. + Attachments []ComputeInstanceNonMovableBlockVolumeAttachOperationDetails `mandatory:"false" json:"attachments"` + + // A list of details of mount operations performed on block volumes. + Mounts []ComputeInstanceNonMovableBlockVolumeMountOperationDetails `mandatory:"false" json:"mounts"` +} + +func (m ComputeInstanceNonMovableBlockVolumeAttachAndMountOperationsDetails) String() string { + return common.PointerString(m) +} + +// 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 (m ComputeInstanceNonMovableBlockVolumeAttachAndMountOperationsDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/compute_instance_non_movable_block_volume_attach_operation_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/compute_instance_non_movable_block_volume_attach_operation_details.go new file mode 100644 index 00000000000..e304938371c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/compute_instance_non_movable_block_volume_attach_operation_details.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeInstanceNonMovableBlockVolumeAttachOperationDetails The details for attaching or detaching a block volume to a non-movable compute instance. +type ComputeInstanceNonMovableBlockVolumeAttachOperationDetails struct { + + // The OCID of the block volume. + // Example: `ocid1.volume.oc1..uniqueID` + BlockVolumeId *string `mandatory:"true" json:"blockVolumeId"` + + // The OCID of the reference compute instance needed to obtain the volume attachment details. + // This reference compute instance belongs to the peer DR protection group. + // Example: `ocid1.instance.oc1..uniqueID` + VolumeAttachmentReferenceInstanceId *string `mandatory:"false" json:"volumeAttachmentReferenceInstanceId"` +} + +func (m ComputeInstanceNonMovableBlockVolumeAttachOperationDetails) String() string { + return common.PointerString(m) +} + +// 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 (m ComputeInstanceNonMovableBlockVolumeAttachOperationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/compute_instance_non_movable_block_volume_mount_operation_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/compute_instance_non_movable_block_volume_mount_operation_details.go new file mode 100644 index 00000000000..90c5f8b1956 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/compute_instance_non_movable_block_volume_mount_operation_details.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeInstanceNonMovableBlockVolumeMountOperationDetails The details for mounting a file system on a block volume. +type ComputeInstanceNonMovableBlockVolumeMountOperationDetails struct { + + // The physical mount point where the file system is mounted on the block volume. + // Example: `/mnt/yourmountpoint` + MountPoint *string `mandatory:"true" json:"mountPoint"` +} + +func (m ComputeInstanceNonMovableBlockVolumeMountOperationDetails) String() string { + return common.PointerString(m) +} + +// 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 (m ComputeInstanceNonMovableBlockVolumeMountOperationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/compute_instance_non_movable_block_volume_operation.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/compute_instance_non_movable_block_volume_operation.go index f2d89ce413a..7307c2edacd 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/compute_instance_non_movable_block_volume_operation.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/compute_instance_non_movable_block_volume_operation.go @@ -18,7 +18,8 @@ import ( "strings" ) -// ComputeInstanceNonMovableBlockVolumeOperation The details of operations performed on a block volume. +// ComputeInstanceNonMovableBlockVolumeOperation Deprecated. Use the 'ComputeInstanceNonMovableBlockVolumeAttachAndMountOperationsDetails' definition instead of this. +// The details of operations performed on a block volume. type ComputeInstanceNonMovableBlockVolumeOperation struct { // The OCID of the block volume. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_block_volume_attachment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_block_volume_attachment_details.go index 8c0bc74dc9f..6f494e388c0 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_block_volume_attachment_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_block_volume_attachment_details.go @@ -18,11 +18,12 @@ import ( "strings" ) -// CreateBlockVolumeAttachmentDetails The details for creating a block volume attachment. +// CreateBlockVolumeAttachmentDetails Deprecated. Use the 'CreateComputeInstanceNonMovableBlockVolumeAttachOperationDetails' definition instead of this. +// The details for creating a block volume attachment. type CreateBlockVolumeAttachmentDetails struct { - // The OCID of the reference compute instance from which to obtain the attachment details for the volume. - // This reference compute instance is from the peer DR protection group. + // The OCID of the reference compute instance needed to obtain the volume attachment details. + // This reference compute instance belongs to the peer DR protection group. // Example: `ocid1.instance.oc1..uniqueID` VolumeAttachmentReferenceInstanceId *string `mandatory:"false" json:"volumeAttachmentReferenceInstanceId"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_block_volume_mount_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_block_volume_mount_details.go index cc9387ba787..992a1a8221b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_block_volume_mount_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_block_volume_mount_details.go @@ -18,10 +18,11 @@ import ( "strings" ) -// CreateBlockVolumeMountDetails The details for creating a mount for a file system on a block volume. +// CreateBlockVolumeMountDetails Deprecated. Use the 'CreateComputeInstanceNonMovableBlockVolumeMountOperationDetails' definition instead of this. +// The details for creating a mount for a file system on a block volume. type CreateBlockVolumeMountDetails struct { - // The physical mount point used for mounting the file system on the block volume. + // The physical mount point where the file system is mounted on the block volume. // Example: `/mnt/yourmountpoint` MountPoint *string `mandatory:"false" json:"mountPoint"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_compute_instance_non_movable_block_volume_attach_and_mount_operations_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_compute_instance_non_movable_block_volume_attach_and_mount_operations_details.go new file mode 100644 index 00000000000..8cf5f9cda95 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_compute_instance_non_movable_block_volume_attach_and_mount_operations_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateComputeInstanceNonMovableBlockVolumeAttachAndMountOperationsDetails The details for creating the operations performed on a block volume. +type CreateComputeInstanceNonMovableBlockVolumeAttachAndMountOperationsDetails struct { + + // A list of details of attach or detach operations performed on block volumes. + Attachments []CreateComputeInstanceNonMovableBlockVolumeAttachOperationDetails `mandatory:"false" json:"attachments"` + + // A list of details of mount operations performed on block volumes. + Mounts []CreateComputeInstanceNonMovableBlockVolumeMountOperationDetails `mandatory:"false" json:"mounts"` +} + +func (m CreateComputeInstanceNonMovableBlockVolumeAttachAndMountOperationsDetails) String() string { + return common.PointerString(m) +} + +// 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 (m CreateComputeInstanceNonMovableBlockVolumeAttachAndMountOperationsDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_compute_instance_non_movable_block_volume_attach_operation_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_compute_instance_non_movable_block_volume_attach_operation_details.go new file mode 100644 index 00000000000..1e59e45f975 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_compute_instance_non_movable_block_volume_attach_operation_details.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateComputeInstanceNonMovableBlockVolumeAttachOperationDetails The details for creating a block volume attachment. +type CreateComputeInstanceNonMovableBlockVolumeAttachOperationDetails struct { + + // The OCID of the block volume. + // Example: `ocid1.volume.oc1..uniqueID` + BlockVolumeId *string `mandatory:"true" json:"blockVolumeId"` + + // The OCID of the reference compute instance needed to obtain the volume attachment details. + // This reference compute instance belongs to the peer DR protection group. + // Example: `ocid1.instance.oc1..uniqueID` + VolumeAttachmentReferenceInstanceId *string `mandatory:"false" json:"volumeAttachmentReferenceInstanceId"` +} + +func (m CreateComputeInstanceNonMovableBlockVolumeAttachOperationDetails) String() string { + return common.PointerString(m) +} + +// 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 (m CreateComputeInstanceNonMovableBlockVolumeAttachOperationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_compute_instance_non_movable_block_volume_mount_operation_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_compute_instance_non_movable_block_volume_mount_operation_details.go new file mode 100644 index 00000000000..9aa0f949275 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_compute_instance_non_movable_block_volume_mount_operation_details.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateComputeInstanceNonMovableBlockVolumeMountOperationDetails The details for creating a mount for a file system on a block volume. +type CreateComputeInstanceNonMovableBlockVolumeMountOperationDetails struct { + + // The physical mount point where the file system is mounted on the block volume. + // Example: `/mnt/yourmountpoint` + MountPoint *string `mandatory:"true" json:"mountPoint"` +} + +func (m CreateComputeInstanceNonMovableBlockVolumeMountOperationDetails) String() string { + return common.PointerString(m) +} + +// 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 (m CreateComputeInstanceNonMovableBlockVolumeMountOperationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_compute_instance_non_movable_block_volume_operation_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_compute_instance_non_movable_block_volume_operation_details.go index 73c9e1ab4ac..e0f7d86a6c3 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_compute_instance_non_movable_block_volume_operation_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_compute_instance_non_movable_block_volume_operation_details.go @@ -18,7 +18,8 @@ import ( "strings" ) -// CreateComputeInstanceNonMovableBlockVolumeOperationDetails The details for creating the operations performed on a block volume. +// CreateComputeInstanceNonMovableBlockVolumeOperationDetails Deprecated. Use the 'CreateComputeInstanceNonMovableBlockVolumeAttachAndMountOperationsDetails' definition instead of this. +// The details for creating the operations performed on a block volume. type CreateComputeInstanceNonMovableBlockVolumeOperationDetails struct { // The OCID of the block volume. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_dr_protection_group_member_autonomous_database_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_dr_protection_group_member_autonomous_database_details.go index dc9832e3690..6c1f24255dd 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_dr_protection_group_member_autonomous_database_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_dr_protection_group_member_autonomous_database_details.go @@ -31,6 +31,8 @@ type CreateDrProtectionGroupMemberAutonomousDatabaseDetails struct { // Example: `ocid1.vaultsecret.oc1..uniqueID` PasswordVaultSecretId *string `mandatory:"false" json:"passwordVaultSecretId"` + DestinationEncryptionKey *CreateVaultAndEncryptionKeyDetails `mandatory:"false" json:"destinationEncryptionKey"` + // This specifies the mechanism used to create a temporary Autonomous Database instance for DR Drills. // See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-clone-about.html for information about these clone types. // See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-data-guard-snapshot-standby.html for information about snapshot standby. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_dr_protection_group_member_compute_instance_non_movable_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_dr_protection_group_member_compute_instance_non_movable_details.go index 1aedad14877..91a4fa31c97 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_dr_protection_group_member_compute_instance_non_movable_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_dr_protection_group_member_compute_instance_non_movable_details.go @@ -33,8 +33,11 @@ type CreateDrProtectionGroupMemberComputeInstanceNonMovableDetails struct { // A list of operations performed on file systems used by the compute instance. FileSystemOperations []CreateComputeInstanceNonMovableFileSystemOperationDetails `mandatory:"false" json:"fileSystemOperations"` + // Deprecated. Use the 'blockVolumeAttachAndMountOperations' attribute instead of this. // A list of operations performed on block volumes used by the compute instance. BlockVolumeOperations []CreateComputeInstanceNonMovableBlockVolumeOperationDetails `mandatory:"false" json:"blockVolumeOperations"` + + BlockVolumeAttachAndMountOperations *CreateComputeInstanceNonMovableBlockVolumeAttachAndMountOperationsDetails `mandatory:"false" json:"blockVolumeAttachAndMountOperations"` } // GetMemberId returns MemberId diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_dr_protection_group_member_database_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_dr_protection_group_member_database_details.go index e024e52cee8..501371f1ad5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_dr_protection_group_member_database_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_dr_protection_group_member_database_details.go @@ -19,7 +19,7 @@ import ( "strings" ) -// CreateDrProtectionGroupMemberDatabaseDetails Create properties for a Database (DBCS) member. +// CreateDrProtectionGroupMemberDatabaseDetails Create properties for a Database member. type CreateDrProtectionGroupMemberDatabaseDetails struct { // The OCID of the member. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_dr_protection_group_member_file_system_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_dr_protection_group_member_file_system_details.go index 0cd585b9560..ac594dc2764 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_dr_protection_group_member_file_system_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_dr_protection_group_member_file_system_details.go @@ -32,6 +32,12 @@ type CreateDrProtectionGroupMemberFileSystemDetails struct { // A list of mappings between file system exports in the primary region and mount targets in the standby region. ExportMappings []FileSystemExportMappingDetails `mandatory:"false" json:"exportMappings"` + + DestinationEncryptionKey *CreateVaultAndEncryptionKeyDetails `mandatory:"false" json:"destinationEncryptionKey"` + + // The OCID of the snapshot policy to use in the destination region. This policy will be attached to the file system after it moves to the destination region. + // Example: `ocid1.filesystemsnapshotpolicy.oc1..uniqueID` + DestinationSnapshotPolicyId *string `mandatory:"false" json:"destinationSnapshotPolicyId"` } // GetMemberId returns MemberId diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_dr_protection_group_member_volume_group_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_dr_protection_group_member_volume_group_details.go index f3638ebc24d..c2fd5cba752 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_dr_protection_group_member_volume_group_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_dr_protection_group_member_volume_group_details.go @@ -25,6 +25,23 @@ type CreateDrProtectionGroupMemberVolumeGroupDetails struct { // The OCID of the member. // Example: `ocid1.instance.oc1..uniqueID` MemberId *string `mandatory:"true" json:"memberId"` + + // The OCID of the backup policy to use in the destination region. This policy will be used to create backups + // for this volume group after it moves the destination region. + // Example: `ocid1.volumebackuppolicy.oc1..uniqueID` + DestinationBackupPolicyId *string `mandatory:"false" json:"destinationBackupPolicyId"` + + // A list of mappings between source volume IDs in the volume group and customer-managed encryption keys in the + // destination region which will be used to encrypt the volume after it moves to the destination region. + // If you add the entry for source volumes and its corresponding vault and encryption keys here, you can not use + // 'commonDestinationKey' for encrypting all volumes with common encryption key. Similarly, if you specify common + // vault and encryption key using 'commonDestinationKey', you cannot specify vaults and encryption keys individually + // for each volume using 'sourceVolumeToDestinationEncryptionKeyMappings'. + // An entry for each volume in volume group should be added in this list. The encryption key will not be updated + // for the volumes that are part of volume group but missing in this list. + SourceVolumeToDestinationEncryptionKeyMappings []CreateSourceVolumeToDestinationEncryptionKeyMappingDetails `mandatory:"false" json:"sourceVolumeToDestinationEncryptionKeyMappings"` + + CommonDestinationKey *CreateVaultAndEncryptionKeyDetails `mandatory:"false" json:"commonDestinationKey"` } // GetMemberId returns MemberId diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_oke_cluster_backup_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_oke_cluster_backup_config_details.go index c2a206a60b6..b79537c0201 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_oke_cluster_backup_config_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_oke_cluster_backup_config_details.go @@ -45,18 +45,18 @@ type CreateOkeClusterBackupConfigDetails struct { // - Minimum = 1 // - Maximum = 12 // Examples: - // FREQ=WEEKLY;BYDAY=MO,WE;BYHOUR=10;INTERVAL=1 -> Run a backup every week on monday and wednesday at 10:00 AM. - // FREQ=WEEKLY;BYDAY=MO,WE;BYHOUR=10;INTERVAL=2 -> Invalid configuration (can not specify interval of 2). - // FREQ=HOURLY;INTERVAL=25 -> Invalid configuration (can not specify interval of 25). - // FREQ=HOURLY;INTERVAL=0 -> Invalid configuration (can not specify interval of 0). + // FREQ=WEEKLY;BYDAY=MO,WE;BYHOUR=10;INTERVAL=1 -> Run a backup every Monday and Wednesday at 10:00 AM. + // FREQ=WEEKLY;BYDAY=MO,WE;BYHOUR=10;INTERVAL=2 -> Invalid configuration (Cannot specify an interval of 2). + // FREQ=HOURLY;INTERVAL=25 -> Invalid configuration (Cannot specify an interval of 25). + // FREQ=HOURLY;INTERVAL=0 -> Invalid configuration (Cannot specify an interval of 0). // FREQ=HOURLY;INTERVAL=24 -> Run a backup every 24 hours. // FREQ=HOURLY;INTERVAL=1 -> Run a backup every hour. // FREQ=HOURLY;BYMINUTE=30;INTERVAL=15 -> Run a backup every 15 hours at the 30th minute. // - // FREQ=DAILY;INTERVAL=31 -> Invalid configuration (can not specify interval of 31). - // FREQ=DAILY;INTERVAL=0 -> Invalid configuration (can not specify interval of 0). + // FREQ=DAILY;INTERVAL=31 -> Invalid configuration (Cannot specify an interval of 31). + // FREQ=DAILY;INTERVAL=0 -> Invalid configuration (Cannot specify an interval of 0). // FREQ=DAILY;INTERVAL=30 -> Run a backup every 30 days at 12:00 midnight. - // FREQ=DAILY;BYHOUR=17;BYMINUTE=10;INTERVAL=1 -> Run a backup every day at 05:10 PM. + // FREQ=DAILY;BYHOUR=17;BYMINUTE=10;INTERVAL=1 -> Run a backup daily at 05:10 PM. BackupSchedule *string `mandatory:"false" json:"backupSchedule"` // Controls the behaviour of image replication across regions. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_source_volume_to_destination_encryption_key_mapping_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_source_volume_to_destination_encryption_key_mapping_details.go new file mode 100644 index 00000000000..05abe734f03 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_source_volume_to_destination_encryption_key_mapping_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateSourceVolumeToDestinationEncryptionKeyMappingDetails Create source volume ID to destination customer managed vault and encryption key ID mapping for a volume group. +type CreateSourceVolumeToDestinationEncryptionKeyMappingDetails struct { + + // The OCID of the source boot volume or block volume. + // Example: `ocid1.volume.oc1..uniqueID` + SourceVolumeId *string `mandatory:"true" json:"sourceVolumeId"` + + DestinationEncryptionKey *CreateVaultAndEncryptionKeyDetails `mandatory:"true" json:"destinationEncryptionKey"` +} + +func (m CreateSourceVolumeToDestinationEncryptionKeyMappingDetails) String() string { + return common.PointerString(m) +} + +// 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 (m CreateSourceVolumeToDestinationEncryptionKeyMappingDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_vault_and_encryption_key_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_vault_and_encryption_key_details.go new file mode 100644 index 00000000000..db2758bde13 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/create_vault_and_encryption_key_details.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateVaultAndEncryptionKeyDetails Create properties for a customer-managed vault and encryption key in the destination region. +// The customer-managed encryption key in this will be used to encrypt the resource or containing resources after they +// move to the destination region. +type CreateVaultAndEncryptionKeyDetails struct { + + // The OCID of the destination region vault for the customer-managed encryption key. + // Example: `ocid1.vault.oc1..uniqueID` + VaultId *string `mandatory:"true" json:"vaultId"` + + // The OCID of the customer-managed encryption key in the destination region vault. + // Example: `ocid1.key.oc1..uniqueID` + EncryptionKeyId *string `mandatory:"true" json:"encryptionKeyId"` +} + +func (m CreateVaultAndEncryptionKeyDetails) String() string { + return common.PointerString(m) +} + +// 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 (m CreateVaultAndEncryptionKeyDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_plan_step.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_plan_step.go index 92086b27ec3..301dbf3ef0f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_plan_step.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_plan_step.go @@ -37,6 +37,10 @@ type DrPlanStep struct { // Example: `DATABASE_SWITCHOVER` DisplayName *string `mandatory:"true" json:"displayName"` + // The display name of the DR Plan step type. + // Example: `Database Switchover` + TypeDisplayName *string `mandatory:"true" json:"typeDisplayName"` + // The error mode for this step. ErrorMode DrPlanStepErrorModeEnum `mandatory:"true" json:"errorMode"` @@ -94,6 +98,7 @@ func (m *DrPlanStep) UnmarshalJSON(data []byte) (e error) { GroupId *string `json:"groupId"` Type DrPlanStepTypeEnum `json:"type"` DisplayName *string `json:"displayName"` + TypeDisplayName *string `json:"typeDisplayName"` ErrorMode DrPlanStepErrorModeEnum `json:"errorMode"` Timeout *int `json:"timeout"` IsEnabled *bool `json:"isEnabled"` @@ -126,6 +131,8 @@ func (m *DrPlanStep) UnmarshalJSON(data []byte) (e error) { m.DisplayName = model.DisplayName + m.TypeDisplayName = model.TypeDisplayName + m.ErrorMode = model.ErrorMode m.Timeout = model.Timeout diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_plan_step_execution.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_plan_step_execution.go index 08c36cdbc2d..fa45b015f76 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_plan_step_execution.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_plan_step_execution.go @@ -36,6 +36,10 @@ type DrPlanStepExecution struct { // Example: `DATABASE_SWITCHOVER` DisplayName *string `mandatory:"true" json:"displayName"` + // The display name of the DR Plan step type. + // Example: `Database Switchover` + TypeDisplayName *string `mandatory:"true" json:"typeDisplayName"` + LogLocation *ObjectStorageLogLocation `mandatory:"true" json:"logLocation"` // The status of the step execution. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_plan_step_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_plan_step_type.go index d0fa1e73550..174db911b2a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_plan_step_type.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_plan_step_type.go @@ -47,6 +47,10 @@ const ( DrPlanStepTypeAutonomousDatabaseStopDrillDeleteCloneStandby DrPlanStepTypeEnum = "AUTONOMOUS_DATABASE_STOP_DRILL_DELETE_CLONE_STANDBY" DrPlanStepTypeAutonomousDatabaseStartDrillConvertToSnapshotStandby DrPlanStepTypeEnum = "AUTONOMOUS_DATABASE_START_DRILL_CONVERT_TO_SNAPSHOT_STANDBY" DrPlanStepTypeAutonomousDatabaseStopDrillConvertToPhysicalStandby DrPlanStepTypeEnum = "AUTONOMOUS_DATABASE_STOP_DRILL_CONVERT_TO_PHYSICAL_STANDBY" + DrPlanStepTypeDatabaseStartDrillConvertToSnapshotStandbyPrecheck DrPlanStepTypeEnum = "DATABASE_START_DRILL_CONVERT_TO_SNAPSHOT_STANDBY_PRECHECK" + DrPlanStepTypeDatabaseStopDrillConvertToPhysicalStandbyPrecheck DrPlanStepTypeEnum = "DATABASE_STOP_DRILL_CONVERT_TO_PHYSICAL_STANDBY_PRECHECK" + DrPlanStepTypeDatabaseStartDrillConvertToSnapshotStandby DrPlanStepTypeEnum = "DATABASE_START_DRILL_CONVERT_TO_SNAPSHOT_STANDBY" + DrPlanStepTypeDatabaseStopDrillConvertToPhysicalStandby DrPlanStepTypeEnum = "DATABASE_STOP_DRILL_CONVERT_TO_PHYSICAL_STANDBY" DrPlanStepTypeUserDefinedPrecheck DrPlanStepTypeEnum = "USER_DEFINED_PRECHECK" DrPlanStepTypeComputeInstanceLaunch DrPlanStepTypeEnum = "COMPUTE_INSTANCE_LAUNCH" DrPlanStepTypeComputeInstanceStop DrPlanStepTypeEnum = "COMPUTE_INSTANCE_STOP" @@ -63,6 +67,7 @@ const ( DrPlanStepTypeVolumeGroupRemove DrPlanStepTypeEnum = "VOLUME_GROUP_REMOVE" DrPlanStepTypeVolumeGroupTerminate DrPlanStepTypeEnum = "VOLUME_GROUP_TERMINATE" DrPlanStepTypeUserDefined DrPlanStepTypeEnum = "USER_DEFINED" + DrPlanStepTypeUserDefinedCustomPrecheck DrPlanStepTypeEnum = "USER_DEFINED_CUSTOM_PRECHECK" DrPlanStepTypeVolumeGroupRestoreStartDrillPrecheck DrPlanStepTypeEnum = "VOLUME_GROUP_RESTORE_START_DRILL_PRECHECK" DrPlanStepTypeVolumeGroupRemovePrecheck DrPlanStepTypeEnum = "VOLUME_GROUP_REMOVE_PRECHECK" DrPlanStepTypeVolumeGroupTerminatePrecheck DrPlanStepTypeEnum = "VOLUME_GROUP_TERMINATE_PRECHECK" @@ -159,6 +164,10 @@ var mappingDrPlanStepTypeEnum = map[string]DrPlanStepTypeEnum{ "AUTONOMOUS_DATABASE_STOP_DRILL_DELETE_CLONE_STANDBY": DrPlanStepTypeAutonomousDatabaseStopDrillDeleteCloneStandby, "AUTONOMOUS_DATABASE_START_DRILL_CONVERT_TO_SNAPSHOT_STANDBY": DrPlanStepTypeAutonomousDatabaseStartDrillConvertToSnapshotStandby, "AUTONOMOUS_DATABASE_STOP_DRILL_CONVERT_TO_PHYSICAL_STANDBY": DrPlanStepTypeAutonomousDatabaseStopDrillConvertToPhysicalStandby, + "DATABASE_START_DRILL_CONVERT_TO_SNAPSHOT_STANDBY_PRECHECK": DrPlanStepTypeDatabaseStartDrillConvertToSnapshotStandbyPrecheck, + "DATABASE_STOP_DRILL_CONVERT_TO_PHYSICAL_STANDBY_PRECHECK": DrPlanStepTypeDatabaseStopDrillConvertToPhysicalStandbyPrecheck, + "DATABASE_START_DRILL_CONVERT_TO_SNAPSHOT_STANDBY": DrPlanStepTypeDatabaseStartDrillConvertToSnapshotStandby, + "DATABASE_STOP_DRILL_CONVERT_TO_PHYSICAL_STANDBY": DrPlanStepTypeDatabaseStopDrillConvertToPhysicalStandby, "USER_DEFINED_PRECHECK": DrPlanStepTypeUserDefinedPrecheck, "COMPUTE_INSTANCE_LAUNCH": DrPlanStepTypeComputeInstanceLaunch, "COMPUTE_INSTANCE_STOP": DrPlanStepTypeComputeInstanceStop, @@ -175,6 +184,7 @@ var mappingDrPlanStepTypeEnum = map[string]DrPlanStepTypeEnum{ "VOLUME_GROUP_REMOVE": DrPlanStepTypeVolumeGroupRemove, "VOLUME_GROUP_TERMINATE": DrPlanStepTypeVolumeGroupTerminate, "USER_DEFINED": DrPlanStepTypeUserDefined, + "USER_DEFINED_CUSTOM_PRECHECK": DrPlanStepTypeUserDefinedCustomPrecheck, "VOLUME_GROUP_RESTORE_START_DRILL_PRECHECK": DrPlanStepTypeVolumeGroupRestoreStartDrillPrecheck, "VOLUME_GROUP_REMOVE_PRECHECK": DrPlanStepTypeVolumeGroupRemovePrecheck, "VOLUME_GROUP_TERMINATE_PRECHECK": DrPlanStepTypeVolumeGroupTerminatePrecheck, @@ -271,6 +281,10 @@ var mappingDrPlanStepTypeEnumLowerCase = map[string]DrPlanStepTypeEnum{ "autonomous_database_stop_drill_delete_clone_standby": DrPlanStepTypeAutonomousDatabaseStopDrillDeleteCloneStandby, "autonomous_database_start_drill_convert_to_snapshot_standby": DrPlanStepTypeAutonomousDatabaseStartDrillConvertToSnapshotStandby, "autonomous_database_stop_drill_convert_to_physical_standby": DrPlanStepTypeAutonomousDatabaseStopDrillConvertToPhysicalStandby, + "database_start_drill_convert_to_snapshot_standby_precheck": DrPlanStepTypeDatabaseStartDrillConvertToSnapshotStandbyPrecheck, + "database_stop_drill_convert_to_physical_standby_precheck": DrPlanStepTypeDatabaseStopDrillConvertToPhysicalStandbyPrecheck, + "database_start_drill_convert_to_snapshot_standby": DrPlanStepTypeDatabaseStartDrillConvertToSnapshotStandby, + "database_stop_drill_convert_to_physical_standby": DrPlanStepTypeDatabaseStopDrillConvertToPhysicalStandby, "user_defined_precheck": DrPlanStepTypeUserDefinedPrecheck, "compute_instance_launch": DrPlanStepTypeComputeInstanceLaunch, "compute_instance_stop": DrPlanStepTypeComputeInstanceStop, @@ -287,6 +301,7 @@ var mappingDrPlanStepTypeEnumLowerCase = map[string]DrPlanStepTypeEnum{ "volume_group_remove": DrPlanStepTypeVolumeGroupRemove, "volume_group_terminate": DrPlanStepTypeVolumeGroupTerminate, "user_defined": DrPlanStepTypeUserDefined, + "user_defined_custom_precheck": DrPlanStepTypeUserDefinedCustomPrecheck, "volume_group_restore_start_drill_precheck": DrPlanStepTypeVolumeGroupRestoreStartDrillPrecheck, "volume_group_remove_precheck": DrPlanStepTypeVolumeGroupRemovePrecheck, "volume_group_terminate_precheck": DrPlanStepTypeVolumeGroupTerminatePrecheck, @@ -394,6 +409,10 @@ func GetDrPlanStepTypeEnumStringValues() []string { "AUTONOMOUS_DATABASE_STOP_DRILL_DELETE_CLONE_STANDBY", "AUTONOMOUS_DATABASE_START_DRILL_CONVERT_TO_SNAPSHOT_STANDBY", "AUTONOMOUS_DATABASE_STOP_DRILL_CONVERT_TO_PHYSICAL_STANDBY", + "DATABASE_START_DRILL_CONVERT_TO_SNAPSHOT_STANDBY_PRECHECK", + "DATABASE_STOP_DRILL_CONVERT_TO_PHYSICAL_STANDBY_PRECHECK", + "DATABASE_START_DRILL_CONVERT_TO_SNAPSHOT_STANDBY", + "DATABASE_STOP_DRILL_CONVERT_TO_PHYSICAL_STANDBY", "USER_DEFINED_PRECHECK", "COMPUTE_INSTANCE_LAUNCH", "COMPUTE_INSTANCE_STOP", @@ -410,6 +429,7 @@ func GetDrPlanStepTypeEnumStringValues() []string { "VOLUME_GROUP_REMOVE", "VOLUME_GROUP_TERMINATE", "USER_DEFINED", + "USER_DEFINED_CUSTOM_PRECHECK", "VOLUME_GROUP_RESTORE_START_DRILL_PRECHECK", "VOLUME_GROUP_REMOVE_PRECHECK", "VOLUME_GROUP_TERMINATE_PRECHECK", diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_plan_user_defined_step.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_plan_user_defined_step.go index 4419063069f..7ab46b2ca8a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_plan_user_defined_step.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_plan_user_defined_step.go @@ -53,6 +53,10 @@ func (m *drplanuserdefinedstep) UnmarshalPolymorphicJSON(data []byte) (interface var err error switch m.StepType { + case "INVOKE_FUNCTION_USER_DEFINED_CUSTOM_PRECHECK": + mm := InvokeFunctionUserDefinedCustomPrecheckStep{} + err = json.Unmarshal(data, &mm) + return mm, err case "INVOKE_FUNCTION": mm := InvokeFunctionStep{} err = json.Unmarshal(data, &mm) @@ -61,6 +65,10 @@ func (m *drplanuserdefinedstep) UnmarshalPolymorphicJSON(data []byte) (interface mm := InvokeFunctionPrecheckStep{} err = json.Unmarshal(data, &mm) return mm, err + case "RUN_OBJECTSTORE_SCRIPT_USER_DEFINED_CUSTOM_PRECHECK": + mm := RunObjectStoreScriptUserDefinedCustomPrecheckStep{} + err = json.Unmarshal(data, &mm) + return mm, err case "RUN_LOCAL_SCRIPT": mm := RunLocalScriptUserDefinedStep{} err = json.Unmarshal(data, &mm) @@ -73,6 +81,10 @@ func (m *drplanuserdefinedstep) UnmarshalPolymorphicJSON(data []byte) (interface mm := ObjectStoreScriptPrecheckStep{} err = json.Unmarshal(data, &mm) return mm, err + case "RUN_LOCAL_SCRIPT_USER_DEFINED_CUSTOM_PRECHECK": + mm := RunLocalScriptUserDefinedCustomPrecheckStep{} + err = json.Unmarshal(data, &mm) + return mm, err case "RUN_OBJECTSTORE_SCRIPT": mm := RunObjectStoreScriptUserDefinedStep{} err = json.Unmarshal(data, &mm) @@ -104,30 +116,39 @@ type DrPlanUserDefinedStepStepTypeEnum string // Set of constants representing the allowable values for DrPlanUserDefinedStepStepTypeEnum const ( - DrPlanUserDefinedStepStepTypeRunObjectstoreScriptPrecheck DrPlanUserDefinedStepStepTypeEnum = "RUN_OBJECTSTORE_SCRIPT_PRECHECK" - DrPlanUserDefinedStepStepTypeRunLocalScriptPrecheck DrPlanUserDefinedStepStepTypeEnum = "RUN_LOCAL_SCRIPT_PRECHECK" - DrPlanUserDefinedStepStepTypeInvokeFunctionPrecheck DrPlanUserDefinedStepStepTypeEnum = "INVOKE_FUNCTION_PRECHECK" - DrPlanUserDefinedStepStepTypeRunObjectstoreScript DrPlanUserDefinedStepStepTypeEnum = "RUN_OBJECTSTORE_SCRIPT" - DrPlanUserDefinedStepStepTypeRunLocalScript DrPlanUserDefinedStepStepTypeEnum = "RUN_LOCAL_SCRIPT" - DrPlanUserDefinedStepStepTypeInvokeFunction DrPlanUserDefinedStepStepTypeEnum = "INVOKE_FUNCTION" + DrPlanUserDefinedStepStepTypeRunObjectstoreScriptPrecheck DrPlanUserDefinedStepStepTypeEnum = "RUN_OBJECTSTORE_SCRIPT_PRECHECK" + DrPlanUserDefinedStepStepTypeRunLocalScriptPrecheck DrPlanUserDefinedStepStepTypeEnum = "RUN_LOCAL_SCRIPT_PRECHECK" + DrPlanUserDefinedStepStepTypeInvokeFunctionPrecheck DrPlanUserDefinedStepStepTypeEnum = "INVOKE_FUNCTION_PRECHECK" + DrPlanUserDefinedStepStepTypeRunObjectstoreScript DrPlanUserDefinedStepStepTypeEnum = "RUN_OBJECTSTORE_SCRIPT" + DrPlanUserDefinedStepStepTypeRunLocalScript DrPlanUserDefinedStepStepTypeEnum = "RUN_LOCAL_SCRIPT" + DrPlanUserDefinedStepStepTypeInvokeFunction DrPlanUserDefinedStepStepTypeEnum = "INVOKE_FUNCTION" + DrPlanUserDefinedStepStepTypeRunObjectstoreScriptUserDefinedCustomPrecheck DrPlanUserDefinedStepStepTypeEnum = "RUN_OBJECTSTORE_SCRIPT_USER_DEFINED_CUSTOM_PRECHECK" + DrPlanUserDefinedStepStepTypeRunLocalScriptUserDefinedCustomPrecheck DrPlanUserDefinedStepStepTypeEnum = "RUN_LOCAL_SCRIPT_USER_DEFINED_CUSTOM_PRECHECK" + DrPlanUserDefinedStepStepTypeInvokeFunctionUserDefinedCustomPrecheck DrPlanUserDefinedStepStepTypeEnum = "INVOKE_FUNCTION_USER_DEFINED_CUSTOM_PRECHECK" ) var mappingDrPlanUserDefinedStepStepTypeEnum = map[string]DrPlanUserDefinedStepStepTypeEnum{ - "RUN_OBJECTSTORE_SCRIPT_PRECHECK": DrPlanUserDefinedStepStepTypeRunObjectstoreScriptPrecheck, - "RUN_LOCAL_SCRIPT_PRECHECK": DrPlanUserDefinedStepStepTypeRunLocalScriptPrecheck, - "INVOKE_FUNCTION_PRECHECK": DrPlanUserDefinedStepStepTypeInvokeFunctionPrecheck, - "RUN_OBJECTSTORE_SCRIPT": DrPlanUserDefinedStepStepTypeRunObjectstoreScript, - "RUN_LOCAL_SCRIPT": DrPlanUserDefinedStepStepTypeRunLocalScript, - "INVOKE_FUNCTION": DrPlanUserDefinedStepStepTypeInvokeFunction, + "RUN_OBJECTSTORE_SCRIPT_PRECHECK": DrPlanUserDefinedStepStepTypeRunObjectstoreScriptPrecheck, + "RUN_LOCAL_SCRIPT_PRECHECK": DrPlanUserDefinedStepStepTypeRunLocalScriptPrecheck, + "INVOKE_FUNCTION_PRECHECK": DrPlanUserDefinedStepStepTypeInvokeFunctionPrecheck, + "RUN_OBJECTSTORE_SCRIPT": DrPlanUserDefinedStepStepTypeRunObjectstoreScript, + "RUN_LOCAL_SCRIPT": DrPlanUserDefinedStepStepTypeRunLocalScript, + "INVOKE_FUNCTION": DrPlanUserDefinedStepStepTypeInvokeFunction, + "RUN_OBJECTSTORE_SCRIPT_USER_DEFINED_CUSTOM_PRECHECK": DrPlanUserDefinedStepStepTypeRunObjectstoreScriptUserDefinedCustomPrecheck, + "RUN_LOCAL_SCRIPT_USER_DEFINED_CUSTOM_PRECHECK": DrPlanUserDefinedStepStepTypeRunLocalScriptUserDefinedCustomPrecheck, + "INVOKE_FUNCTION_USER_DEFINED_CUSTOM_PRECHECK": DrPlanUserDefinedStepStepTypeInvokeFunctionUserDefinedCustomPrecheck, } var mappingDrPlanUserDefinedStepStepTypeEnumLowerCase = map[string]DrPlanUserDefinedStepStepTypeEnum{ - "run_objectstore_script_precheck": DrPlanUserDefinedStepStepTypeRunObjectstoreScriptPrecheck, - "run_local_script_precheck": DrPlanUserDefinedStepStepTypeRunLocalScriptPrecheck, - "invoke_function_precheck": DrPlanUserDefinedStepStepTypeInvokeFunctionPrecheck, - "run_objectstore_script": DrPlanUserDefinedStepStepTypeRunObjectstoreScript, - "run_local_script": DrPlanUserDefinedStepStepTypeRunLocalScript, - "invoke_function": DrPlanUserDefinedStepStepTypeInvokeFunction, + "run_objectstore_script_precheck": DrPlanUserDefinedStepStepTypeRunObjectstoreScriptPrecheck, + "run_local_script_precheck": DrPlanUserDefinedStepStepTypeRunLocalScriptPrecheck, + "invoke_function_precheck": DrPlanUserDefinedStepStepTypeInvokeFunctionPrecheck, + "run_objectstore_script": DrPlanUserDefinedStepStepTypeRunObjectstoreScript, + "run_local_script": DrPlanUserDefinedStepStepTypeRunLocalScript, + "invoke_function": DrPlanUserDefinedStepStepTypeInvokeFunction, + "run_objectstore_script_user_defined_custom_precheck": DrPlanUserDefinedStepStepTypeRunObjectstoreScriptUserDefinedCustomPrecheck, + "run_local_script_user_defined_custom_precheck": DrPlanUserDefinedStepStepTypeRunLocalScriptUserDefinedCustomPrecheck, + "invoke_function_user_defined_custom_precheck": DrPlanUserDefinedStepStepTypeInvokeFunctionUserDefinedCustomPrecheck, } // GetDrPlanUserDefinedStepStepTypeEnumValues Enumerates the set of values for DrPlanUserDefinedStepStepTypeEnum @@ -148,6 +169,9 @@ func GetDrPlanUserDefinedStepStepTypeEnumStringValues() []string { "RUN_OBJECTSTORE_SCRIPT", "RUN_LOCAL_SCRIPT", "INVOKE_FUNCTION", + "RUN_OBJECTSTORE_SCRIPT_USER_DEFINED_CUSTOM_PRECHECK", + "RUN_LOCAL_SCRIPT_USER_DEFINED_CUSTOM_PRECHECK", + "INVOKE_FUNCTION_USER_DEFINED_CUSTOM_PRECHECK", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_protection_group_member_autonomous_database.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_protection_group_member_autonomous_database.go index 65484926b52..920ad6aa995 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_protection_group_member_autonomous_database.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_protection_group_member_autonomous_database.go @@ -31,6 +31,8 @@ type DrProtectionGroupMemberAutonomousDatabase struct { // Example: `ocid1.vaultsecret.oc1..uniqueID` PasswordVaultSecretId *string `mandatory:"false" json:"passwordVaultSecretId"` + DestinationEncryptionKey *VaultAndEncryptionKey `mandatory:"false" json:"destinationEncryptionKey"` + // This specifies the mechanism used to create a temporary Autonomous Database instance for DR Drills. // See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-clone-about.html for information about these clone types. // See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-data-guard-snapshot-standby.html for information about snapshot standby. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_protection_group_member_compute_instance_non_movable.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_protection_group_member_compute_instance_non_movable.go index ced85946cd9..824a4be9ae3 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_protection_group_member_compute_instance_non_movable.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_protection_group_member_compute_instance_non_movable.go @@ -32,8 +32,11 @@ type DrProtectionGroupMemberComputeInstanceNonMovable struct { // Operations performed on a list of file systems used on the non-movable compute instance. FileSystemOperations []ComputeInstanceNonMovableFileSystemOperation `mandatory:"false" json:"fileSystemOperations"` + // Deprecated. Use the 'blockVolumeAttachAndMountOperations' attribute instead of this. // Operations performed on a list of block volumes used on the non-movable compute instance. BlockVolumeOperations []ComputeInstanceNonMovableBlockVolumeOperation `mandatory:"false" json:"blockVolumeOperations"` + + BlockVolumeAttachAndMountOperations *ComputeInstanceNonMovableBlockVolumeAttachAndMountOperationsDetails `mandatory:"false" json:"blockVolumeAttachAndMountOperations"` } // GetMemberId returns MemberId diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_protection_group_member_file_system.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_protection_group_member_file_system.go index a2f0b7c8566..400e6d94bdf 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_protection_group_member_file_system.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_protection_group_member_file_system.go @@ -33,6 +33,12 @@ type DrProtectionGroupMemberFileSystem struct { // A list of mappings between the primary region file system export and destination region mount target. ExportMappings []FileSystemExportMapping `mandatory:"false" json:"exportMappings"` + + DestinationEncryptionKey *VaultAndEncryptionKey `mandatory:"false" json:"destinationEncryptionKey"` + + // The OCID of the snapshot policy to use in the destination region. This policy will be attached to the file system after it moves to the destination region. + // Example: `ocid1.filesystemsnapshotpolicy.oc1..uniqueID` + DestinationSnapshotPolicyId *string `mandatory:"false" json:"destinationSnapshotPolicyId"` } // GetMemberId returns MemberId diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_protection_group_member_volume_group.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_protection_group_member_volume_group.go index a579b45ca58..a6fb3e654e3 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_protection_group_member_volume_group.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/dr_protection_group_member_volume_group.go @@ -25,6 +25,22 @@ type DrProtectionGroupMemberVolumeGroup struct { // The OCID of the member. // Example: `ocid1.instance.oc1..uniqueID` MemberId *string `mandatory:"true" json:"memberId"` + + // The OCID of the backup policy to use in the destination region. This policy will be used to create backups for this volume group after it moves the destination region. + // Example: `ocid1.volumebackuppolicy.oc1..uniqueID` + DestinationBackupPolicyId *string `mandatory:"false" json:"destinationBackupPolicyId"` + + // A list of mappings between source volume IDs in the volume group and customer-managed encryption keys in the + // destination region which will be used to encrypt the volume after it moves to the destination region. + // If you add the entry for source volumes and its corresponding vault and encryption keys here, you can not use + // 'commonDestinationKey' for encrypting all volumes with common encryption key. Similarly, if you specify common + // vault and encryption key using 'commonDestinationKey', you cannot specify vaults and encryption keys individually + // for each volume using 'sourceVolumeToDestinationEncryptionKeyMappings'. + // An entry for each volume in volume group should be added in this list. The encryption key will not be updated + // for the volumes that are part of volume group but missing in this list. + SourceVolumeToDestinationEncryptionKeyMappings []SourceVolumeToDestinationEncryptionKeyMapping `mandatory:"false" json:"sourceVolumeToDestinationEncryptionKeyMappings"` + + CommonDestinationKey *VaultAndEncryptionKey `mandatory:"false" json:"commonDestinationKey"` } // GetMemberId returns MemberId diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/invoke_function_user_defined_custom_precheck_step.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/invoke_function_user_defined_custom_precheck_step.go new file mode 100644 index 00000000000..43630a1ca31 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/invoke_function_user_defined_custom_precheck_step.go @@ -0,0 +1,66 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InvokeFunctionUserDefinedCustomPrecheckStep Invoke Oracle function User Defined custom precheck step details. +type InvokeFunctionUserDefinedCustomPrecheckStep struct { + + // The OCID of function to be invoked. + // Example: `ocid1.fnfunc.oc1..uniqueID` + FunctionId *string `mandatory:"true" json:"functionId"` + + // The region in which the function is deployed. + // Example: `us-ashburn-1` + FunctionRegion *string `mandatory:"true" json:"functionRegion"` + + // The request body for the function. + // Example: `{ "FnParam1", "FnParam2" }` + RequestBody *string `mandatory:"false" json:"requestBody"` +} + +func (m InvokeFunctionUserDefinedCustomPrecheckStep) String() string { + return common.PointerString(m) +} + +// 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 (m InvokeFunctionUserDefinedCustomPrecheckStep) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m InvokeFunctionUserDefinedCustomPrecheckStep) MarshalJSON() (buff []byte, e error) { + type MarshalTypeInvokeFunctionUserDefinedCustomPrecheckStep InvokeFunctionUserDefinedCustomPrecheckStep + s := struct { + DiscriminatorParam string `json:"stepType"` + MarshalTypeInvokeFunctionUserDefinedCustomPrecheckStep + }{ + "INVOKE_FUNCTION_USER_DEFINED_CUSTOM_PRECHECK", + (MarshalTypeInvokeFunctionUserDefinedCustomPrecheckStep)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/run_local_script_user_defined_custom_precheck_step.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/run_local_script_user_defined_custom_precheck_step.go new file mode 100644 index 00000000000..28725d3de9c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/run_local_script_user_defined_custom_precheck_step.go @@ -0,0 +1,73 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RunLocalScriptUserDefinedCustomPrecheckStep Run Local Script User Defined custom precheck step details. +type RunLocalScriptUserDefinedCustomPrecheckStep struct { + + // The OCID of the instance on which this script or command should be executed. + // **For moving instances:** *runOnInstanceId* must be the OCID of the instance in the region where the + // instance is currently present. + // **For non-moving instances:** *runOnInstanceId* must be the OCID of the non-moving instance. + // Example: `ocid1.instance.oc1..uniqueID` + RunOnInstanceId *string `mandatory:"true" json:"runOnInstanceId"` + + // The region in which the instance is present. + // Example: `us-ashburn-1` + RunOnInstanceRegion *string `mandatory:"true" json:"runOnInstanceRegion"` + + // The script name and arguments. + // Example: `/usr/bin/python3 /home/opc/scripts/my_app_script.py arg1 arg2 arg3` + ScriptCommand *string `mandatory:"true" json:"scriptCommand"` + + // The userid on the instance to be used for executing the script or command. + // Example: `opc` + RunAsUser *string `mandatory:"false" json:"runAsUser"` +} + +func (m RunLocalScriptUserDefinedCustomPrecheckStep) String() string { + return common.PointerString(m) +} + +// 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 (m RunLocalScriptUserDefinedCustomPrecheckStep) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m RunLocalScriptUserDefinedCustomPrecheckStep) MarshalJSON() (buff []byte, e error) { + type MarshalTypeRunLocalScriptUserDefinedCustomPrecheckStep RunLocalScriptUserDefinedCustomPrecheckStep + s := struct { + DiscriminatorParam string `json:"stepType"` + MarshalTypeRunLocalScriptUserDefinedCustomPrecheckStep + }{ + "RUN_LOCAL_SCRIPT_USER_DEFINED_CUSTOM_PRECHECK", + (MarshalTypeRunLocalScriptUserDefinedCustomPrecheckStep)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/run_object_store_script_user_defined_custom_precheck_step.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/run_object_store_script_user_defined_custom_precheck_step.go new file mode 100644 index 00000000000..09fa144f6ca --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/run_object_store_script_user_defined_custom_precheck_step.go @@ -0,0 +1,67 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RunObjectStoreScriptUserDefinedCustomPrecheckStep Run Object Store Script User Defined custom precheck step details. +type RunObjectStoreScriptUserDefinedCustomPrecheckStep struct { + + // The OCID of the instance on which this script or command should be executed. + // **For moving instances:** *runOnInstanceId* must be the OCID of the instance in the region where the + // instance is currently present. + // **For non-moving instances:** *runOnInstanceId* must be the OCID of the non-moving instance. + // Example: `ocid1.instance.oc1..uniqueID` + RunOnInstanceId *string `mandatory:"true" json:"runOnInstanceId"` + + // The region of the instance where this script or command should be executed. + // Example: `us-ashburn-1` + RunOnInstanceRegion *string `mandatory:"true" json:"runOnInstanceRegion"` + + ObjectStorageScriptLocation *ObjectStorageScriptLocation `mandatory:"true" json:"objectStorageScriptLocation"` +} + +func (m RunObjectStoreScriptUserDefinedCustomPrecheckStep) String() string { + return common.PointerString(m) +} + +// 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 (m RunObjectStoreScriptUserDefinedCustomPrecheckStep) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m RunObjectStoreScriptUserDefinedCustomPrecheckStep) MarshalJSON() (buff []byte, e error) { + type MarshalTypeRunObjectStoreScriptUserDefinedCustomPrecheckStep RunObjectStoreScriptUserDefinedCustomPrecheckStep + s := struct { + DiscriminatorParam string `json:"stepType"` + MarshalTypeRunObjectStoreScriptUserDefinedCustomPrecheckStep + }{ + "RUN_OBJECTSTORE_SCRIPT_USER_DEFINED_CUSTOM_PRECHECK", + (MarshalTypeRunObjectStoreScriptUserDefinedCustomPrecheckStep)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/source_volume_to_destination_encryption_key_mapping.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/source_volume_to_destination_encryption_key_mapping.go new file mode 100644 index 00000000000..d6cf0933f47 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/source_volume_to_destination_encryption_key_mapping.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SourceVolumeToDestinationEncryptionKeyMapping The source volume ID to destination customer managed vault and encryption key ID mapping for a volume group. +type SourceVolumeToDestinationEncryptionKeyMapping struct { + + // The OCID of the source boot volume or block volume. + // Example: `ocid1.volume.oc1..uniqueID` + SourceVolumeId *string `mandatory:"true" json:"sourceVolumeId"` + + DestinationEncryptionKey *VaultAndEncryptionKey `mandatory:"true" json:"destinationEncryptionKey"` +} + +func (m SourceVolumeToDestinationEncryptionKeyMapping) String() string { + return common.PointerString(m) +} + +// 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 (m SourceVolumeToDestinationEncryptionKeyMapping) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_block_volume_attachment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_block_volume_attachment_details.go index 0ae56444469..3422e2958eb 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_block_volume_attachment_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_block_volume_attachment_details.go @@ -18,11 +18,12 @@ import ( "strings" ) -// UpdateBlockVolumeAttachmentDetails The details for attaching or detaching a block volume. +// UpdateBlockVolumeAttachmentDetails Deprecated. Use the 'UpdateComputeInstanceNonMovableBlockVolumeAttachOperationDetails' definition instead of this. +// The details for attaching or detaching a block volume. type UpdateBlockVolumeAttachmentDetails struct { - // The OCID of the reference compute instance from which to obtain the attachment details for the volume. - // This reference compute instance is from the peer DR protection group. + // The OCID of the reference compute instance needed to obtain the volume attachment details. + // This reference compute instance belongs to the peer DR protection group. // Example: `ocid1.instance.oc1..uniqueID` VolumeAttachmentReferenceInstanceId *string `mandatory:"false" json:"volumeAttachmentReferenceInstanceId"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_block_volume_mount_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_block_volume_mount_details.go index 213faabf32b..53dc359a121 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_block_volume_mount_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_block_volume_mount_details.go @@ -18,7 +18,8 @@ import ( "strings" ) -// UpdateBlockVolumeMountDetails The details for updating the file system mount on a block volume. +// UpdateBlockVolumeMountDetails Deprecated. Use the 'UpdateComputeInstanceNonMovableBlockVolumeMountOperationDetails' definition instead of this. +// The details for updating the file system mount on a block volume. type UpdateBlockVolumeMountDetails struct { // The physical mount point used for mounting the file system on a block volume. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_compute_instance_non_movable_block_volume_attach_and_mount_operations_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_compute_instance_non_movable_block_volume_attach_and_mount_operations_details.go new file mode 100644 index 00000000000..ac007653f85 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_compute_instance_non_movable_block_volume_attach_and_mount_operations_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateComputeInstanceNonMovableBlockVolumeAttachAndMountOperationsDetails The details for updating the block volume operations performed on the non-movable compute instance. +type UpdateComputeInstanceNonMovableBlockVolumeAttachAndMountOperationsDetails struct { + + // A list of details of attach or detach operations performed on block volumes. + Attachments []UpdateComputeInstanceNonMovableBlockVolumeAttachOperationDetails `mandatory:"false" json:"attachments"` + + // A list of details of mount operations performed on block volumes. + Mounts []UpdateComputeInstanceNonMovableBlockVolumeMountOperationDetails `mandatory:"false" json:"mounts"` +} + +func (m UpdateComputeInstanceNonMovableBlockVolumeAttachAndMountOperationsDetails) String() string { + return common.PointerString(m) +} + +// 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 (m UpdateComputeInstanceNonMovableBlockVolumeAttachAndMountOperationsDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_compute_instance_non_movable_block_volume_attach_operation_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_compute_instance_non_movable_block_volume_attach_operation_details.go new file mode 100644 index 00000000000..c6c1d2b05ea --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_compute_instance_non_movable_block_volume_attach_operation_details.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateComputeInstanceNonMovableBlockVolumeAttachOperationDetails The details for updating a block volume attachment or detachment operation. +type UpdateComputeInstanceNonMovableBlockVolumeAttachOperationDetails struct { + + // The OCID of the block volume. + // Example: `ocid1.volume.oc1..uniqueID` + BlockVolumeId *string `mandatory:"true" json:"blockVolumeId"` + + // The OCID of the reference compute instance needed to obtain the volume attachment details. + // This reference compute instance belongs to the peer DR protection group. + // Example: `ocid1.instance.oc1..uniqueID` + VolumeAttachmentReferenceInstanceId *string `mandatory:"false" json:"volumeAttachmentReferenceInstanceId"` +} + +func (m UpdateComputeInstanceNonMovableBlockVolumeAttachOperationDetails) String() string { + return common.PointerString(m) +} + +// 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 (m UpdateComputeInstanceNonMovableBlockVolumeAttachOperationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_compute_instance_non_movable_block_volume_mount_operation_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_compute_instance_non_movable_block_volume_mount_operation_details.go new file mode 100644 index 00000000000..326d4c98237 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_compute_instance_non_movable_block_volume_mount_operation_details.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateComputeInstanceNonMovableBlockVolumeMountOperationDetails The details for updating a mount for a file system on a block volume. +type UpdateComputeInstanceNonMovableBlockVolumeMountOperationDetails struct { + + // The physical mount point where the file system is mounted on the block volume. + // Example: `/mnt/yourmountpoint` + MountPoint *string `mandatory:"true" json:"mountPoint"` +} + +func (m UpdateComputeInstanceNonMovableBlockVolumeMountOperationDetails) String() string { + return common.PointerString(m) +} + +// 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 (m UpdateComputeInstanceNonMovableBlockVolumeMountOperationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_compute_instance_non_movable_block_volume_operation_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_compute_instance_non_movable_block_volume_operation_details.go index d24fef457d2..280edf93902 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_compute_instance_non_movable_block_volume_operation_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_compute_instance_non_movable_block_volume_operation_details.go @@ -18,7 +18,8 @@ import ( "strings" ) -// UpdateComputeInstanceNonMovableBlockVolumeOperationDetails The details for updating the operations performed on a block volume. +// UpdateComputeInstanceNonMovableBlockVolumeOperationDetails Deprecated. Use the 'UpdateComputeInstanceNonMovableBlockVolumeAttachAndMountOperationsDetails' definition instead of this. +// The details for updating the operations performed on a block volume. type UpdateComputeInstanceNonMovableBlockVolumeOperationDetails struct { // The OCID of the block volume. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_dr_plan_user_defined_step_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_dr_plan_user_defined_step_details.go index 3c5c34f0b43..f84b62b71a8 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_dr_plan_user_defined_step_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_dr_plan_user_defined_step_details.go @@ -53,6 +53,10 @@ func (m *updatedrplanuserdefinedstepdetails) UnmarshalPolymorphicJSON(data []byt var err error switch m.StepType { + case "RUN_LOCAL_SCRIPT_USER_DEFINED_CUSTOM_PRECHECK": + mm := UpdateRunLocalScriptUserDefinedCustomPrecheckStepDetails{} + err = json.Unmarshal(data, &mm) + return mm, err case "RUN_LOCAL_SCRIPT_PRECHECK": mm := UpdateLocalScriptPrecheckStepDetails{} err = json.Unmarshal(data, &mm) @@ -65,6 +69,14 @@ func (m *updatedrplanuserdefinedstepdetails) UnmarshalPolymorphicJSON(data []byt mm := UpdateInvokeFunctionUserDefinedStepDetails{} err = json.Unmarshal(data, &mm) return mm, err + case "RUN_OBJECTSTORE_SCRIPT_USER_DEFINED_CUSTOM_PRECHECK": + mm := UpdateRunObjectStoreScriptUserDefinedCustomPrecheckStepDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "INVOKE_FUNCTION_USER_DEFINED_CUSTOM_PRECHECK": + mm := UpdateInvokeFunctionUserDefinedCustomPrecheckStepDetails{} + err = json.Unmarshal(data, &mm) + return mm, err case "RUN_OBJECTSTORE_SCRIPT": mm := UpdateRunObjectStoreScriptUserDefinedStepDetails{} err = json.Unmarshal(data, &mm) @@ -104,30 +116,39 @@ type UpdateDrPlanUserDefinedStepDetailsStepTypeEnum string // Set of constants representing the allowable values for UpdateDrPlanUserDefinedStepDetailsStepTypeEnum const ( - UpdateDrPlanUserDefinedStepDetailsStepTypeRunObjectstoreScriptPrecheck UpdateDrPlanUserDefinedStepDetailsStepTypeEnum = "RUN_OBJECTSTORE_SCRIPT_PRECHECK" - UpdateDrPlanUserDefinedStepDetailsStepTypeRunLocalScriptPrecheck UpdateDrPlanUserDefinedStepDetailsStepTypeEnum = "RUN_LOCAL_SCRIPT_PRECHECK" - UpdateDrPlanUserDefinedStepDetailsStepTypeInvokeFunctionPrecheck UpdateDrPlanUserDefinedStepDetailsStepTypeEnum = "INVOKE_FUNCTION_PRECHECK" - UpdateDrPlanUserDefinedStepDetailsStepTypeRunObjectstoreScript UpdateDrPlanUserDefinedStepDetailsStepTypeEnum = "RUN_OBJECTSTORE_SCRIPT" - UpdateDrPlanUserDefinedStepDetailsStepTypeRunLocalScript UpdateDrPlanUserDefinedStepDetailsStepTypeEnum = "RUN_LOCAL_SCRIPT" - UpdateDrPlanUserDefinedStepDetailsStepTypeInvokeFunction UpdateDrPlanUserDefinedStepDetailsStepTypeEnum = "INVOKE_FUNCTION" + UpdateDrPlanUserDefinedStepDetailsStepTypeRunObjectstoreScriptPrecheck UpdateDrPlanUserDefinedStepDetailsStepTypeEnum = "RUN_OBJECTSTORE_SCRIPT_PRECHECK" + UpdateDrPlanUserDefinedStepDetailsStepTypeRunLocalScriptPrecheck UpdateDrPlanUserDefinedStepDetailsStepTypeEnum = "RUN_LOCAL_SCRIPT_PRECHECK" + UpdateDrPlanUserDefinedStepDetailsStepTypeInvokeFunctionPrecheck UpdateDrPlanUserDefinedStepDetailsStepTypeEnum = "INVOKE_FUNCTION_PRECHECK" + UpdateDrPlanUserDefinedStepDetailsStepTypeRunObjectstoreScript UpdateDrPlanUserDefinedStepDetailsStepTypeEnum = "RUN_OBJECTSTORE_SCRIPT" + UpdateDrPlanUserDefinedStepDetailsStepTypeRunLocalScript UpdateDrPlanUserDefinedStepDetailsStepTypeEnum = "RUN_LOCAL_SCRIPT" + UpdateDrPlanUserDefinedStepDetailsStepTypeInvokeFunction UpdateDrPlanUserDefinedStepDetailsStepTypeEnum = "INVOKE_FUNCTION" + UpdateDrPlanUserDefinedStepDetailsStepTypeRunObjectstoreScriptUserDefinedCustomPrecheck UpdateDrPlanUserDefinedStepDetailsStepTypeEnum = "RUN_OBJECTSTORE_SCRIPT_USER_DEFINED_CUSTOM_PRECHECK" + UpdateDrPlanUserDefinedStepDetailsStepTypeRunLocalScriptUserDefinedCustomPrecheck UpdateDrPlanUserDefinedStepDetailsStepTypeEnum = "RUN_LOCAL_SCRIPT_USER_DEFINED_CUSTOM_PRECHECK" + UpdateDrPlanUserDefinedStepDetailsStepTypeInvokeFunctionUserDefinedCustomPrecheck UpdateDrPlanUserDefinedStepDetailsStepTypeEnum = "INVOKE_FUNCTION_USER_DEFINED_CUSTOM_PRECHECK" ) var mappingUpdateDrPlanUserDefinedStepDetailsStepTypeEnum = map[string]UpdateDrPlanUserDefinedStepDetailsStepTypeEnum{ - "RUN_OBJECTSTORE_SCRIPT_PRECHECK": UpdateDrPlanUserDefinedStepDetailsStepTypeRunObjectstoreScriptPrecheck, - "RUN_LOCAL_SCRIPT_PRECHECK": UpdateDrPlanUserDefinedStepDetailsStepTypeRunLocalScriptPrecheck, - "INVOKE_FUNCTION_PRECHECK": UpdateDrPlanUserDefinedStepDetailsStepTypeInvokeFunctionPrecheck, - "RUN_OBJECTSTORE_SCRIPT": UpdateDrPlanUserDefinedStepDetailsStepTypeRunObjectstoreScript, - "RUN_LOCAL_SCRIPT": UpdateDrPlanUserDefinedStepDetailsStepTypeRunLocalScript, - "INVOKE_FUNCTION": UpdateDrPlanUserDefinedStepDetailsStepTypeInvokeFunction, + "RUN_OBJECTSTORE_SCRIPT_PRECHECK": UpdateDrPlanUserDefinedStepDetailsStepTypeRunObjectstoreScriptPrecheck, + "RUN_LOCAL_SCRIPT_PRECHECK": UpdateDrPlanUserDefinedStepDetailsStepTypeRunLocalScriptPrecheck, + "INVOKE_FUNCTION_PRECHECK": UpdateDrPlanUserDefinedStepDetailsStepTypeInvokeFunctionPrecheck, + "RUN_OBJECTSTORE_SCRIPT": UpdateDrPlanUserDefinedStepDetailsStepTypeRunObjectstoreScript, + "RUN_LOCAL_SCRIPT": UpdateDrPlanUserDefinedStepDetailsStepTypeRunLocalScript, + "INVOKE_FUNCTION": UpdateDrPlanUserDefinedStepDetailsStepTypeInvokeFunction, + "RUN_OBJECTSTORE_SCRIPT_USER_DEFINED_CUSTOM_PRECHECK": UpdateDrPlanUserDefinedStepDetailsStepTypeRunObjectstoreScriptUserDefinedCustomPrecheck, + "RUN_LOCAL_SCRIPT_USER_DEFINED_CUSTOM_PRECHECK": UpdateDrPlanUserDefinedStepDetailsStepTypeRunLocalScriptUserDefinedCustomPrecheck, + "INVOKE_FUNCTION_USER_DEFINED_CUSTOM_PRECHECK": UpdateDrPlanUserDefinedStepDetailsStepTypeInvokeFunctionUserDefinedCustomPrecheck, } var mappingUpdateDrPlanUserDefinedStepDetailsStepTypeEnumLowerCase = map[string]UpdateDrPlanUserDefinedStepDetailsStepTypeEnum{ - "run_objectstore_script_precheck": UpdateDrPlanUserDefinedStepDetailsStepTypeRunObjectstoreScriptPrecheck, - "run_local_script_precheck": UpdateDrPlanUserDefinedStepDetailsStepTypeRunLocalScriptPrecheck, - "invoke_function_precheck": UpdateDrPlanUserDefinedStepDetailsStepTypeInvokeFunctionPrecheck, - "run_objectstore_script": UpdateDrPlanUserDefinedStepDetailsStepTypeRunObjectstoreScript, - "run_local_script": UpdateDrPlanUserDefinedStepDetailsStepTypeRunLocalScript, - "invoke_function": UpdateDrPlanUserDefinedStepDetailsStepTypeInvokeFunction, + "run_objectstore_script_precheck": UpdateDrPlanUserDefinedStepDetailsStepTypeRunObjectstoreScriptPrecheck, + "run_local_script_precheck": UpdateDrPlanUserDefinedStepDetailsStepTypeRunLocalScriptPrecheck, + "invoke_function_precheck": UpdateDrPlanUserDefinedStepDetailsStepTypeInvokeFunctionPrecheck, + "run_objectstore_script": UpdateDrPlanUserDefinedStepDetailsStepTypeRunObjectstoreScript, + "run_local_script": UpdateDrPlanUserDefinedStepDetailsStepTypeRunLocalScript, + "invoke_function": UpdateDrPlanUserDefinedStepDetailsStepTypeInvokeFunction, + "run_objectstore_script_user_defined_custom_precheck": UpdateDrPlanUserDefinedStepDetailsStepTypeRunObjectstoreScriptUserDefinedCustomPrecheck, + "run_local_script_user_defined_custom_precheck": UpdateDrPlanUserDefinedStepDetailsStepTypeRunLocalScriptUserDefinedCustomPrecheck, + "invoke_function_user_defined_custom_precheck": UpdateDrPlanUserDefinedStepDetailsStepTypeInvokeFunctionUserDefinedCustomPrecheck, } // GetUpdateDrPlanUserDefinedStepDetailsStepTypeEnumValues Enumerates the set of values for UpdateDrPlanUserDefinedStepDetailsStepTypeEnum @@ -148,6 +169,9 @@ func GetUpdateDrPlanUserDefinedStepDetailsStepTypeEnumStringValues() []string { "RUN_OBJECTSTORE_SCRIPT", "RUN_LOCAL_SCRIPT", "INVOKE_FUNCTION", + "RUN_OBJECTSTORE_SCRIPT_USER_DEFINED_CUSTOM_PRECHECK", + "RUN_LOCAL_SCRIPT_USER_DEFINED_CUSTOM_PRECHECK", + "INVOKE_FUNCTION_USER_DEFINED_CUSTOM_PRECHECK", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_dr_protection_group_member_autonomous_database_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_dr_protection_group_member_autonomous_database_details.go index 3ec0852d4af..505d3c69d28 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_dr_protection_group_member_autonomous_database_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_dr_protection_group_member_autonomous_database_details.go @@ -31,6 +31,8 @@ type UpdateDrProtectionGroupMemberAutonomousDatabaseDetails struct { // Example: `ocid1.vaultsecret.oc1..uniqueID` PasswordVaultSecretId *string `mandatory:"false" json:"passwordVaultSecretId"` + DestinationEncryptionKey *UpdateVaultAndEncryptionKeyDetails `mandatory:"false" json:"destinationEncryptionKey"` + // This specifies the mechanism used to create a temporary Autonomous Database instance for DR Drills. // See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-clone-about.html for information about these clone types. // See https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-data-guard-snapshot-standby.html for information about snapshot standby. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_dr_protection_group_member_compute_instance_non_movable_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_dr_protection_group_member_compute_instance_non_movable_details.go index 6f5bdc2bc8a..ca91f8839af 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_dr_protection_group_member_compute_instance_non_movable_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_dr_protection_group_member_compute_instance_non_movable_details.go @@ -33,8 +33,11 @@ type UpdateDrProtectionGroupMemberComputeInstanceNonMovableDetails struct { // A list of operations performed on file systems used by the compute instance. FileSystemOperations []UpdateComputeInstanceNonMovableFileSystemOperationDetails `mandatory:"false" json:"fileSystemOperations"` + // Deprecated. Use the 'blockVolumeAttachAndMountOperations' attribute instead of this. // A list of operations performed on block volumes used by the compute instance. BlockVolumeOperations []UpdateComputeInstanceNonMovableBlockVolumeOperationDetails `mandatory:"false" json:"blockVolumeOperations"` + + BlockVolumeAttachAndMountOperations *UpdateComputeInstanceNonMovableBlockVolumeAttachAndMountOperationsDetails `mandatory:"false" json:"blockVolumeAttachAndMountOperations"` } // GetMemberId returns MemberId diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_dr_protection_group_member_database_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_dr_protection_group_member_database_details.go index 532eb6d3ebc..d1c90c58563 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_dr_protection_group_member_database_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_dr_protection_group_member_database_details.go @@ -19,7 +19,7 @@ import ( "strings" ) -// UpdateDrProtectionGroupMemberDatabaseDetails Update properties for a Database (DBCS) member. +// UpdateDrProtectionGroupMemberDatabaseDetails Update properties for a Database member. type UpdateDrProtectionGroupMemberDatabaseDetails struct { // The OCID of the member. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_dr_protection_group_member_file_system_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_dr_protection_group_member_file_system_details.go index 4290a557bea..6d4d785aa76 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_dr_protection_group_member_file_system_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_dr_protection_group_member_file_system_details.go @@ -32,6 +32,12 @@ type UpdateDrProtectionGroupMemberFileSystemDetails struct { // A list of mappings between file system exports in the primary region and mount targets in the standby region. ExportMappings []FileSystemExportMappingDetails `mandatory:"false" json:"exportMappings"` + + DestinationEncryptionKey *UpdateVaultAndEncryptionKeyDetails `mandatory:"false" json:"destinationEncryptionKey"` + + // The OCID of the snapshot policy to use in the destination region. This policy will be attached to the file system after it moves to the destination region. + // Example: `ocid1.filesystemsnapshotpolicy.oc1..uniqueID` + DestinationSnapshotPolicyId *string `mandatory:"false" json:"destinationSnapshotPolicyId"` } // GetMemberId returns MemberId diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_dr_protection_group_member_volume_group_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_dr_protection_group_member_volume_group_details.go index 53e9959b0da..d1c18fea7ee 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_dr_protection_group_member_volume_group_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_dr_protection_group_member_volume_group_details.go @@ -25,6 +25,22 @@ type UpdateDrProtectionGroupMemberVolumeGroupDetails struct { // The OCID of the member. // Example: `ocid1.database.oc1..uniqueID` MemberId *string `mandatory:"true" json:"memberId"` + + // The OCID of the backup policy to use in the destination region. This policy will be used to create backups for this volume group after it moves the destination region. + // Example: `ocid1.volumebackuppolicy.oc1..uniqueID` + DestinationBackupPolicyId *string `mandatory:"false" json:"destinationBackupPolicyId"` + + // A list of mappings between source volume IDs in the volume group and customer-managed encryption keys in the + // destination region which will be used to encrypt the volume after it moves to the destination region. + // If you add the entry for source volumes and its corresponding vault and encryption keys here, you can not use + // 'commonDestinationKey' for encrypting all volumes with common encryption key. Similarly, if you specify common + // vault and encryption key using 'commonDestinationKey', you cannot specify vaults and encryption keys individually + // for each volume using 'sourceVolumeToDestinationEncryptionKeyMappings'. + // An entry for each volume in volume group should be added in this list. The encryption key will not be updated + // for the volumes that are part of volume group but missing in this list. + SourceVolumeToDestinationEncryptionKeyMappings []UpdateSourceVolumeToDestinationEncryptionKeyMappingDetails `mandatory:"false" json:"sourceVolumeToDestinationEncryptionKeyMappings"` + + CommonDestinationKey *UpdateVaultAndEncryptionKeyDetails `mandatory:"false" json:"commonDestinationKey"` } // GetMemberId returns MemberId diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_invoke_function_user_defined_custom_precheck_step_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_invoke_function_user_defined_custom_precheck_step_details.go new file mode 100644 index 00000000000..a73bcc3688e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_invoke_function_user_defined_custom_precheck_step_details.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateInvokeFunctionUserDefinedCustomPrecheckStepDetails The details for updating an Invoke Oracle Function Precheck step. +type UpdateInvokeFunctionUserDefinedCustomPrecheckStepDetails struct { + + // The OCID of function to be invoked. + // Example: `ocid1.fnfunc.oc1..uniqueID` + FunctionId *string `mandatory:"true" json:"functionId"` + + // The request body for the function. + // Example: `{ "FnParam1", "FnParam2" }` + RequestBody *string `mandatory:"false" json:"requestBody"` +} + +func (m UpdateInvokeFunctionUserDefinedCustomPrecheckStepDetails) String() string { + return common.PointerString(m) +} + +// 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 (m UpdateInvokeFunctionUserDefinedCustomPrecheckStepDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m UpdateInvokeFunctionUserDefinedCustomPrecheckStepDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateInvokeFunctionUserDefinedCustomPrecheckStepDetails UpdateInvokeFunctionUserDefinedCustomPrecheckStepDetails + s := struct { + DiscriminatorParam string `json:"stepType"` + MarshalTypeUpdateInvokeFunctionUserDefinedCustomPrecheckStepDetails + }{ + "INVOKE_FUNCTION_USER_DEFINED_CUSTOM_PRECHECK", + (MarshalTypeUpdateInvokeFunctionUserDefinedCustomPrecheckStepDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_run_local_script_user_defined_custom_precheck_step_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_run_local_script_user_defined_custom_precheck_step_details.go new file mode 100644 index 00000000000..7cd06b72290 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_run_local_script_user_defined_custom_precheck_step_details.go @@ -0,0 +1,69 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateRunLocalScriptUserDefinedCustomPrecheckStepDetails The details for updating a Run Local Script Precheck step. +type UpdateRunLocalScriptUserDefinedCustomPrecheckStepDetails struct { + + // The OCID of the instance on which this precheck script or command should be executed. + // **For moving instances:** *runOnInstanceId* must be the OCID of the instance in the region where the + // instance is currently present. + // **For non-moving instances:** *runOnInstanceId* must be the OCID of the non-moving instance. + // Example: `ocid1.instance.oc1..uniqueID` + RunOnInstanceId *string `mandatory:"true" json:"runOnInstanceId"` + + // The script name and arguments. + // Example: `/usr/bin/python3 /home/opc/scripts/my_app_script.py arg1 arg2 arg3` + ScriptCommand *string `mandatory:"true" json:"scriptCommand"` + + // The userid on the instance to be used for executing the script or command. + // Example: `opc` + RunAsUser *string `mandatory:"false" json:"runAsUser"` +} + +func (m UpdateRunLocalScriptUserDefinedCustomPrecheckStepDetails) String() string { + return common.PointerString(m) +} + +// 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 (m UpdateRunLocalScriptUserDefinedCustomPrecheckStepDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m UpdateRunLocalScriptUserDefinedCustomPrecheckStepDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateRunLocalScriptUserDefinedCustomPrecheckStepDetails UpdateRunLocalScriptUserDefinedCustomPrecheckStepDetails + s := struct { + DiscriminatorParam string `json:"stepType"` + MarshalTypeUpdateRunLocalScriptUserDefinedCustomPrecheckStepDetails + }{ + "RUN_LOCAL_SCRIPT_USER_DEFINED_CUSTOM_PRECHECK", + (MarshalTypeUpdateRunLocalScriptUserDefinedCustomPrecheckStepDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_run_object_store_script_user_defined_custom_precheck_step_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_run_object_store_script_user_defined_custom_precheck_step_details.go new file mode 100644 index 00000000000..31b7fa3d13e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_run_object_store_script_user_defined_custom_precheck_step_details.go @@ -0,0 +1,63 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateRunObjectStoreScriptUserDefinedCustomPrecheckStepDetails The details for updating a Run Object Store Script precheck step. +type UpdateRunObjectStoreScriptUserDefinedCustomPrecheckStepDetails struct { + + // The OCID of the instance on which this precjeck script or command should be executed. + // **For moving instances:** *runOnInstanceId* must be the OCID of the instance in the region where the + // instance is currently present. + // **For non-moving instances:** *runOnInstanceId* must be the OCID of the non-moving instance. + // Example: `ocid1.instance.oc1..uniqueID` + RunOnInstanceId *string `mandatory:"true" json:"runOnInstanceId"` + + ObjectStorageScriptLocation *UpdateObjectStorageScriptLocationDetails `mandatory:"true" json:"objectStorageScriptLocation"` +} + +func (m UpdateRunObjectStoreScriptUserDefinedCustomPrecheckStepDetails) String() string { + return common.PointerString(m) +} + +// 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 (m UpdateRunObjectStoreScriptUserDefinedCustomPrecheckStepDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m UpdateRunObjectStoreScriptUserDefinedCustomPrecheckStepDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateRunObjectStoreScriptUserDefinedCustomPrecheckStepDetails UpdateRunObjectStoreScriptUserDefinedCustomPrecheckStepDetails + s := struct { + DiscriminatorParam string `json:"stepType"` + MarshalTypeUpdateRunObjectStoreScriptUserDefinedCustomPrecheckStepDetails + }{ + "RUN_OBJECTSTORE_SCRIPT_USER_DEFINED_CUSTOM_PRECHECK", + (MarshalTypeUpdateRunObjectStoreScriptUserDefinedCustomPrecheckStepDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_source_volume_to_destination_encryption_key_mapping_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_source_volume_to_destination_encryption_key_mapping_details.go new file mode 100644 index 00000000000..ab5ce18a742 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_source_volume_to_destination_encryption_key_mapping_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateSourceVolumeToDestinationEncryptionKeyMappingDetails Update source volume ID to destination customer managed vault and encryption key ID mapping for a volume group. +type UpdateSourceVolumeToDestinationEncryptionKeyMappingDetails struct { + + // The OCID of the source boot volume or block volume. + // Example: `ocid1.volume.oc1..uniqueID` + SourceVolumeId *string `mandatory:"true" json:"sourceVolumeId"` + + DestinationEncryptionKey *UpdateVaultAndEncryptionKeyDetails `mandatory:"true" json:"destinationEncryptionKey"` +} + +func (m UpdateSourceVolumeToDestinationEncryptionKeyMappingDetails) String() string { + return common.PointerString(m) +} + +// 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 (m UpdateSourceVolumeToDestinationEncryptionKeyMappingDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_vault_and_encryption_key_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_vault_and_encryption_key_details.go new file mode 100644 index 00000000000..cdcb6202dd0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/update_vault_and_encryption_key_details.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateVaultAndEncryptionKeyDetails Update properties for a customer-managed vault and encryption key in the destination region. +// The customer-managed encryption key in this will be used to encrypt the resource or containing resources after they +// move to the destination region. +type UpdateVaultAndEncryptionKeyDetails struct { + + // The OCID of the destination region vault for the customer-managed encryption key. + // Example: `ocid1.vault.oc1..uniqueID` + VaultId *string `mandatory:"true" json:"vaultId"` + + // The OCID of the customer-managed encryption key in the destination region vault. + // Example: `ocid1.key.oc1..uniqueID` + EncryptionKeyId *string `mandatory:"true" json:"encryptionKeyId"` +} + +func (m UpdateVaultAndEncryptionKeyDetails) String() string { + return common.PointerString(m) +} + +// 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 (m UpdateVaultAndEncryptionKeyDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/vault_and_encryption_key.go b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/vault_and_encryption_key.go new file mode 100644 index 00000000000..ffae1803885 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/disasterrecovery/vault_and_encryption_key.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Full Stack Disaster Recovery API +// +// Use the Full Stack Disaster Recovery (DR) API to manage disaster recovery for business applications. +// Full Stack DR is an OCI disaster recovery orchestration and management service that provides comprehensive disaster +// recovery capabilities for all layers of an application stack, including infrastructure, middleware, database, +// and application. +// + +package disasterrecovery + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VaultAndEncryptionKey The OCID of a vault and customer-managed encryption key in the destination region. +// The customer-managed encryption key in this will be used to encrypt all the volumes of the volume group after they move to the destination region. +// If you specify this common vault and encryption key, you cannot specify vaults and encryption keys individually for each volume +// using 'sourceVolumeToDestinationEncryptionKeyMappings'. +// The customer-managed encryption key in this will be used to encrypt the file system when it move to the destination region. +type VaultAndEncryptionKey struct { + + // The OCID of the destination region vault for the customer-managed encryption key. + // Example: `ocid1.vault.oc1..uniqueID` + VaultId *string `mandatory:"true" json:"vaultId"` + + // The OCID of the customer-managed encryption key in the destination region vault. + // Example: `ocid1.key.oc1..uniqueID` + EncryptionKeyId *string `mandatory:"true" json:"encryptionKeyId"` +} + +func (m VaultAndEncryptionKey) String() string { + return common.PointerString(m) +} + +// 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 (m VaultAndEncryptionKey) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeai/content_moderation_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeai/content_moderation_config.go index 600add97b7f..707874ad126 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeai/content_moderation_config.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeai/content_moderation_config.go @@ -18,11 +18,17 @@ import ( "strings" ) -// ContentModerationConfig The configuration details, whether to add the content moderation feature to the model. Content moderation removes toxic and biased content from responses. It's recommended to use content moderation. +// ContentModerationConfig The configuration details, whether to add the content moderation feature to the model. Content moderation removes toxic and biased content from responses. type ContentModerationConfig struct { // Whether to enable the content moderation feature. IsEnabled *bool `mandatory:"true" json:"isEnabled"` + + // Enum for the modes of operation for inference protection. + Mode ContentModerationConfigModeEnum `mandatory:"false" json:"mode,omitempty"` + + // The OCID of the model used for the feature. + ModelId *string `mandatory:"false" json:"modelId"` } func (m ContentModerationConfig) String() string { @@ -35,8 +41,53 @@ func (m ContentModerationConfig) String() string { func (m ContentModerationConfig) ValidateEnumValue() (bool, error) { errMessage := []string{} + if _, ok := GetMappingContentModerationConfigModeEnum(string(m.Mode)); !ok && m.Mode != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Mode: %s. Supported values are: %s.", m.Mode, strings.Join(GetContentModerationConfigModeEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } return false, nil } + +// ContentModerationConfigModeEnum Enum with underlying type: string +type ContentModerationConfigModeEnum string + +// Set of constants representing the allowable values for ContentModerationConfigModeEnum +const ( + ContentModerationConfigModeInform ContentModerationConfigModeEnum = "INFORM" + ContentModerationConfigModeBlock ContentModerationConfigModeEnum = "BLOCK" +) + +var mappingContentModerationConfigModeEnum = map[string]ContentModerationConfigModeEnum{ + "INFORM": ContentModerationConfigModeInform, + "BLOCK": ContentModerationConfigModeBlock, +} + +var mappingContentModerationConfigModeEnumLowerCase = map[string]ContentModerationConfigModeEnum{ + "inform": ContentModerationConfigModeInform, + "block": ContentModerationConfigModeBlock, +} + +// GetContentModerationConfigModeEnumValues Enumerates the set of values for ContentModerationConfigModeEnum +func GetContentModerationConfigModeEnumValues() []ContentModerationConfigModeEnum { + values := make([]ContentModerationConfigModeEnum, 0) + for _, v := range mappingContentModerationConfigModeEnum { + values = append(values, v) + } + return values +} + +// GetContentModerationConfigModeEnumStringValues Enumerates the set of values in String for ContentModerationConfigModeEnum +func GetContentModerationConfigModeEnumStringValues() []string { + return []string{ + "INFORM", + "BLOCK", + } +} + +// GetMappingContentModerationConfigModeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingContentModerationConfigModeEnum(val string) (ContentModerationConfigModeEnum, bool) { + enum, ok := mappingContentModerationConfigModeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeai/create_dedicated_ai_cluster_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeai/create_dedicated_ai_cluster_request_response.go index 59e4d473e0f..4a42b780861 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeai/create_dedicated_ai_cluster_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeai/create_dedicated_ai_cluster_request_response.go @@ -95,6 +95,9 @@ type CreateDedicatedAiClusterResponse struct { // 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"` + + // Provides deprecation details for models, included only when a model is deprecated. + ModelDeprecationInfo *string `presentIn:"header" name:"model-deprecation-info"` } func (response CreateDedicatedAiClusterResponse) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeai/create_endpoint_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeai/create_endpoint_request_response.go index d596eb3c5db..a89f5025115 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeai/create_endpoint_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeai/create_endpoint_request_response.go @@ -95,6 +95,9 @@ type CreateEndpointResponse struct { // 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"` + + // Provides deprecation details for models, included only when a model is deprecated. + ModelDeprecationInfo *string `presentIn:"header" name:"model-deprecation-info"` } func (response CreateEndpointResponse) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeai/create_model_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeai/create_model_request_response.go index 8c22eb5ea62..3b01b053184 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeai/create_model_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeai/create_model_request_response.go @@ -95,6 +95,9 @@ type CreateModelResponse struct { // 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"` + + // Provides deprecation details for models, included only when a model is deprecated. + ModelDeprecationInfo *string `presentIn:"header" name:"model-deprecation-info"` } func (response CreateModelResponse) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeai/model.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeai/model.go index cee0af6ebd3..53c009633b8 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeai/model.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeai/model.go @@ -73,6 +73,12 @@ type Model struct { // Corresponds to the time when the custom model and its associated foundation model will be deprecated. TimeDeprecated *common.SDKTime `mandatory:"false" json:"timeDeprecated"` + // The timestamp indicating when the base model will no longer be available for on-demand usage. + TimeOnDemandRetired *common.SDKTime `mandatory:"false" json:"timeOnDemandRetired"` + + // The timestamp indicating when the custom model and its associated foundation model will be fully retired. + TimeDedicatedRetired *common.SDKTime `mandatory:"false" json:"timeDedicatedRetired"` + PreviousState *Model `mandatory:"false" json:"previousState"` // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. @@ -121,27 +127,29 @@ func (m Model) ValidateEnumValue() (bool, error) { // UnmarshalJSON unmarshals from json func (m *Model) UnmarshalJSON(data []byte) (e error) { model := struct { - Description *string `json:"description"` - LifecycleDetails *string `json:"lifecycleDetails"` - Vendor *string `json:"vendor"` - Version *string `json:"version"` - DisplayName *string `json:"displayName"` - TimeUpdated *common.SDKTime `json:"timeUpdated"` - BaseModelId *string `json:"baseModelId"` - FineTuneDetails *FineTuneDetails `json:"fineTuneDetails"` - ModelMetrics modelmetrics `json:"modelMetrics"` - IsLongTermSupported *bool `json:"isLongTermSupported"` - TimeDeprecated *common.SDKTime `json:"timeDeprecated"` - PreviousState *Model `json:"previousState"` - FreeformTags map[string]string `json:"freeformTags"` - DefinedTags map[string]map[string]interface{} `json:"definedTags"` - SystemTags map[string]map[string]interface{} `json:"systemTags"` - Id *string `json:"id"` - CompartmentId *string `json:"compartmentId"` - Capabilities []ModelCapabilityEnum `json:"capabilities"` - LifecycleState ModelLifecycleStateEnum `json:"lifecycleState"` - TimeCreated *common.SDKTime `json:"timeCreated"` - Type ModelTypeEnum `json:"type"` + Description *string `json:"description"` + LifecycleDetails *string `json:"lifecycleDetails"` + Vendor *string `json:"vendor"` + Version *string `json:"version"` + DisplayName *string `json:"displayName"` + TimeUpdated *common.SDKTime `json:"timeUpdated"` + BaseModelId *string `json:"baseModelId"` + FineTuneDetails *FineTuneDetails `json:"fineTuneDetails"` + ModelMetrics modelmetrics `json:"modelMetrics"` + IsLongTermSupported *bool `json:"isLongTermSupported"` + TimeDeprecated *common.SDKTime `json:"timeDeprecated"` + TimeOnDemandRetired *common.SDKTime `json:"timeOnDemandRetired"` + TimeDedicatedRetired *common.SDKTime `json:"timeDedicatedRetired"` + PreviousState *Model `json:"previousState"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SystemTags map[string]map[string]interface{} `json:"systemTags"` + Id *string `json:"id"` + CompartmentId *string `json:"compartmentId"` + Capabilities []ModelCapabilityEnum `json:"capabilities"` + LifecycleState ModelLifecycleStateEnum `json:"lifecycleState"` + TimeCreated *common.SDKTime `json:"timeCreated"` + Type ModelTypeEnum `json:"type"` }{} e = json.Unmarshal(data, &model) @@ -179,6 +187,10 @@ func (m *Model) UnmarshalJSON(data []byte) (e error) { m.TimeDeprecated = model.TimeDeprecated + m.TimeOnDemandRetired = model.TimeOnDemandRetired + + m.TimeDedicatedRetired = model.TimeDedicatedRetired + m.PreviousState = model.PreviousState m.FreeformTags = model.FreeformTags diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeai/model_capability.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeai/model_capability.go index 81be6c9262c..f0727a87315 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeai/model_capability.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeai/model_capability.go @@ -26,6 +26,7 @@ const ( ModelCapabilityTextEmbeddings ModelCapabilityEnum = "TEXT_EMBEDDINGS" ModelCapabilityFineTune ModelCapabilityEnum = "FINE_TUNE" ModelCapabilityChat ModelCapabilityEnum = "CHAT" + ModelCapabilityTextRerank ModelCapabilityEnum = "TEXT_RERANK" ) var mappingModelCapabilityEnum = map[string]ModelCapabilityEnum{ @@ -34,6 +35,7 @@ var mappingModelCapabilityEnum = map[string]ModelCapabilityEnum{ "TEXT_EMBEDDINGS": ModelCapabilityTextEmbeddings, "FINE_TUNE": ModelCapabilityFineTune, "CHAT": ModelCapabilityChat, + "TEXT_RERANK": ModelCapabilityTextRerank, } var mappingModelCapabilityEnumLowerCase = map[string]ModelCapabilityEnum{ @@ -42,6 +44,7 @@ var mappingModelCapabilityEnumLowerCase = map[string]ModelCapabilityEnum{ "text_embeddings": ModelCapabilityTextEmbeddings, "fine_tune": ModelCapabilityFineTune, "chat": ModelCapabilityChat, + "text_rerank": ModelCapabilityTextRerank, } // GetModelCapabilityEnumValues Enumerates the set of values for ModelCapabilityEnum @@ -61,6 +64,7 @@ func GetModelCapabilityEnumStringValues() []string { "TEXT_EMBEDDINGS", "FINE_TUNE", "CHAT", + "TEXT_RERANK", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/generativeai/model_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/generativeai/model_summary.go index fccaee9005f..73617b82f93 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/generativeai/model_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/generativeai/model_summary.go @@ -74,6 +74,12 @@ type ModelSummary struct { // Corresponds to the time when the custom model and its associated foundation model will be deprecated. TimeDeprecated *common.SDKTime `mandatory:"false" json:"timeDeprecated"` + // The timestamp indicating when the base model will no longer be available for on-demand usage. + TimeOnDemandRetired *common.SDKTime `mandatory:"false" json:"timeOnDemandRetired"` + + // The timestamp indicating when the custom model and its associated foundation model will be fully retired. + TimeDedicatedRetired *common.SDKTime `mandatory:"false" json:"timeDedicatedRetired"` + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. // For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). // Example: `{"Department": "Finance"}` @@ -120,24 +126,26 @@ func (m ModelSummary) ValidateEnumValue() (bool, error) { // UnmarshalJSON unmarshals from json func (m *ModelSummary) UnmarshalJSON(data []byte) (e error) { model := struct { - LifecycleDetails *string `json:"lifecycleDetails"` - DisplayName *string `json:"displayName"` - Vendor *string `json:"vendor"` - Version *string `json:"version"` - BaseModelId *string `json:"baseModelId"` - FineTuneDetails *FineTuneDetails `json:"fineTuneDetails"` - ModelMetrics modelmetrics `json:"modelMetrics"` - IsLongTermSupported *bool `json:"isLongTermSupported"` - TimeDeprecated *common.SDKTime `json:"timeDeprecated"` - FreeformTags map[string]string `json:"freeformTags"` - DefinedTags map[string]map[string]interface{} `json:"definedTags"` - SystemTags map[string]map[string]interface{} `json:"systemTags"` - Id *string `json:"id"` - CompartmentId *string `json:"compartmentId"` - Capabilities []ModelCapabilityEnum `json:"capabilities"` - LifecycleState ModelLifecycleStateEnum `json:"lifecycleState"` - TimeCreated *common.SDKTime `json:"timeCreated"` - Type ModelTypeEnum `json:"type"` + LifecycleDetails *string `json:"lifecycleDetails"` + DisplayName *string `json:"displayName"` + Vendor *string `json:"vendor"` + Version *string `json:"version"` + BaseModelId *string `json:"baseModelId"` + FineTuneDetails *FineTuneDetails `json:"fineTuneDetails"` + ModelMetrics modelmetrics `json:"modelMetrics"` + IsLongTermSupported *bool `json:"isLongTermSupported"` + TimeDeprecated *common.SDKTime `json:"timeDeprecated"` + TimeOnDemandRetired *common.SDKTime `json:"timeOnDemandRetired"` + TimeDedicatedRetired *common.SDKTime `json:"timeDedicatedRetired"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SystemTags map[string]map[string]interface{} `json:"systemTags"` + Id *string `json:"id"` + CompartmentId *string `json:"compartmentId"` + Capabilities []ModelCapabilityEnum `json:"capabilities"` + LifecycleState ModelLifecycleStateEnum `json:"lifecycleState"` + TimeCreated *common.SDKTime `json:"timeCreated"` + Type ModelTypeEnum `json:"type"` }{} e = json.Unmarshal(data, &model) @@ -171,6 +179,10 @@ func (m *ModelSummary) UnmarshalJSON(data []byte) (e error) { m.TimeDeprecated = model.TimeDeprecated + m.TimeOnDemandRetired = model.TimeOnDemandRetired + + m.TimeDedicatedRetired = model.TimeDedicatedRetired + m.FreeformTags = model.FreeformTags m.DefinedTags = model.DefinedTags diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/lustrefilestorage/lustrefilestorage_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/lustrefilestorage/lustrefilestorage_client.go index e24c358ce73..c56e041fe71 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/lustrefilestorage/lustrefilestorage_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/lustrefilestorage/lustrefilestorage_client.go @@ -140,7 +140,7 @@ func (client LustreFileStorageClient) cancelWorkRequest(ctx context.Context, req defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/lustre/20250228/WorkRequest/CancelWorkRequest" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "LustreFileStorage", "CancelWorkRequest", apiReferenceLink) return response, err } @@ -199,7 +199,7 @@ func (client LustreFileStorageClient) changeLustreFileSystemCompartment(ctx cont defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/lustre/20250228/LustreFileSystem/ChangeLustreFileSystemCompartment" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "LustreFileStorage", "ChangeLustreFileSystemCompartment", apiReferenceLink) return response, err } @@ -262,7 +262,7 @@ func (client LustreFileStorageClient) createLustreFileSystem(ctx context.Context defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/lustre/20250228/LustreFileSystem/CreateLustreFileSystem" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "LustreFileStorage", "CreateLustreFileSystem", apiReferenceLink) return response, err } @@ -320,7 +320,7 @@ func (client LustreFileStorageClient) deleteLustreFileSystem(ctx context.Context defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/lustre/20250228/LustreFileSystem/DeleteLustreFileSystem" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "LustreFileStorage", "DeleteLustreFileSystem", apiReferenceLink) return response, err } @@ -378,7 +378,7 @@ func (client LustreFileStorageClient) getLustreFileSystem(ctx context.Context, r defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/lustre/20250228/LustreFileSystem/GetLustreFileSystem" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "LustreFileStorage", "GetLustreFileSystem", apiReferenceLink) return response, err } @@ -436,7 +436,7 @@ func (client LustreFileStorageClient) getWorkRequest(ctx context.Context, reques defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/lustre/20250228/WorkRequest/GetWorkRequest" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "LustreFileStorage", "GetWorkRequest", apiReferenceLink) return response, err } @@ -494,7 +494,7 @@ func (client LustreFileStorageClient) listLustreFileSystems(ctx context.Context, defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/lustre/20250228/LustreFileSystemCollection/ListLustreFileSystems" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "LustreFileStorage", "ListLustreFileSystems", apiReferenceLink) return response, err } @@ -552,7 +552,7 @@ func (client LustreFileStorageClient) listWorkRequestErrors(ctx context.Context, defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/lustre/20250228/WorkRequestError/ListWorkRequestErrors" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "LustreFileStorage", "ListWorkRequestErrors", apiReferenceLink) return response, err } @@ -610,7 +610,7 @@ func (client LustreFileStorageClient) listWorkRequestLogs(ctx context.Context, r defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/lustre/20250228/WorkRequestLogEntry/ListWorkRequestLogs" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "LustreFileStorage", "ListWorkRequestLogs", apiReferenceLink) return response, err } @@ -668,7 +668,7 @@ func (client LustreFileStorageClient) listWorkRequests(ctx context.Context, requ defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/lustre/20250228/WorkRequest/ListWorkRequests" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "LustreFileStorage", "ListWorkRequests", apiReferenceLink) return response, err } @@ -726,7 +726,7 @@ func (client LustreFileStorageClient) updateLustreFileSystem(ctx context.Context defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/lustre/20250228/LustreFileSystem/UpdateLustreFileSystem" + apiReferenceLink := "" err = common.PostProcessServiceError(err, "LustreFileStorage", "UpdateLustreFileSystem", apiReferenceLink) return response, err } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/body_parameter.go b/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/body_parameter.go new file mode 100644 index 00000000000..d012f703987 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/body_parameter.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Resource Scheduler API +// +// Use the Resource scheduler API to manage schedules, to perform actions on a collection of resources. +// + +package resourcescheduler + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BodyParameter This is an input parameter that will be passed as HTTP request body parameter. +type BodyParameter struct { + + // This is the body parameter value. + Value *interface{} `mandatory:"false" json:"value"` +} + +func (m BodyParameter) String() string { + return common.PointerString(m) +} + +// 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 (m BodyParameter) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m BodyParameter) MarshalJSON() (buff []byte, e error) { + type MarshalTypeBodyParameter BodyParameter + s := struct { + DiscriminatorParam string `json:"parameterType"` + MarshalTypeBodyParameter + }{ + "BODY", + (MarshalTypeBodyParameter)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/change_schedule_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/change_schedule_compartment_details.go new file mode 100644 index 00000000000..66e626975b2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/change_schedule_compartment_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Resource Scheduler API +// +// Use the Resource scheduler API to manage schedules, to perform actions on a collection of resources. +// + +package resourcescheduler + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeScheduleCompartmentDetails This is the configuration details for the move operation. +type ChangeScheduleCompartmentDetails struct { + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to move the schedule to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeScheduleCompartmentDetails) String() string { + return common.PointerString(m) +} + +// 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 (m ChangeScheduleCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/change_schedule_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/change_schedule_compartment_request_response.go new file mode 100644 index 00000000000..14679d51c66 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/change_schedule_compartment_request_response.go @@ -0,0 +1,110 @@ +// Copyright (c) 2016, 2018, 2025, 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 resourcescheduler + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeScheduleCompartmentRequest wrapper for the ChangeScheduleCompartment operation +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/resourcescheduler/ChangeScheduleCompartment.go.html to see an example of how to use ChangeScheduleCompartmentRequest. +type ChangeScheduleCompartmentRequest struct { + + // This is the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the schedule. + ScheduleId *string `mandatory:"true" contributesTo:"path" name:"scheduleId"` + + // This is the change schedule compartment details that will be updated. + ChangeScheduleCompartmentDetails `contributesTo:"body"` + + // This is used 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"` + + // This is a unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + // The only valid characters for request IDs are letters, numbers, + // underscore, and dash. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // This is a token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of running 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 removed from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // 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 ChangeScheduleCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeScheduleCompartmentRequest) 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 ChangeScheduleCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeScheduleCompartmentRequest) 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 ChangeScheduleCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeScheduleCompartmentResponse wrapper for the ChangeScheduleCompartment operation +type ChangeScheduleCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. + // Use GetWorkRequest with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // This is a 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 ChangeScheduleCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeScheduleCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/header_parameter.go b/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/header_parameter.go new file mode 100644 index 00000000000..e1dd426ca68 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/header_parameter.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Resource Scheduler API +// +// Use the Resource scheduler API to manage schedules, to perform actions on a collection of resources. +// + +package resourcescheduler + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// HeaderParameter This is an input parameter that will be passed as HTTP request header. +type HeaderParameter struct { + + // This is the HTTP request header value. + Value map[string]string `mandatory:"false" json:"value"` +} + +func (m HeaderParameter) String() string { + return common.PointerString(m) +} + +// 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 (m HeaderParameter) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m HeaderParameter) MarshalJSON() (buff []byte, e error) { + type MarshalTypeHeaderParameter HeaderParameter + s := struct { + DiscriminatorParam string `json:"parameterType"` + MarshalTypeHeaderParameter + }{ + "HEADER", + (MarshalTypeHeaderParameter)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/list_schedules_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/list_schedules_request_response.go index cd698971bcd..0a58873399a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/list_schedules_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/list_schedules_request_response.go @@ -54,6 +54,9 @@ type ListSchedulesRequest struct { // underscore, and dash. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + // This is the OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the resource affected by the work request. + ResourceId *string `mandatory:"false" contributesTo:"query" name:"resourceId"` + // 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 diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/parameter.go b/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/parameter.go new file mode 100644 index 00000000000..e0a35bb7df1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/parameter.go @@ -0,0 +1,139 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Resource Scheduler API +// +// Use the Resource scheduler API to manage schedules, to perform actions on a collection of resources. +// + +package resourcescheduler + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Parameter This is a generic input parameter to use when acting on the resource. +type Parameter interface { +} + +type parameter struct { + JsonData []byte + ParameterType string `json:"parameterType"` +} + +// UnmarshalJSON unmarshals json +func (m *parameter) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerparameter parameter + s := struct { + Model Unmarshalerparameter + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.ParameterType = s.Model.ParameterType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *parameter) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.ParameterType { + case "QUERY": + mm := QueryParameter{} + err = json.Unmarshal(data, &mm) + return mm, err + case "HEADER": + mm := HeaderParameter{} + err = json.Unmarshal(data, &mm) + return mm, err + case "BODY": + mm := BodyParameter{} + err = json.Unmarshal(data, &mm) + return mm, err + case "PATH": + mm := PathParameter{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Received unsupported enum value for Parameter: %s.", m.ParameterType) + return *m, nil + } +} + +func (m parameter) String() string { + return common.PointerString(m) +} + +// 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 (m parameter) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ParameterParameterTypeEnum Enum with underlying type: string +type ParameterParameterTypeEnum string + +// Set of constants representing the allowable values for ParameterParameterTypeEnum +const ( + ParameterParameterTypeHeader ParameterParameterTypeEnum = "HEADER" + ParameterParameterTypeBody ParameterParameterTypeEnum = "BODY" + ParameterParameterTypePath ParameterParameterTypeEnum = "PATH" + ParameterParameterTypeQuery ParameterParameterTypeEnum = "QUERY" +) + +var mappingParameterParameterTypeEnum = map[string]ParameterParameterTypeEnum{ + "HEADER": ParameterParameterTypeHeader, + "BODY": ParameterParameterTypeBody, + "PATH": ParameterParameterTypePath, + "QUERY": ParameterParameterTypeQuery, +} + +var mappingParameterParameterTypeEnumLowerCase = map[string]ParameterParameterTypeEnum{ + "header": ParameterParameterTypeHeader, + "body": ParameterParameterTypeBody, + "path": ParameterParameterTypePath, + "query": ParameterParameterTypeQuery, +} + +// GetParameterParameterTypeEnumValues Enumerates the set of values for ParameterParameterTypeEnum +func GetParameterParameterTypeEnumValues() []ParameterParameterTypeEnum { + values := make([]ParameterParameterTypeEnum, 0) + for _, v := range mappingParameterParameterTypeEnum { + values = append(values, v) + } + return values +} + +// GetParameterParameterTypeEnumStringValues Enumerates the set of values in String for ParameterParameterTypeEnum +func GetParameterParameterTypeEnumStringValues() []string { + return []string{ + "HEADER", + "BODY", + "PATH", + "QUERY", + } +} + +// GetMappingParameterParameterTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingParameterParameterTypeEnum(val string) (ParameterParameterTypeEnum, bool) { + enum, ok := mappingParameterParameterTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/path_parameter.go b/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/path_parameter.go new file mode 100644 index 00000000000..3289ecea80d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/path_parameter.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Resource Scheduler API +// +// Use the Resource scheduler API to manage schedules, to perform actions on a collection of resources. +// + +package resourcescheduler + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PathParameter This is an input parameter that will be passed as URL path parameter. +type PathParameter struct { + + // This is the path parameter value. + Value map[string]string `mandatory:"false" json:"value"` +} + +func (m PathParameter) String() string { + return common.PointerString(m) +} + +// 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 (m PathParameter) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m PathParameter) MarshalJSON() (buff []byte, e error) { + type MarshalTypePathParameter PathParameter + s := struct { + DiscriminatorParam string `json:"parameterType"` + MarshalTypePathParameter + }{ + "PATH", + (MarshalTypePathParameter)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/query_parameter.go b/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/query_parameter.go new file mode 100644 index 00000000000..4243e4e73bd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/query_parameter.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 2025, 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. + +// Resource Scheduler API +// +// Use the Resource scheduler API to manage schedules, to perform actions on a collection of resources. +// + +package resourcescheduler + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// QueryParameter This is an input parameter that will be passed as URL query parameter. +type QueryParameter struct { + + // This is the query parameter value. + Value map[string]string `mandatory:"false" json:"value"` +} + +func (m QueryParameter) String() string { + return common.PointerString(m) +} + +// 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 (m QueryParameter) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m QueryParameter) MarshalJSON() (buff []byte, e error) { + type MarshalTypeQueryParameter QueryParameter + s := struct { + DiscriminatorParam string `json:"parameterType"` + MarshalTypeQueryParameter + }{ + "QUERY", + (MarshalTypeQueryParameter)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/resource.go b/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/resource.go index 74164c2389c..ae65c4a61e1 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/resource.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/resource.go @@ -10,6 +10,7 @@ package resourcescheduler import ( + "encoding/json" "fmt" "github.com/oracle/oci-go-sdk/v65/common" "strings" @@ -31,6 +32,48 @@ type Resource struct { // } // } Metadata map[string]string `mandatory:"false" json:"metadata"` + + // This is the user input parameters to use when acting on the resource. + // { + // "parameters": [ + // { + // "parameterType": "BODY", + // "value": { + // "ip": "192.168.44.44", + // "memory": "1024", + // "synced_folders": [ + // { + // "host_path": "data/", + // "guest_path": "/var/www", + // "type": "default" + // } + // ], + // "forwarded_ports": [] + // } + // }, + // { + // "parameterType": "PATH", + // "value": { + // "compartmentId": "ocid1.compartment.oc1..xxxxx", + // "instanceId": "ocid1.vcn.oc1..yyyy" + // } + // }, + // { + // "parameterType": "QUERY", + // "value": { + // "limit": "10", + // "tenantId": "ocid1.tenant.oc1..zzzz" + // } + // }, + // { + // "parameterType": "HEADER", + // "value": { + // "token": "xxxx" + // } + // } + // ] + // } + Parameters []Parameter `mandatory:"false" json:"parameters"` } func (m Resource) String() string { @@ -48,3 +91,35 @@ func (m Resource) ValidateEnumValue() (bool, error) { } return false, nil } + +// UnmarshalJSON unmarshals from json +func (m *Resource) UnmarshalJSON(data []byte) (e error) { + model := struct { + Metadata map[string]string `json:"metadata"` + Parameters []parameter `json:"parameters"` + Id *string `json:"id"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Metadata = model.Metadata + + m.Parameters = make([]Parameter, len(model.Parameters)) + for i, n := range model.Parameters { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.Parameters[i] = nn.(Parameter) + } else { + m.Parameters[i] = nil + } + } + m.Id = model.Id + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/resourcescheduler_schedule_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/resourcescheduler_schedule_client.go index 97586b42310..aa1334a7e3c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/resourcescheduler_schedule_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/resourcescheduler_schedule_client.go @@ -212,7 +212,71 @@ func (client ScheduleClient) cancelWorkRequest(ctx context.Context, request comm return response, err } -// CreateSchedule Creates a Schedule +// ChangeScheduleCompartment This API) moves a schedule into a different compartment within the same tenancy. For information about moving resources between +// compartments, see Moving Resources to a Different Compartment (https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/resourcescheduler/ChangeScheduleCompartment.go.html to see an example of how to use ChangeScheduleCompartment API. +// A default retry strategy applies to this operation ChangeScheduleCompartment() +func (client ScheduleClient) ChangeScheduleCompartment(ctx context.Context, request ChangeScheduleCompartmentRequest) (response ChangeScheduleCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + 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.changeScheduleCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeScheduleCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeScheduleCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeScheduleCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeScheduleCompartmentResponse") + } + return +} + +// changeScheduleCompartment implements the OCIOperation interface (enables retrying operations) +func (client ScheduleClient) changeScheduleCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/schedules/{scheduleId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ChangeScheduleCompartmentResponse + 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/resource-scheduler/20240430/Schedule/ChangeScheduleCompartment" + err = common.PostProcessServiceError(err, "Schedule", "ChangeScheduleCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateSchedule This API creates a schedule. You must provide either resources or resourceFilters. // // # See also // @@ -570,7 +634,7 @@ func (client ScheduleClient) listResourceTypes(ctx context.Context, request comm return response, err } -// ListSchedules This API gets a list of schedules +// ListSchedules This API gets a list of schedules. You must provide either a compartmentId or a scheduleId or both. You can list resources in this compartment OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). This is required unless a specific schedule ID is passed. // // # See also // @@ -744,7 +808,7 @@ func (client ScheduleClient) listWorkRequestLogs(ctx context.Context, request co return response, err } -// ListWorkRequests Lists the cloud scheduler work requests in a compartment. +// ListWorkRequests This API gets a list of work requests. You must provide either a compartmentId or a workRequestId or both. You can list work requests in this compartment OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm). This is required unless a specific workRequestId is passed. // // # See also // diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/schedule.go b/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/schedule.go index ad4aeab4fea..193e109292c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/schedule.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/resourcescheduler/schedule.go @@ -88,6 +88,9 @@ type Schedule struct { // Example: `2016-08-25T21:10:29.600Z` TimeNextRun *common.SDKTime `mandatory:"false" json:"timeNextRun"` + // This is the status of the last work request. + LastRunStatus OperationStatusEnum `mandatory:"false" json:"lastRunStatus,omitempty"` + // These are system tags for this resource. Each key is predefined and scoped to a namespace. // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` @@ -112,6 +115,9 @@ func (m Schedule) ValidateEnumValue() (bool, error) { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetScheduleLifecycleStateEnumStringValues(), ","))) } + if _, ok := GetMappingOperationStatusEnum(string(m.LastRunStatus)); !ok && m.LastRunStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LastRunStatus: %s. Supported values are: %s.", m.LastRunStatus, strings.Join(GetOperationStatusEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } @@ -129,6 +135,7 @@ func (m *Schedule) UnmarshalJSON(data []byte) (e error) { TimeUpdated *common.SDKTime `json:"timeUpdated"` TimeLastRun *common.SDKTime `json:"timeLastRun"` TimeNextRun *common.SDKTime `json:"timeNextRun"` + LastRunStatus OperationStatusEnum `json:"lastRunStatus"` SystemTags map[string]map[string]interface{} `json:"systemTags"` Id *string `json:"id"` CompartmentId *string `json:"compartmentId"` @@ -173,6 +180,8 @@ func (m *Schedule) UnmarshalJSON(data []byte) (e error) { m.TimeNextRun = model.TimeNextRun + m.LastRunStatus = model.LastRunStatus + m.SystemTags = model.SystemTags m.Id = model.Id diff --git a/vendor/modules.txt b/vendor/modules.txt index 59f64c01a97..d5a733da182 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -282,7 +282,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.89.2 +# github.com/oracle/oci-go-sdk/v65 v65.89.3 ## 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/containerengine_cluster.html.markdown b/website/docs/d/containerengine_cluster.html.markdown index e9371bb64d9..19590650c94 100644 --- a/website/docs/d/containerengine_cluster.html.markdown +++ b/website/docs/d/containerengine_cluster.html.markdown @@ -18,6 +18,9 @@ Get the details of a cluster. data "oci_containerengine_cluster" "test_cluster" { #Required cluster_id = oci_containerengine_cluster.test_cluster.id + + #Optional + should_include_oidc_config_file = var.cluster_should_include_oidc_config_file } ``` @@ -26,6 +29,7 @@ data "oci_containerengine_cluster" "test_cluster" { The following arguments are supported: * `cluster_id` - (Required) The OCID of the cluster. +* `should_include_oidc_config_file` - (Optional) Boolean value to determine if the OpenIdConnectAuth configuration file should be displayed for the provided cluster. ## Attributes Reference diff --git a/website/docs/d/containerengine_node_pool.html.markdown b/website/docs/d/containerengine_node_pool.html.markdown index cb58d2b7163..41a01a4de5f 100644 --- a/website/docs/d/containerengine_node_pool.html.markdown +++ b/website/docs/d/containerengine_node_pool.html.markdown @@ -68,12 +68,14 @@ The following attributes are exported: * `size` - The number of nodes in the node pool. * `node_eviction_node_pool_settings` - Node Eviction Details configuration * `eviction_grace_duration` - Duration after which OKE will give up eviction of the pods on the node. PT0M will indicate you want to delete the node without cordon and drain. Default PT60M, Min PT0M, Max: PT60M. Format ISO 8601 e.g PT30M + * `is_force_action_after_grace_duration` - If the node action should be performed if not all the pods can be evicted in the grace period * `is_force_delete_after_grace_duration` - If the underlying compute instance should be deleted if you cannot evict all the pods in grace period * `node_image_id` - Deprecated. see `nodeSource`. The OCID of the image running on the nodes in the node pool. * `node_image_name` - Deprecated. see `nodeSource`. The name of the image running on the nodes in the node pool. * `node_metadata` - A list of key/value pairs to add to each underlying Oracle Cloud Infrastructure instance in the node pool on launch. * `node_pool_cycling_details` - Node Pool Cycling Details - * `is_node_cycling_enabled` - If nodes in the nodepool will be cycled to have new changes. + * `cycle_modes` - An ordered list of cycle modes that should be performed on the OKE nodes. + * `is_node_cycling_enabled` - If cycling operation should be performed on the nodes in the node pool. * `maximum_surge` - Maximum additional new compute instances that would be temporarily created and added to nodepool during the cycling nodepool process. OKE supports both integer and percentage input. Defaults to 1, Ranges from 0 to Nodepool size or 0% to 100% * `maximum_unavailable` - Maximum active nodes that would be terminated from nodepool during the cycling nodepool process. OKE supports both integer and percentage input. Defaults to 0, Ranges from 0 to Nodepool size or 0% to 100% * `node_shape` - The name of the node shape of the nodes in the node pool. diff --git a/website/docs/d/containerengine_node_pools.html.markdown b/website/docs/d/containerengine_node_pools.html.markdown index 7a76277e1db..e89415d9e0e 100644 --- a/website/docs/d/containerengine_node_pools.html.markdown +++ b/website/docs/d/containerengine_node_pools.html.markdown @@ -82,11 +82,13 @@ The following attributes are exported: * `size` - The number of nodes in the node pool. * `node_eviction_node_pool_settings` - Node Eviction Details configuration * `eviction_grace_duration` - Duration after which OKE will give up eviction of the pods on the node. PT0M will indicate you want to delete the node without cordon and drain. Default PT60M, Min PT0M, Max: PT60M. Format ISO 8601 e.g PT30M + * `is_force_action_after_grace_duration` - If the node action should be performed if not all the pods can be evicted in the grace period * `is_force_delete_after_grace_duration` - If the underlying compute instance should be deleted if you cannot evict all the pods in grace period * `node_image_id` - Deprecated. see `nodeSource`. The OCID of the image running on the nodes in the node pool. * `node_image_name` - Deprecated. see `nodeSource`. The name of the image running on the nodes in the node pool. * `node_pool_cycling_details` - Node Pool Cycling Details - * `is_node_cycling_enabled` - If nodes in the nodepool will be cycled to have new changes. + * `cycle_modes` - An ordered list of cycle modes that should be performed on the OKE nodes. + * `is_node_cycling_enabled` - If cycling operation should be performed on the nodes in the node pool. * `maximum_surge` - Maximum additional new compute instances that would be temporarily created and added to nodepool during the cycling nodepool process. OKE supports both integer and percentage input. Defaults to 1, Ranges from 0 to Nodepool size or 0% to 100% * `maximum_unavailable` - Maximum active nodes that would be terminated from nodepool during the cycling nodepool process. OKE supports both integer and percentage input. Defaults to 0, Ranges from 0 to Nodepool size or 0% to 100% * `node_shape` - The name of the node shape of the nodes in the node pool. diff --git a/website/docs/d/database_autonomous_database.html.markdown b/website/docs/d/database_autonomous_database.html.markdown index ee019b2de65..0ce6095e1bf 100644 --- a/website/docs/d/database_autonomous_database.html.markdown +++ b/website/docs/d/database_autonomous_database.html.markdown @@ -262,7 +262,8 @@ AL32UTF8, AR8ADOS710, AR8ADOS720, AR8APTEC715, AR8ARABICMACS, AR8ASMO8X, AR8ISO8 * `resource_pool_summary` - The configuration details for resource pool * `is_disabled` - Indicates if the resource pool should be deleted for the Autonomous Database. * `pool_size` - Resource pool size. -* `role` - The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. +* `role` - The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. +* `enable_delete_scheduled_operations` - If omitted or set to false the provider will not delete scheduled_operations from the Autonomous Database. If set to true, provider will delete scheduled_operations from the Autonomous Database. * `scheduled_operations` - The list of scheduled operations. Consists of values such as dayOfWeek, scheduledStartTime, scheduledStopTime. This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. diff --git a/website/docs/d/database_autonomous_databases.html.markdown b/website/docs/d/database_autonomous_databases.html.markdown index e7f4bd8c5dc..c7838c9cc7b 100644 --- a/website/docs/d/database_autonomous_databases.html.markdown +++ b/website/docs/d/database_autonomous_databases.html.markdown @@ -293,6 +293,7 @@ AL32UTF8, AR8ADOS710, AR8ADOS720, AR8APTEC715, AR8ARABICMACS, AR8ASMO8X, AR8ISO8 * `is_disabled` - Indicates if the resource pool should be deleted for the Autonomous Database. * `pool_size` - Resource pool size. * `role` - The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. +* `enable_delete_scheduled_operations` - If omitted or set to false the provider will not delete scheduled_operations from the Autonomous Database. If set to true, provider will delete scheduled_operations from the Autonomous Database. * `scheduled_operations` - The list of scheduled operations. Consists of values such as dayOfWeek, scheduledStartTime, scheduledStopTime. This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. diff --git a/website/docs/d/database_autonomous_databases_clones.html.markdown b/website/docs/d/database_autonomous_databases_clones.html.markdown index 7decada13bb..d67df99fe5a 100644 --- a/website/docs/d/database_autonomous_databases_clones.html.markdown +++ b/website/docs/d/database_autonomous_databases_clones.html.markdown @@ -282,6 +282,7 @@ AL32UTF8, AR8ADOS710, AR8ADOS720, AR8APTEC715, AR8ARABICMACS, AR8ASMO8X, AR8ISO8 * `is_disabled` - Indicates if the resource pool should be deleted for the Autonomous Database. * `pool_size` - Resource pool size. * `role` - The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. +* `enable_delete_scheduled_operations` - If omitted or set to false the provider will not delete scheduled_operations from the Autonomous Database. If set to true, provider will delete scheduled_operations from the Autonomous Database. * `scheduled_operations` - The list of scheduled operations. Consists of values such as dayOfWeek, scheduledStartTime, scheduledStopTime. This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. diff --git a/website/docs/d/disaster_recovery_dr_plan.html.markdown b/website/docs/d/disaster_recovery_dr_plan.html.markdown index 929dfad257b..6b7dd8d337e 100644 --- a/website/docs/d/disaster_recovery_dr_plan.html.markdown +++ b/website/docs/d/disaster_recovery_dr_plan.html.markdown @@ -57,6 +57,7 @@ The following attributes are exported: * `refresh_status` - The DR plan step refresh status. Example: `STEP_ADDED` * `timeout` - The timeout in seconds for executing this step. Example: `600` * `type` - The plan step type. + * `type_display_name` - The display name of the DR Plan step type. Example: `Database Switchover` * `user_defined_step` - The details for a user-defined step in a DR plan. * `function_id` - The OCID of function to be invoked. Example: `ocid1.fnfunc.oc1..uniqueID` * `function_region` - The region in which the function is deployed. Example: `us-ashburn-1` @@ -77,17 +78,23 @@ The following attributes are exported: * `script_command` - The script name and arguments. Example: `/usr/bin/python3 /home/opc/scripts/my_app_script.py arg1 arg2 arg3` * `step_type` - The type of the user-defined step. - **RUN_OBJECTSTORE_SCRIPT_PRECHECK** - A step which performs a precheck on a script stored in Oracle Cloud Infrastructure object storage. + **RUN_OBJECTSTORE_SCRIPT_PRECHECK** - A built-in step which performs a precheck on a script stored in Oracle Cloud Infrastructure object storage. This step cannot be added, deleted, or customized by the user. - **RUN_LOCAL_SCRIPT_PRECHECK** - A step which performs a precheck on a script which resides locally on a compute instance. + **RUN_LOCAL_SCRIPT_PRECHECK** - A built-in step which performs a precheck on a script which resides locally on a compute instance. This step cannot be added, deleted, or customized by the user. - **INVOKE_FUNCTION_PRECHECK** - A step which performs a precheck on an Oracle Cloud Infrastructure function. See https://docs.oracle.com/en-us/iaas/Content/Functions/home.htm. + **INVOKE_FUNCTION_PRECHECK** - A built-in step which performs a precheck on an Oracle Cloud Infrastructure function. This step cannot be added, deleted, or customized by the user. See https://docs.oracle.com/en-us/iaas/Content/Functions/home.htm. **RUN_OBJECTSTORE_SCRIPT** - A step which runs a script stored in Oracle Cloud Infrastructure object storage. **RUN_LOCAL_SCRIPT** - A step which runs a script that resides locally on a compute instance. - **INVOKE_FUNCTION** - A step which invokes an Oracle Cloud Infrastructure function. See https://docs.oracle.com/en-us/iaas/Content/Functions/home.htm. + **INVOKE_FUNCTION** - A step which invokes an Oracle Cloud Infrastructure function. See https://docs.oracle.com/en-us/iaas/Content/Functions/home.htm. + + **RUN_OBJECTSTORE_SCRIPT_USER_DEFINED_CUSTOM_PRECHECK** - A user-defined step which performs a precheck by executing a user-provided script stored in Oracle Cloud Infrastructure object storage. + + **RUN_LOCAL_SCRIPT_USER_DEFINED_CUSTOM_PRECHECK** - A user-defined step which performs a precheck by executing a user-provided script which resides locally on a compute instance. + + **INVOKE_FUNCTION_USER_DEFINED_CUSTOM_PRECHECK** - A user-defined step which performs a precheck by executing a user-provided Oracle Cloud Infrastructure function. See https://docs.oracle.com/en-us/iaas/Content/Functions/home.htm. * `type` - The group type. Example: `BUILT_IN` * `source_plan_id` - If this is a cloned DR plan, the OCID of the source DR plan that was used to clone this DR plan. If this DR plan was not cloned, then the value for this will be `null`. Example: `ocid1.drplan.oc1..uniqueID` * `state` - The current state of the DR plan. diff --git a/website/docs/d/disaster_recovery_dr_plan_execution.html.markdown b/website/docs/d/disaster_recovery_dr_plan_execution.html.markdown index 72d7d61d7ed..dc980ffbac2 100644 --- a/website/docs/d/disaster_recovery_dr_plan_execution.html.markdown +++ b/website/docs/d/disaster_recovery_dr_plan_execution.html.markdown @@ -62,6 +62,7 @@ The following attributes are exported: * `time_ended` - The time when execution ended. An RFC3339 formatted datetime string. Example: `2019-03-29T09:36:42Z` * `time_started` - The time when step execution began. An RFC3339 formatted datetime string. Example: `2019-03-29T09:36:42Z` * `type` - The step type. + * `type_display_name` - The display name of the DR Plan step type. Example: `Database Switchover` * `time_ended` - The time when group execution ended. An RFC3339 formatted datetime string. Example: `2019-03-29T09:36:42Z` * `time_started` - The time when group execution began. An RFC3339 formatted datetime string. Example: `2019-03-29T09:36:42Z` * `type` - The group type. Example: `BUILT_IN` diff --git a/website/docs/d/disaster_recovery_dr_plan_executions.html.markdown b/website/docs/d/disaster_recovery_dr_plan_executions.html.markdown index acd29b4c174..82b2cd0949c 100644 --- a/website/docs/d/disaster_recovery_dr_plan_executions.html.markdown +++ b/website/docs/d/disaster_recovery_dr_plan_executions.html.markdown @@ -76,6 +76,7 @@ The following attributes are exported: * `time_ended` - The time when execution ended. An RFC3339 formatted datetime string. Example: `2019-03-29T09:36:42Z` * `time_started` - The time when step execution began. An RFC3339 formatted datetime string. Example: `2019-03-29T09:36:42Z` * `type` - The step type. + * `type_display_name` - The display name of the DR Plan step type. Example: `Database Switchover` * `time_ended` - The time when group execution ended. An RFC3339 formatted datetime string. Example: `2019-03-29T09:36:42Z` * `time_started` - The time when group execution began. An RFC3339 formatted datetime string. Example: `2019-03-29T09:36:42Z` * `type` - The group type. Example: `BUILT_IN` diff --git a/website/docs/d/disaster_recovery_dr_plans.html.markdown b/website/docs/d/disaster_recovery_dr_plans.html.markdown index fa8b3a8e33c..f25426320d3 100644 --- a/website/docs/d/disaster_recovery_dr_plans.html.markdown +++ b/website/docs/d/disaster_recovery_dr_plans.html.markdown @@ -75,6 +75,7 @@ The following attributes are exported: * `refresh_status` - The DR plan step refresh status. Example: `STEP_ADDED` * `timeout` - The timeout in seconds for executing this step. Example: `600` * `type` - The plan step type. + * `type_display_name` - The display name of the DR Plan step type. Example: `Database Switchover` * `user_defined_step` - The details for a user-defined step in a DR plan. * `function_id` - The OCID of function to be invoked. Example: `ocid1.fnfunc.oc1..uniqueID` * `function_region` - The region in which the function is deployed. Example: `us-ashburn-1` @@ -95,17 +96,23 @@ The following attributes are exported: * `script_command` - The script name and arguments. Example: `/usr/bin/python3 /home/opc/scripts/my_app_script.py arg1 arg2 arg3` * `step_type` - The type of the user-defined step. - **RUN_OBJECTSTORE_SCRIPT_PRECHECK** - A step which performs a precheck on a script stored in Oracle Cloud Infrastructure object storage. + **RUN_OBJECTSTORE_SCRIPT_PRECHECK** - A built-in step which performs a precheck on a script stored in Oracle Cloud Infrastructure object storage. This step cannot be added, deleted, or customized by the user. - **RUN_LOCAL_SCRIPT_PRECHECK** - A step which performs a precheck on a script which resides locally on a compute instance. + **RUN_LOCAL_SCRIPT_PRECHECK** - A built-in step which performs a precheck on a script which resides locally on a compute instance. This step cannot be added, deleted, or customized by the user. - **INVOKE_FUNCTION_PRECHECK** - A step which performs a precheck on an Oracle Cloud Infrastructure function. See https://docs.oracle.com/en-us/iaas/Content/Functions/home.htm. + **INVOKE_FUNCTION_PRECHECK** - A built-in step which performs a precheck on an Oracle Cloud Infrastructure function. This step cannot be added, deleted, or customized by the user. See https://docs.oracle.com/en-us/iaas/Content/Functions/home.htm. **RUN_OBJECTSTORE_SCRIPT** - A step which runs a script stored in Oracle Cloud Infrastructure object storage. **RUN_LOCAL_SCRIPT** - A step which runs a script that resides locally on a compute instance. - **INVOKE_FUNCTION** - A step which invokes an Oracle Cloud Infrastructure function. See https://docs.oracle.com/en-us/iaas/Content/Functions/home.htm. + **INVOKE_FUNCTION** - A step which invokes an Oracle Cloud Infrastructure function. See https://docs.oracle.com/en-us/iaas/Content/Functions/home.htm. + + **RUN_OBJECTSTORE_SCRIPT_USER_DEFINED_CUSTOM_PRECHECK** - A user-defined step which performs a precheck by executing a user-provided script stored in Oracle Cloud Infrastructure object storage. + + **RUN_LOCAL_SCRIPT_USER_DEFINED_CUSTOM_PRECHECK** - A user-defined step which performs a precheck by executing a user-provided script which resides locally on a compute instance. + + **INVOKE_FUNCTION_USER_DEFINED_CUSTOM_PRECHECK** - A user-defined step which performs a precheck by executing a user-provided Oracle Cloud Infrastructure function. See https://docs.oracle.com/en-us/iaas/Content/Functions/home.htm. * `type` - The group type. Example: `BUILT_IN` * `source_plan_id` - If this is a cloned DR plan, the OCID of the source DR plan that was used to clone this DR plan. If this DR plan was not cloned, then the value for this will be `null`. Example: `ocid1.drplan.oc1..uniqueID` * `state` - The current state of the DR plan. diff --git a/website/docs/d/disaster_recovery_dr_protection_group.html.markdown b/website/docs/d/disaster_recovery_dr_protection_group.html.markdown index 056f5d5381a..38f36fb4da6 100644 --- a/website/docs/d/disaster_recovery_dr_protection_group.html.markdown +++ b/website/docs/d/disaster_recovery_dr_protection_group.html.markdown @@ -59,20 +59,42 @@ The following attributes are exported: * `bucket` - The bucket name inside the object storage namespace. Example: `operation_logs` * `namespace` - The namespace in object storage backup location(Note - this is usually the tenancy name). Example: `myocitenancy` * `object` - The object name inside the object storage bucket. Example: `switchover_plan_executions` - * `block_volume_operations` - Operations performed on a list of block volumes used on the non-movable compute instance. - * `attachment_details` - The details for attaching or detaching a block volume. - * `volume_attachment_reference_instance_id` - The OCID of the reference compute instance from which to obtain the attachment details for the volume. This reference compute instance is from the peer DR protection group. Example: `ocid1.instance.oc1..uniqueID` + * `block_volume_attach_and_mount_operations` - The details of the block volume operations performed on the non-movable compute instance. + * `attachments` - A list of details of attach or detach operations performed on block volumes. + * `block_volume_id` - The OCID of the block volume. Example: `ocid1.volume.oc1..uniqueID` + * `volume_attachment_reference_instance_id` - The OCID of the reference compute instance needed to obtain the volume attachment details. This reference compute instance belongs to the peer DR protection group. Example: `ocid1.instance.oc1..uniqueID` + * `mounts` - A list of details of mount operations performed on block volumes. + * `mount_point` - The physical mount point where the file system is mounted on the block volume. Example: `/mnt/yourmountpoint` + * `block_volume_operations` - Deprecated. Use the 'blockVolumeAttachAndMountOperations' attribute instead of this. Operations performed on a list of block volumes used on the non-movable compute instance. + * `attachment_details` - Deprecated. Use the 'ComputeInstanceNonMovableBlockVolumeAttachOperationDetails' definition instead of this. The details for attaching or detaching a block volume. + * `volume_attachment_reference_instance_id` - The OCID of the reference compute instance needed to obtain the volume attachment details. This reference compute instance belongs to the peer DR protection group. Example: `ocid1.instance.oc1..uniqueID` * `block_volume_id` - The OCID of the block volume. Example: `ocid1.volume.oc1..uniqueID` - * `mount_details` - The details for mounting or unmounting the file system on a block volume. + * `mount_details` - Deprecated. Use the 'ComputeInstanceNonMovableBlockVolumeMountOperationDetails' definition instead of this. The details for mounting or unmounting the file system on a block volume. * `mount_point` - The physical mount point used for mounting and unmounting the file system on a block volume. Example: `/mnt/yourmountpoint` * `bucket` - The bucket name inside the object storage namespace. Example: `bucket_name` + * `common_destination_key` - The OCID of a vault and customer-managed encryption key in the destination region. + + The customer-managed encryption key in this will be used to encrypt all the volumes of the volume group after they move to the destination region. If you specify this common vault and encryption key, you cannot specify vaults and encryption keys individually for each volume using 'sourceVolumeToDestinationEncryptionKeyMappings'. + + The customer-managed encryption key in this will be used to encrypt the file system when it move to the destination region. + * `encryption_key_id` - The OCID of the customer-managed encryption key in the destination region vault. Example: `ocid1.key.oc1..uniqueID` + * `vault_id` - The OCID of the destination region vault for the customer-managed encryption key. Example: `ocid1.vault.oc1..uniqueID` * `connection_string_type` - The type of connection strings used to connect to an Autonomous Container Database snapshot standby created during a DR Drill operation. See https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbcl/index.html for information about these service types. * `destination_availability_domain` - The availability domain of the destination mount target. Example: `BBTh:region-AD` + * `destination_backup_policy_id` - The OCID of the backup policy to use in the destination region. This policy will be used to create backups for this volume group after it moves the destination region. Example: `ocid1.volumebackuppolicy.oc1..uniqueID` * `destination_capacity_reservation_id` - The OCID of a capacity reservation in the destination region which will be used to launch the compute instance. Example: `ocid1.capacityreservation.oc1..uniqueID` * `destination_compartment_id` - The OCID of a compartment in the destination region in which the compute instance should be launched. Example: `ocid1.compartment.oc1..uniqueID` * `destination_dedicated_vm_host_id` - The OCID of a dedicated VM host in the destination region where the compute instance should be launched. Example: `ocid1.dedicatedvmhost.oc1..uniqueID` + * `destination_encryption_key` - The OCID of a vault and customer-managed encryption key in the destination region. + + The customer-managed encryption key in this will be used to encrypt all the volumes of the volume group after they move to the destination region. If you specify this common vault and encryption key, you cannot specify vaults and encryption keys individually for each volume using 'sourceVolumeToDestinationEncryptionKeyMappings'. + + The customer-managed encryption key in this will be used to encrypt the file system when it move to the destination region. + * `encryption_key_id` - The OCID of the customer-managed encryption key in the destination region vault. Example: `ocid1.key.oc1..uniqueID` + * `vault_id` - The OCID of the destination region vault for the customer-managed encryption key. Example: `ocid1.vault.oc1..uniqueID` * `destination_load_balancer_id` - The OCID of the destination load balancer. The backend sets in this destination load balancer are updated during DR. Example: `ocid1.loadbalancer.oc1..uniqueID` * `destination_network_load_balancer_id` - The OCID of the destination network load balancer. The backend sets in this destination network load balancer are updated during DR. Example: `ocid1.networkloadbalancer.oc1..uniqueID` + * `destination_snapshot_policy_id` - The OCID of the snapshot policy to use in the destination region. This policy will be attached to the file system after it moves to the destination region. Example: `ocid1.filesystemsnapshotpolicy.oc1..uniqueID` * `export_mappings` - A list of mappings between the primary region file system export and destination region mount target. * `destination_mount_target_id` - The OCID of the destination mount target on which this file system export should be created. Example: `ocid1.mounttarget.oc1..uniqueID` * `export_id` - The OCID of the export path. Example: `ocid1.export.oc1..uniqueID` @@ -103,6 +125,19 @@ The following attributes are exported: * `source_network_load_balancer_id` - The OCID of the source Network Load Balancer. Example: `ocid1.networkloadbalancer.oc1..uniqueID` * `password_vault_secret_id` - The OCID of the vault secret where the database SYSDBA password is stored. This password is required and used for performing database DR Drill operations when using full clone. Example: `ocid1.vaultsecret.oc1..uniqueID` * `peer_cluster_id` - The OCID of the peer OKE cluster. This property applies to the OKE cluster member in both the primary and standby region. Example: `ocid1.cluster.oc1.uniqueID` + * `source_volume_to_destination_encryption_key_mappings` - A list of mappings between source volume IDs in the volume group and customer-managed encryption keys in the destination region which will be used to encrypt the volume after it moves to the destination region. + + If you add the entry for source volumes and its corresponding vault and encryption keys here, you can not use 'commonDestinationKey' for encrypting all volumes with common encryption key. Similarly, if you specify common vault and encryption key using 'commonDestinationKey', you cannot specify vaults and encryption keys individually for each volume using 'sourceVolumeToDestinationEncryptionKeyMappings'. + + An entry for each volume in volume group should be added in this list. The encryption key will not be updated for the volumes that are part of volume group but missing in this list. + * `destination_encryption_key` - The OCID of a vault and customer-managed encryption key in the destination region. + + The customer-managed encryption key in this will be used to encrypt all the volumes of the volume group after they move to the destination region. If you specify this common vault and encryption key, you cannot specify vaults and encryption keys individually for each volume using 'sourceVolumeToDestinationEncryptionKeyMappings'. + + The customer-managed encryption key in this will be used to encrypt the file system when it move to the destination region. + * `encryption_key_id` - The OCID of the customer-managed encryption key in the destination region vault. Example: `ocid1.key.oc1..uniqueID` + * `vault_id` - The OCID of the destination region vault for the customer-managed encryption key. Example: `ocid1.vault.oc1..uniqueID` + * `source_volume_id` - The OCID of the source boot volume or block volume. Example: `ocid1.volume.oc1..uniqueID` * `vault_mappings` - The list of source-to-destination vault mappings required for DR operations. This property applies to the OKE cluster member in primary region. * `destination_vault_id` - The OCID of the destination Vault. Example: `ocid1.vault.oc1..uniqueID` * `source_vault_id` - The OCID of the source Vault. Example: `ocid1.vault.oc1..uniqueID` @@ -118,6 +153,7 @@ The following attributes are exported: * `destination_nsg_id_list` - A list of OCIDs of network security groups (NSG) in the destination region which should be assigned to the source VNIC. Example: `[ ocid1.networksecuritygroup.oc1..uniqueID, ocid1.networksecuritygroup.oc1..uniqueID ]` * `destination_primary_private_ip_address` - The private IP address to be assigned as the VNIC's primary IP address in the destination subnet. This must be a valid IP address in the destination subnet and the IP address must be available. Example: `10.0.3.3` * `destination_primary_private_ip_hostname_label` - The hostname label to be assigned in the destination subnet for the primary private IP of the source VNIC. This label is the hostname portion of the private IP's fully qualified domain name (FQDN) (for example, 'myhost1' in the FQDN 'myhost1.subnet123.vcn1.oraclevcn.com'). Example: `myhost1` + * `destination_reserved_public_ip_id` - The OCID of the reserved public IP address to be assigned to the compute instance in the destination region. Example: `ocid1.publicip.oc1..uniqueID` * `destination_subnet_id` - The OCID of the destination subnet to which the source VNIC should connect. Example: `ocid1.subnet.oc1..uniqueID` * `source_vnic_id` - The OCID of the source VNIC. Example: `ocid1.vnic.oc1..uniqueID` * `peer_id` - The OCID of the peer DR protection group. Example: `ocid1.drprotectiongroup.oc1..uniqueID` diff --git a/website/docs/d/disaster_recovery_dr_protection_groups.html.markdown b/website/docs/d/disaster_recovery_dr_protection_groups.html.markdown index 434ad74fdf5..d5e40586388 100644 --- a/website/docs/d/disaster_recovery_dr_protection_groups.html.markdown +++ b/website/docs/d/disaster_recovery_dr_protection_groups.html.markdown @@ -77,20 +77,35 @@ The following attributes are exported: * `bucket` - The bucket name inside the object storage namespace. Example: `operation_logs` * `namespace` - The namespace in object storage backup location(Note - this is usually the tenancy name). Example: `myocitenancy` * `object` - The object name inside the object storage bucket. Example: `switchover_plan_executions` - * `block_volume_operations` - Operations performed on a list of block volumes used on the non-movable compute instance. - * `attachment_details` - The details for attaching or detaching a block volume. - * `volume_attachment_reference_instance_id` - The OCID of the reference compute instance from which to obtain the attachment details for the volume. This reference compute instance is from the peer DR protection group. Example: `ocid1.instance.oc1..uniqueID` + * `block_volume_attach_and_mount_operations` - The details of the block volume operations performed on the non-movable compute instance. + * `attachments` - A list of details of attach or detach operations performed on block volumes. + * `block_volume_id` - The OCID of the block volume. Example: `ocid1.volume.oc1..uniqueID` + * `volume_attachment_reference_instance_id` - The OCID of the reference compute instance needed to obtain the volume attachment details. This reference compute instance belongs to the peer DR protection group. Example: `ocid1.instance.oc1..uniqueID` + * `mounts` - A list of details of mount operations performed on block volumes. + * `mount_point` - The physical mount point where the file system is mounted on the block volume. Example: `/mnt/yourmountpoint` + * `block_volume_operations` - Deprecated. Use the 'blockVolumeAttachAndMountOperations' attribute instead of this. Operations performed on a list of block volumes used on the non-movable compute instance. + * `attachment_details` - Deprecated. Use the 'ComputeInstanceNonMovableBlockVolumeAttachOperationDetails' definition instead of this. The details for attaching or detaching a block volume. + * `volume_attachment_reference_instance_id` - The OCID of the reference compute instance needed to obtain the volume attachment details. This reference compute instance belongs to the peer DR protection group. Example: `ocid1.instance.oc1..uniqueID` * `block_volume_id` - The OCID of the block volume. Example: `ocid1.volume.oc1..uniqueID` - * `mount_details` - The details for mounting or unmounting the file system on a block volume. + * `mount_details` - Deprecated. Use the 'ComputeInstanceNonMovableBlockVolumeMountOperationDetails' definition instead of this. The details for mounting or unmounting the file system on a block volume. * `mount_point` - The physical mount point used for mounting and unmounting the file system on a block volume. Example: `/mnt/yourmountpoint` * `connection_string_type` - The type of connection strings used to connect to an Autonomous Container Database snapshot standby created during a DR Drill operation. See https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbcl/index.html for information about these service types. * `bucket` - The bucket name inside the object storage namespace. Example: `bucket_name` * `destination_availability_domain` - The availability domain of the destination mount target. Example: `BBTh:region-AD` + * `destination_backup_policy_id` - The OCID of the backup policy to use in the destination region. This policy will be used to create backups for this volume group after it moves the destination region. Example: `ocid1.volumebackuppolicy.oc1..uniqueID` * `destination_capacity_reservation_id` - The OCID of a capacity reservation in the destination region which will be used to launch the compute instance. Example: `ocid1.capacityreservation.oc1..uniqueID` * `destination_compartment_id` - The OCID of a compartment in the destination region in which the compute instance should be launched. Example: `ocid1.compartment.oc1..uniqueID` * `destination_dedicated_vm_host_id` - The OCID of a dedicated VM host in the destination region where the compute instance should be launched. Example: `ocid1.dedicatedvmhost.oc1..uniqueID` + * `destination_encryption_key` - The OCID of a vault and customer-managed encryption key in the destination region. + + The customer-managed encryption key in this will be used to encrypt all the volumes of the volume group after they move to the destination region. If you specify this common vault and encryption key, you cannot specify vaults and encryption keys individually for each volume using 'sourceVolumeToDestinationEncryptionKeyMappings'. + + The customer-managed encryption key in this will be used to encrypt the file system when it move to the destination region. + * `encryption_key_id` - The OCID of the customer-managed encryption key in the destination region vault. Example: `ocid1.key.oc1..uniqueID` + * `vault_id` - The OCID of the destination region vault for the customer-managed encryption key. Example: `ocid1.vault.oc1..uniqueID` * `destination_load_balancer_id` - The OCID of the destination load balancer. The backend sets in this destination load balancer are updated during DR. Example: `ocid1.loadbalancer.oc1..uniqueID` * `destination_network_load_balancer_id` - The OCID of the destination network load balancer. The backend sets in this destination network load balancer are updated during DR. Example: `ocid1.networkloadbalancer.oc1..uniqueID` + * `destination_snapshot_policy_id` - The OCID of the snapshot policy to use in the destination region. This policy will be attached to the file system after it moves to the destination region. Example: `ocid1.filesystemsnapshotpolicy.oc1..uniqueID` * `export_mappings` - A list of mappings between the primary region file system export and destination region mount target. * `destination_mount_target_id` - The OCID of the destination mount target on which this file system export should be created. Example: `ocid1.mounttarget.oc1..uniqueID` * `export_id` - The OCID of the export path. Example: `ocid1.export.oc1..uniqueID` @@ -121,6 +136,19 @@ The following attributes are exported: * `source_network_load_balancer_id` - The OCID of the source Network Load Balancer. Example: `ocid1.networkloadbalancer.oc1..uniqueID` * `password_vault_secret_id` - The OCID of the vault secret where the database SYSDBA password is stored. This password is required and used for performing database DR Drill operations when using full clone. Example: `ocid1.vaultsecret.oc1..uniqueID` * `peer_cluster_id` - The OCID of the peer OKE cluster. This property applies to the OKE cluster member in both the primary and standby region. Example: `ocid1.cluster.oc1.uniqueID` + * `source_volume_to_destination_encryption_key_mappings` - A list of mappings between source volume IDs in the volume group and customer-managed encryption keys in the destination region which will be used to encrypt the volume after it moves to the destination region. + + If you add the entry for source volumes and its corresponding vault and encryption keys here, you can not use 'commonDestinationKey' for encrypting all volumes with common encryption key. Similarly, if you specify common vault and encryption key using 'commonDestinationKey', you cannot specify vaults and encryption keys individually for each volume using 'sourceVolumeToDestinationEncryptionKeyMappings'. + + An entry for each volume in volume group should be added in this list. The encryption key will not be updated for the volumes that are part of volume group but missing in this list. + * `destination_encryption_key` - The OCID of a vault and customer-managed encryption key in the destination region. + + The customer-managed encryption key in this will be used to encrypt all the volumes of the volume group after they move to the destination region. If you specify this common vault and encryption key, you cannot specify vaults and encryption keys individually for each volume using 'sourceVolumeToDestinationEncryptionKeyMappings'. + + The customer-managed encryption key in this will be used to encrypt the file system when it move to the destination region. + * `encryption_key_id` - The OCID of the customer-managed encryption key in the destination region vault. Example: `ocid1.key.oc1..uniqueID` + * `vault_id` - The OCID of the destination region vault for the customer-managed encryption key. Example: `ocid1.vault.oc1..uniqueID` + * `source_volume_id` - The OCID of the source boot volume or block volume. Example: `ocid1.volume.oc1..uniqueID` * `vault_mappings` - The list of source-to-destination vault mappings required for DR operations. This property applies to the OKE cluster member in primary region. * `destination_vault_id` - The OCID of the destination Vault. Example: `ocid1.vault.oc1..uniqueID` * `source_vault_id` - The OCID of the source Vault. Example: `ocid1.vault.oc1..uniqueID` @@ -136,6 +164,7 @@ The following attributes are exported: * `destination_nsg_id_list` - A list of OCIDs of network security groups (NSG) in the destination region which should be assigned to the source VNIC. Example: `[ ocid1.networksecuritygroup.oc1..uniqueID, ocid1.networksecuritygroup.oc1..uniqueID ]` * `destination_primary_private_ip_address` - The private IP address to be assigned as the VNIC's primary IP address in the destination subnet. This must be a valid IP address in the destination subnet and the IP address must be available. Example: `10.0.3.3` * `destination_primary_private_ip_hostname_label` - The hostname label to be assigned in the destination subnet for the primary private IP of the source VNIC. This label is the hostname portion of the private IP's fully qualified domain name (FQDN) (for example, 'myhost1' in the FQDN 'myhost1.subnet123.vcn1.oraclevcn.com'). Example: `myhost1` + * `destination_reserved_public_ip_id` - The OCID of the reserved public IP address to be assigned to the compute instance in the destination region. Example: `ocid1.publicip.oc1..uniqueID` * `destination_subnet_id` - The OCID of the destination subnet to which the source VNIC should connect. Example: `ocid1.subnet.oc1..uniqueID` * `source_vnic_id` - The OCID of the source VNIC. Example: `ocid1.vnic.oc1..uniqueID` * `peer_id` - The OCID of the peer DR protection group. Example: `ocid1.drprotectiongroup.oc1..uniqueID` diff --git a/website/docs/d/resource_scheduler_schedule.html.markdown b/website/docs/d/resource_scheduler_schedule.html.markdown index a1e89ef81bf..b72e21974ac 100644 --- a/website/docs/d/resource_scheduler_schedule.html.markdown +++ b/website/docs/d/resource_scheduler_schedule.html.markdown @@ -39,6 +39,7 @@ The following attributes are exported: * `display_name` - This is a user-friendly name for the schedule. It does not have to be unique, and it's changeable. * `freeform_tags` - These are free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` * `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the schedule +* `last_run_status` - This is the status of the last work request. * `recurrence_details` - This is the frequency of recurrence of a schedule. The frequency field can either conform to RFC-5545 formatting or UNIX cron formatting for recurrences, based on the value specified by the recurrenceType field. * `recurrence_type` - Type of recurrence of a schedule * `resource_filters` - This is a list of resources filters. The schedule will be applied to resources matching all of them. @@ -54,6 +55,11 @@ The following attributes are exported: * `metadata` - This is additional information that helps to identity the resource for the schedule. { "id": "" "metadata": { "namespaceName": "sampleNamespace", "bucketName": "sampleBucket" } } + * `parameters` - This is the user input parameters to use when acting on the resource. + + { "parameters": [ { "parameterType": "BODY", "value": { "ip": "192.168.44.44", "memory": "1024", "synced_folders": [ { "host_path": "data/", "guest_path": "/var/www", "type": "default" } ], "forwarded_ports": [] } }, { "parameterType": "PATH", "value": { "compartmentId": "ocid1.compartment.oc1..xxxxx", "instanceId": "ocid1.vcn.oc1..yyyy" } }, { "parameterType": "QUERY", "value": { "limit": "10", "tenantId": "ocid1.tenant.oc1..zzzz" } }, { "parameterType": "HEADER", "value": { "token": "xxxx" } } ] } + * `parameter_type` - This is the parameter type on which the input parameter is defined + * `value` - This is the HTTP request header value. * `state` - This is the current state of a schedule. * `system_tags` - These are system tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"orcl-cloud.free-tier-retained": "true"}` * `time_created` - This is the date and time the schedule was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). Example: `2016-08-25T21:10:29.600Z` diff --git a/website/docs/d/resource_scheduler_schedules.html.markdown b/website/docs/d/resource_scheduler_schedules.html.markdown index 5962a82a25c..3f609705245 100644 --- a/website/docs/d/resource_scheduler_schedules.html.markdown +++ b/website/docs/d/resource_scheduler_schedules.html.markdown @@ -10,7 +10,7 @@ description: |- # Data Source: oci_resource_scheduler_schedules This data source provides the list of Schedules in Oracle Cloud Infrastructure Resource Scheduler service. -This API gets a list of schedules +This API gets a list of schedules. You must provide either a compartmentId or a scheduleId or both. You can list resources in this compartment [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). This is required unless a specific schedule ID is passed. ## Example Usage @@ -20,9 +20,8 @@ data "oci_resource_scheduler_schedules" "test_schedules" { #Optional compartment_id = var.compartment_id - schedule_id = oci_resource_scheduler_schedule.test_schedule.id display_name = var.schedule_display_name - state = var.schedule_state + resource_id = oci_cloud_guard_resource.test_resource.id } ``` @@ -33,6 +32,7 @@ The following arguments are supported: * `compartment_id` - (Optional) This is the [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which to list resources. You need to at least provide either `compartment_id` or `schedule_id` or both. * `schedule_id` - (Optional) This is the [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the schedule. You need to at least provide either `compartment_id` or `schedule_id` or both. * `display_name` - (Optional) This is a filter to return only resources that match the given display name exactly. +* `resource_id` - (Optional) This is the [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the resource affected by the work request. * `state` - (Optional) This is a filter to return only resources that match the given lifecycle state. The state value is case-insensitive. @@ -53,6 +53,7 @@ The following attributes are exported: * `display_name` - This is a user-friendly name for the schedule. It does not have to be unique, and it's changeable. * `freeform_tags` - These are free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` * `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the schedule +* `last_run_status` - This is the status of the last work request. * `recurrence_details` - This is the frequency of recurrence of a schedule. The frequency field can either conform to RFC-5545 formatting or UNIX cron formatting for recurrences, based on the value specified by the recurrenceType field. * `recurrence_type` - Type of recurrence of a schedule * `resource_filters` - This is a list of resources filters. The schedule will be applied to resources matching all of them. @@ -68,6 +69,11 @@ The following attributes are exported: * `metadata` - This is additional information that helps to identity the resource for the schedule. { "id": "" "metadata": { "namespaceName": "sampleNamespace", "bucketName": "sampleBucket" } } + * `parameters` - This is the user input parameters to use when acting on the resource. + + { "parameters": [ { "parameterType": "BODY", "value": { "ip": "192.168.44.44", "memory": "1024", "synced_folders": [ { "host_path": "data/", "guest_path": "/var/www", "type": "default" } ], "forwarded_ports": [] } }, { "parameterType": "PATH", "value": { "compartmentId": "ocid1.compartment.oc1..xxxxx", "instanceId": "ocid1.vcn.oc1..yyyy" } }, { "parameterType": "QUERY", "value": { "limit": "10", "tenantId": "ocid1.tenant.oc1..zzzz" } }, { "parameterType": "HEADER", "value": { "token": "xxxx" } } ] } + * `parameter_type` - This is the parameter type on which the input parameter is defined + * `value` - This is the HTTP request header value. * `state` - This is the current state of a schedule. * `system_tags` - These are system tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"orcl-cloud.free-tier-retained": "true"}` * `time_created` - This is the date and time the schedule was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). Example: `2016-08-25T21:10:29.600Z` diff --git a/website/docs/r/containerengine_node_pool.html.markdown b/website/docs/r/containerengine_node_pool.html.markdown index 4d079b527ff..2d45dc5aa68 100644 --- a/website/docs/r/containerengine_node_pool.html.markdown +++ b/website/docs/r/containerengine_node_pool.html.markdown @@ -75,6 +75,7 @@ resource "oci_containerengine_node_pool" "test_node_pool" { #Optional eviction_grace_duration = var.node_pool_node_eviction_node_pool_settings_eviction_grace_duration + is_force_action_after_grace_duration = var.node_pool_node_eviction_node_pool_settings_is_force_action_after_grace_duration is_force_delete_after_grace_duration = var.node_pool_node_eviction_node_pool_settings_is_force_delete_after_grace_duration } node_image_name = oci_core_image.test_image.name @@ -82,6 +83,7 @@ resource "oci_containerengine_node_pool" "test_node_pool" { node_pool_cycling_details { #Optional + cycle_modes = var.node_pool_node_pool_cycling_details_cycle_modes is_node_cycling_enabled = var.node_pool_node_pool_cycling_details_is_node_cycling_enabled maximum_surge = var.node_pool_node_pool_cycling_details_maximum_surge maximum_unavailable = var.node_pool_node_pool_cycling_details_maximum_unavailable @@ -144,11 +146,13 @@ The following arguments are supported: * `size` - (Required) (Updatable) The number of nodes that should be in the node pool. * `node_eviction_node_pool_settings` - (Optional) (Updatable) Node Eviction Details configuration * `eviction_grace_duration` - (Optional) (Updatable) Duration after which OKE will give up eviction of the pods on the node. PT0M will indicate you want to delete the node without cordon and drain. Default PT60M, Min PT0M, Max: PT60M. Format ISO 8601 e.g PT30M + * `is_force_action_after_grace_duration` - (Optional) (Updatable) If the node action should be performed if not all the pods can be evicted in the grace period * `is_force_delete_after_grace_duration` - (Optional) (Updatable) If the underlying compute instance should be deleted if you cannot evict all the pods in grace period * `node_image_name` - (Optional) Deprecated. Use `nodeSourceDetails` instead. If you specify values for both, this value is ignored. The name of the image running on the nodes in the node pool. Cannot be used when `node_image_id` is specified. * `node_metadata` - (Optional) (Updatable) A list of key/value pairs to add to each underlying Oracle Cloud Infrastructure instance in the node pool on launch. * `node_pool_cycling_details` - (Optional) (Updatable) Node Pool Cycling Details - * `is_node_cycling_enabled` - (Optional) (Updatable) If nodes in the nodepool will be cycled to have new changes. + * `cycle_modes` - (Optional) (Updatable) An ordered list of cycle modes that should be performed on the OKE nodes. + * `is_node_cycling_enabled` - (Optional) (Updatable) If cycling operation should be performed on the nodes in the node pool. * `maximum_surge` - (Optional) (Updatable) Maximum additional new compute instances that would be temporarily created and added to nodepool during the cycling nodepool process. OKE supports both integer and percentage input. Defaults to 1, Ranges from 0 to Nodepool size or 0% to 100% * `maximum_unavailable` - (Optional) (Updatable) Maximum active nodes that would be terminated from nodepool during the cycling nodepool process. OKE supports both integer and percentage input. Defaults to 0, Ranges from 0 to Nodepool size or 0% to 100% * `node_shape` - (Required) (Updatable) The name of the node shape of the nodes in the node pool. @@ -207,12 +211,14 @@ The following attributes are exported: * `size` - The number of nodes in the node pool. * `node_eviction_node_pool_settings` - Node Eviction Details configuration * `eviction_grace_duration` - Duration after which OKE will give up eviction of the pods on the node. PT0M will indicate you want to delete the node without cordon and drain. Default PT60M, Min PT0M, Max: PT60M. Format ISO 8601 e.g PT30M + * `is_force_action_after_grace_duration` - If the node action should be performed if not all the pods can be evicted in the grace period * `is_force_delete_after_grace_duration` - If the underlying compute instance should be deleted if you cannot evict all the pods in grace period * `node_image_id` - Deprecated. see `nodeSource`. The OCID of the image running on the nodes in the node pool. * `node_image_name` - Deprecated. see `nodeSource`. The name of the image running on the nodes in the node pool. * `node_metadata` - A list of key/value pairs to add to each underlying Oracle Cloud Infrastructure instance in the node pool on launch. * `node_pool_cycling_details` - Node Pool Cycling Details - * `is_node_cycling_enabled` - If nodes in the nodepool will be cycled to have new changes. + * `cycle_modes` - An ordered list of cycle modes that should be performed on the OKE nodes. + * `is_node_cycling_enabled` - If cycling operation should be performed on the nodes in the node pool. * `maximum_surge` - Maximum additional new compute instances that would be temporarily created and added to nodepool during the cycling nodepool process. OKE supports both integer and percentage input. Defaults to 1, Ranges from 0 to Nodepool size or 0% to 100% * `maximum_unavailable` - Maximum active nodes that would be terminated from nodepool during the cycling nodepool process. OKE supports both integer and percentage input. Defaults to 0, Ranges from 0 to Nodepool size or 0% to 100% * `node_shape` - The name of the node shape of the nodes in the node pool. diff --git a/website/docs/r/database_autonomous_database.html.markdown b/website/docs/r/database_autonomous_database.html.markdown index 06ff08fd24b..0c50fd32724 100644 --- a/website/docs/r/database_autonomous_database.html.markdown +++ b/website/docs/r/database_autonomous_database.html.markdown @@ -280,6 +280,7 @@ The following arguments are supported: * `resource_pool_summary` - (Optional) (Updatable) The configuration details for resource pool * `is_disabled` - (Optional) (Updatable) Indicates if the resource pool should be deleted for the Autonomous Database. * `pool_size` - (Optional) (Updatable) Resource pool size. +* `enable_delete_scheduled_operations` - If omitted or set to false the provider will not delete scheduled_operations from the Autonomous Database. If set to true, provider will delete scheduled_operations from the Autonomous Database. * `scheduled_operations` - (Optional) (Updatable) The list of scheduled operations. Consists of values such as dayOfWeek, scheduledStartTime, scheduledStopTime. This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. @@ -579,6 +580,7 @@ AL32UTF8, AR8ADOS710, AR8ADOS720, AR8APTEC715, AR8ARABICMACS, AR8ASMO8X, AR8ISO8 * `is_snapshot_standby` - Indicates if user wants to convert to a snapshot standby. For example, true would set a standby database to snapshot standby database. False would set a snapshot standby database back to regular standby database. * `time_snapshot_standby_enabled_till` - Time and date stored as an RFC 3339 formatted timestamp string. For example, 2022-01-01T12:00:00.000Z would set a limit for the snapshot standby to be converted back to a cross-region standby database. * `role` - The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. +* `enable_delete_scheduled_operations` - If omitted or set to false the provider will not delete scheduled_operations from the Autonomous Database. If set to true, provider will delete scheduled_operations from the Autonomous Database. * `scheduled_operations` - The list of scheduled operations. Consists of values such as dayOfWeek, scheduledStartTime, scheduledStopTime. This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. diff --git a/website/docs/r/database_autonomous_database_saas_admin_user.html.markdown b/website/docs/r/database_autonomous_database_saas_admin_user.html.markdown index a9d4c2f83f6..b9d2ee6e34f 100644 --- a/website/docs/r/database_autonomous_database_saas_admin_user.html.markdown +++ b/website/docs/r/database_autonomous_database_saas_admin_user.html.markdown @@ -246,7 +246,8 @@ The following attributes are exported: * `resource_pool_summary` - The configuration details for resource pool * `is_disabled` - Indicates if the resource pool should be deleted for the Autonomous Database. * `pool_size` - Resource pool size. -* `role` - The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. +* `role` - The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. +* `enable_delete_scheduled_operations` - If omitted or set to false the provider will not delete scheduled_operations from the Autonomous Database. If set to true, provider will delete scheduled_operations from the Autonomous Database. * `scheduled_operations` - The list of scheduled operations. Consists of values such as dayOfWeek, scheduledStartTime, scheduledStopTime. This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. diff --git a/website/docs/r/disaster_recovery_dr_plan.html.markdown b/website/docs/r/disaster_recovery_dr_plan.html.markdown index 0cf333114e6..600ef043d3a 100644 --- a/website/docs/r/disaster_recovery_dr_plan.html.markdown +++ b/website/docs/r/disaster_recovery_dr_plan.html.markdown @@ -74,6 +74,7 @@ The following attributes are exported: * `refresh_status` - The DR plan step refresh status. Example: `STEP_ADDED` * `timeout` - The timeout in seconds for executing this step. Example: `600` * `type` - The plan step type. + * `type_display_name` - The display name of the DR Plan step type. Example: `Database Switchover` * `user_defined_step` - The details for a user-defined step in a DR plan. * `function_id` - The OCID of function to be invoked. Example: `ocid1.fnfunc.oc1..uniqueID` * `function_region` - The region in which the function is deployed. Example: `us-ashburn-1` @@ -94,17 +95,23 @@ The following attributes are exported: * `script_command` - The script name and arguments. Example: `/usr/bin/python3 /home/opc/scripts/my_app_script.py arg1 arg2 arg3` * `step_type` - The type of the user-defined step. - **RUN_OBJECTSTORE_SCRIPT_PRECHECK** - A step which performs a precheck on a script stored in Oracle Cloud Infrastructure object storage. + **RUN_OBJECTSTORE_SCRIPT_PRECHECK** - A built-in step which performs a precheck on a script stored in Oracle Cloud Infrastructure object storage. This step cannot be added, deleted, or customized by the user. - **RUN_LOCAL_SCRIPT_PRECHECK** - A step which performs a precheck on a script which resides locally on a compute instance. + **RUN_LOCAL_SCRIPT_PRECHECK** - A built-in step which performs a precheck on a script which resides locally on a compute instance. This step cannot be added, deleted, or customized by the user. - **INVOKE_FUNCTION_PRECHECK** - A step which performs a precheck on an Oracle Cloud Infrastructure function. See https://docs.oracle.com/en-us/iaas/Content/Functions/home.htm. + **INVOKE_FUNCTION_PRECHECK** - A built-in step which performs a precheck on an Oracle Cloud Infrastructure function. This step cannot be added, deleted, or customized by the user. See https://docs.oracle.com/en-us/iaas/Content/Functions/home.htm. **RUN_OBJECTSTORE_SCRIPT** - A step which runs a script stored in Oracle Cloud Infrastructure object storage. **RUN_LOCAL_SCRIPT** - A step which runs a script that resides locally on a compute instance. - **INVOKE_FUNCTION** - A step which invokes an Oracle Cloud Infrastructure function. See https://docs.oracle.com/en-us/iaas/Content/Functions/home.htm. + **INVOKE_FUNCTION** - A step which invokes an Oracle Cloud Infrastructure function. See https://docs.oracle.com/en-us/iaas/Content/Functions/home.htm. + + **RUN_OBJECTSTORE_SCRIPT_USER_DEFINED_CUSTOM_PRECHECK** - A user-defined step which performs a precheck by executing a user-provided script stored in Oracle Cloud Infrastructure object storage. + + **RUN_LOCAL_SCRIPT_USER_DEFINED_CUSTOM_PRECHECK** - A user-defined step which performs a precheck by executing a user-provided script which resides locally on a compute instance. + + **INVOKE_FUNCTION_USER_DEFINED_CUSTOM_PRECHECK** - A user-defined step which performs a precheck by executing a user-provided Oracle Cloud Infrastructure function. See https://docs.oracle.com/en-us/iaas/Content/Functions/home.htm. * `type` - The group type. Example: `BUILT_IN` * `source_plan_id` - If this is a cloned DR plan, the OCID of the source DR plan that was used to clone this DR plan. If this DR plan was not cloned, then the value for this will be `null`. Example: `ocid1.drplan.oc1..uniqueID` * `state` - The current state of the DR plan. diff --git a/website/docs/r/disaster_recovery_dr_plan_execution.html.markdown b/website/docs/r/disaster_recovery_dr_plan_execution.html.markdown index 6e559d6845e..3a98fbc2ba1 100644 --- a/website/docs/r/disaster_recovery_dr_plan_execution.html.markdown +++ b/website/docs/r/disaster_recovery_dr_plan_execution.html.markdown @@ -85,6 +85,7 @@ The following attributes are exported: * `time_ended` - The time when execution ended. An RFC3339 formatted datetime string. Example: `2019-03-29T09:36:42Z` * `time_started` - The time when step execution began. An RFC3339 formatted datetime string. Example: `2019-03-29T09:36:42Z` * `type` - The step type. + * `type_display_name` - The display name of the DR Plan step type. Example: `Database Switchover` * `time_ended` - The time when group execution ended. An RFC3339 formatted datetime string. Example: `2019-03-29T09:36:42Z` * `time_started` - The time when group execution began. An RFC3339 formatted datetime string. Example: `2019-03-29T09:36:42Z` * `type` - The group type. Example: `BUILT_IN` diff --git a/website/docs/r/disaster_recovery_dr_protection_group.html.markdown b/website/docs/r/disaster_recovery_dr_protection_group.html.markdown index 927b26e1bbb..818c775fedd 100644 --- a/website/docs/r/disaster_recovery_dr_protection_group.html.markdown +++ b/website/docs/r/disaster_recovery_dr_protection_group.html.markdown @@ -69,6 +69,21 @@ resource "oci_disaster_recovery_dr_protection_group" "test_dr_protection_group" bucket = var.dr_protection_group_members_backup_location_bucket namespace = var.dr_protection_group_members_backup_location_namespace } + block_volume_attach_and_mount_operations { + + #Optional + attachments { + + #Optional + block_volume_id = oci_core_volume.test_volume.id + volume_attachment_reference_instance_id = oci_core_instance.test_instance.id + } + mounts { + + #Optional + mount_point = var.dr_protection_group_members_block_volume_attach_and_mount_operations_mounts_mount_point + } + } block_volume_operations { #Optional @@ -84,14 +99,28 @@ resource "oci_disaster_recovery_dr_protection_group" "test_dr_protection_group" mount_point = var.dr_protection_group_members_block_volume_operations_mount_details_mount_point } } - connection_string_type = var.dr_protection_group_members_connection_string_type bucket = var.dr_protection_group_members_bucket + common_destination_key { + + #Optional + encryption_key_id = oci_kms_key.test_key.id + vault_id = oci_kms_vault.test_vault.id + } + connection_string_type = var.dr_protection_group_members_connection_string_type destination_availability_domain = var.dr_protection_group_members_destination_availability_domain + destination_backup_policy_id = oci_identity_policy.test_policy.id destination_capacity_reservation_id = var.destination_capacity_reservation_id destination_compartment_id = oci_identity_compartment.test_compartment.id destination_dedicated_vm_host_id = oci_core_dedicated_vm_host.test_dedicated_vm_host.id + destination_encryption_key { + + #Optional + encryption_key_id = oci_kms_key.test_key.id + vault_id = oci_kms_vault.test_vault.id + } destination_load_balancer_id = oci_load_balancer_load_balancer.test_load_balancer.id destination_network_load_balancer_id = oci_network_load_balancer_network_load_balancer.test_network_load_balancer.id + destination_snapshot_policy_id = oci_identity_policy.test_policy.id export_mappings { #Optional @@ -133,15 +162,25 @@ resource "oci_disaster_recovery_dr_protection_group" "test_dr_protection_group" minimum = var.dr_protection_group_members_managed_node_pool_configs_minimum } namespace = var.dr_protection_group_members_namespace -<<<<<<< ours + password_vault_secret_id = var.password_vault_secret_id network_load_balancer_mappings { #Optional destination_network_load_balancer_id = oci_network_load_balancer_network_load_balancer.test_network_load_balancer.id source_network_load_balancer_id = oci_network_load_balancer_network_load_balancer.test_network_load_balancer.id } - password_vault_secret_id = oci_vault_secret.test_secret.id peer_cluster_id = oci_containerengine_cluster.test_cluster.id + source_volume_to_destination_encryption_key_mappings { + + #Optional + destination_encryption_key { + + #Optional + encryption_key_id = oci_kms_key.test_key.id + vault_id = oci_kms_vault.test_vault.id + } + source_volume_id = oci_core_volume.test_volume.id + } vault_mappings { #Optional @@ -155,9 +194,6 @@ resource "oci_disaster_recovery_dr_protection_group" "test_dr_protection_group" maximum = var.dr_protection_group_members_virtual_node_pool_configs_maximum minimum = var.dr_protection_group_members_virtual_node_pool_configs_minimum } -======= - password_vault_secret_id = var.password_vault_secret_id ->>>>>>> theirs vnic_mapping { #Optional @@ -173,6 +209,7 @@ resource "oci_disaster_recovery_dr_protection_group" "test_dr_protection_group" destination_nsg_id_list = var.dr_protection_group_members_vnic_mappings_destination_nsg_id_list destination_primary_private_ip_address = var.dr_protection_group_members_vnic_mappings_destination_primary_private_ip_address destination_primary_private_ip_hostname_label = var.dr_protection_group_members_vnic_mappings_destination_primary_private_ip_hostname_label + destination_reserved_public_ip_id = oci_core_public_ip.test_public_ip.id destination_subnet_id = oci_core_subnet.test_subnet.id source_vnic_id = oci_core_vnic.test_vnic.id } @@ -214,9 +251,9 @@ The following arguments are supported: * Minimum = 1 * Maximum = 12 - Examples: FREQ=WEEKLY;BYDAY=MO,WE;BYHOUR=10;INTERVAL=1 -> Run a backup every week on monday and wednesday at 10:00 AM. FREQ=WEEKLY;BYDAY=MO,WE;BYHOUR=10;INTERVAL=2 -> Invalid configuration (can not specify interval of 2). + Examples: FREQ=WEEKLY;BYDAY=MO,WE;BYHOUR=10;INTERVAL=1 -> Run a backup every Monday and Wednesday at 10:00 AM. FREQ=WEEKLY;BYDAY=MO,WE;BYHOUR=10;INTERVAL=2 -> Invalid configuration (Cannot specify an interval of 2). - FREQ=HOURLY;INTERVAL=25 -> Invalid configuration (can not specify interval of 25). FREQ=HOURLY;INTERVAL=0 -> Invalid configuration (can not specify interval of 0). FREQ=HOURLY;INTERVAL=24 -> Run a backup every 24 hours. FREQ=HOURLY;INTERVAL=1 -> Run a backup every hour. FREQ=HOURLY;BYMINUTE=30;INTERVAL=15 -> Run a backup every 15 hours at the 30th minute. FREQ=DAILY;INTERVAL=31 -> Invalid configuration (can not specify interval of 31). FREQ=DAILY;INTERVAL=0 -> Invalid configuration (can not specify interval of 0). FREQ=DAILY;INTERVAL=30 -> Run a backup every 30 days at 12:00 midnight. FREQ=DAILY;BYHOUR=17;BYMINUTE=10;INTERVAL=1 -> Run a backup every day at 05:10 PM. + FREQ=HOURLY;INTERVAL=25 -> Invalid configuration (Cannot specify an interval of 25). FREQ=HOURLY;INTERVAL=0 -> Invalid configuration (Cannot specify an interval of 0). FREQ=HOURLY;INTERVAL=24 -> Run a backup every 24 hours. FREQ=HOURLY;INTERVAL=1 -> Run a backup every hour. FREQ=HOURLY;BYMINUTE=30;INTERVAL=15 -> Run a backup every 15 hours at the 30th minute. FREQ=DAILY;INTERVAL=31 -> Invalid configuration (Cannot specify an interval of 31). FREQ=DAILY;INTERVAL=0 -> Invalid configuration (Cannot specify an interval of 0). FREQ=DAILY;INTERVAL=30 -> Run a backup every 30 days at 12:00 midnight. FREQ=DAILY;BYHOUR=17;BYMINUTE=10;INTERVAL=1 -> Run a backup daily at 05:10 PM. * `image_replication_vault_secret_id` - (Applicable when member_type=OKE_CLUSTER) (Updatable) The OCID of the vault secret that stores the image credential. This property applies to the OKE cluster member in both the primary and standby region. * `max_number_of_backups_retained` - (Applicable when member_type=OKE_CLUSTER) (Updatable) The maximum number of backups that should be retained. This property applies to the OKE cluster member in primary region. * `namespaces` - (Applicable when member_type=OKE_CLUSTER) (Updatable) A list of namespaces that need to be backed up. The default value is null. If a list of namespaces is not provided, all namespaces will be backed up. This property applies to the OKE cluster member in primary region. Example: ["default", "pv-nginx"] @@ -224,20 +261,34 @@ The following arguments are supported: * `backup_location` - (Applicable when member_type=OKE_CLUSTER) (Updatable) The details for creating the backup location of an OKE Cluster. * `bucket` - (Applicable when member_type=OKE_CLUSTER) (Updatable) The bucket name inside the object storage namespace. Example: `operation_logs` * `namespace` - (Applicable when member_type=OKE_CLUSTER) (Updatable) The namespace in the object storage bucket location (Note - this is usually the tenancy name). Example: `myocitenancy` - * `block_volume_operations` - (Applicable when member_type=COMPUTE_INSTANCE_NON_MOVABLE) (Updatable) A list of operations performed on block volumes used by the compute instance. - * `attachment_details` - (Applicable when member_type=COMPUTE_INSTANCE_NON_MOVABLE) (Updatable) The details for creating a block volume attachment. - * `volume_attachment_reference_instance_id` - (Applicable when member_type=COMPUTE_INSTANCE_NON_MOVABLE) (Updatable) The OCID of the reference compute instance from which to obtain the attachment details for the volume. This reference compute instance is from the peer DR protection group. Example: `ocid1.instance.oc1..uniqueID` + * `block_volume_attach_and_mount_operations` - (Applicable when member_type=COMPUTE_INSTANCE_NON_MOVABLE) (Updatable) The details for creating the operations performed on a block volume. + * `attachments` - (Applicable when member_type=COMPUTE_INSTANCE_NON_MOVABLE) (Updatable) A list of details of attach or detach operations performed on block volumes. + * `block_volume_id` - (Required when member_type=COMPUTE_INSTANCE_NON_MOVABLE) (Updatable) The OCID of the block volume. Example: `ocid1.volume.oc1..uniqueID` + * `volume_attachment_reference_instance_id` - (Applicable when member_type=COMPUTE_INSTANCE_NON_MOVABLE) (Updatable) The OCID of the reference compute instance needed to obtain the volume attachment details. This reference compute instance belongs to the peer DR protection group. Example: `ocid1.instance.oc1..uniqueID` + * `mounts` - (Applicable when member_type=COMPUTE_INSTANCE_NON_MOVABLE) (Updatable) A list of details of mount operations performed on block volumes. + * `mount_point` - (Required when member_type=COMPUTE_INSTANCE_NON_MOVABLE) (Updatable) The physical mount point where the file system is mounted on the block volume. Example: `/mnt/yourmountpoint` + * `block_volume_operations` - (Applicable when member_type=COMPUTE_INSTANCE_NON_MOVABLE) (Updatable) Deprecated. Use the 'blockVolumeAttachAndMountOperations' attribute instead of this. A list of operations performed on block volumes used by the compute instance. + * `attachment_details` - (Applicable when member_type=COMPUTE_INSTANCE_NON_MOVABLE) (Updatable) Deprecated. Use the 'CreateComputeInstanceNonMovableBlockVolumeAttachOperationDetails' definition instead of this. The details for creating a block volume attachment. + * `volume_attachment_reference_instance_id` - (Applicable when member_type=COMPUTE_INSTANCE_NON_MOVABLE) (Updatable) The OCID of the reference compute instance needed to obtain the volume attachment details. This reference compute instance belongs to the peer DR protection group. Example: `ocid1.instance.oc1..uniqueID` * `block_volume_id` - (Required when member_type=COMPUTE_INSTANCE_NON_MOVABLE) (Updatable) The OCID of the block volume. Example: `ocid1.volume.oc1..uniqueID` * `mount_details` - (Applicable when member_type=COMPUTE_INSTANCE_NON_MOVABLE) (Updatable) The details for creating a mount for a file system on a block volume. * `mount_point` - (Applicable when member_type=COMPUTE_INSTANCE_NON_MOVABLE) (Updatable) The physical mount point used for mounting the file system on the block volume. Example: `/mnt/yourmountpoint` - * `connection_string_type` - (Applicable when member_type=AUTONOMOUS_CONTAINER_DATABASE) (Updatable) The type of connection strings used to connect to an Autonomous Container Database snapshot standby created during a DR Drill operation. See https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbcl/index.html for information about these service types. * `bucket` - (Required when member_type=OBJECT_STORAGE_BUCKET) (Updatable) The bucket name inside the object storage namespace. Example: `bucket_name` + * `common_destination_key` - (Applicable when member_type=VOLUME_GROUP) (Updatable) Create properties for a customer-managed vault and encryption key in the destination region. The customer-managed encryption key in this will be used to encrypt the resource or containing resources after they move to the destination region. + * `encryption_key_id` - (Required when member_type=VOLUME_GROUP) (Updatable) The OCID of the customer-managed encryption key in the destination region vault. Example: `ocid1.key.oc1..uniqueID` + * `vault_id` - (Required when member_type=VOLUME_GROUP) (Updatable) The OCID of the destination region vault for the customer-managed encryption key. Example: `ocid1.vault.oc1..uniqueID` + * `connection_string_type` - (Applicable when member_type=AUTONOMOUS_CONTAINER_DATABASE) (Updatable) The type of connection strings used to connect to an Autonomous Container Database snapshot standby created during a DR Drill operation. See https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbcl/index.html for information about these service types. * `destination_availability_domain` - (Applicable when member_type=FILE_SYSTEM) (Updatable) The availability domain of the destination mount target. Example: `BBTh:region-AD` + * `destination_backup_policy_id` - (Applicable when member_type=VOLUME_GROUP) (Updatable) The OCID of the backup policy to use in the destination region. This policy will be used to create backups for this volume group after it moves the destination region. Example: `ocid1.volumebackuppolicy.oc1..uniqueID` * `destination_capacity_reservation_id` - (Applicable when member_type=COMPUTE_INSTANCE_MOVABLE) (Updatable) The OCID of a capacity reservation in the destination region which will be used to launch the compute instance. Example: `ocid1.capacityreservation.oc1..uniqueID` * `destination_compartment_id` - (Applicable when member_type=COMPUTE_INSTANCE | COMPUTE_INSTANCE_MOVABLE) (Updatable) The OCID of a compartment in the destination region in which the compute instance should be launched. Example: `ocid1.compartment.oc1..uniqueID` * `destination_dedicated_vm_host_id` - (Applicable when member_type=COMPUTE_INSTANCE | COMPUTE_INSTANCE_MOVABLE) (Updatable) The OCID of a dedicated VM host in the destination region where the compute instance should be launched. Example: `ocid1.dedicatedvmhost.oc1..uniqueID` + * `destination_encryption_key` - (Applicable when member_type=AUTONOMOUS_DATABASE | FILE_SYSTEM) (Updatable) Create properties for a customer-managed vault and encryption key in the destination region. The customer-managed encryption key in this will be used to encrypt the resource or containing resources after they move to the destination region. + * `encryption_key_id` - (Required when member_type=AUTONOMOUS_DATABASE | FILE_SYSTEM) (Updatable) The OCID of the customer-managed encryption key in the destination region vault. Example: `ocid1.key.oc1..uniqueID` + * `vault_id` - (Required when member_type=AUTONOMOUS_DATABASE | FILE_SYSTEM) (Updatable) The OCID of the destination region vault for the customer-managed encryption key. Example: `ocid1.vault.oc1..uniqueID` * `destination_load_balancer_id` - (Applicable when member_type=LOAD_BALANCER) (Updatable) The OCID of the destination load balancer. Example: `ocid1.loadbalancer.oc1..uniqueID` * `destination_network_load_balancer_id` - (Applicable when member_type=NETWORK_LOAD_BALANCER) (Updatable) The OCID of the destination network load balancer. Example: `ocid1.networkloadbalancer.oc1..uniqueID` + * `destination_snapshot_policy_id` - (Applicable when member_type=FILE_SYSTEM) (Updatable) The OCID of the snapshot policy to use in the destination region. This policy will be attached to the file system after it moves to the destination region. Example: `ocid1.filesystemsnapshotpolicy.oc1..uniqueID` * `export_mappings` - (Applicable when member_type=FILE_SYSTEM) (Updatable) A list of mappings between file system exports in the primary region and mount targets in the standby region. * `destination_mount_target_id` - (Required when member_type=FILE_SYSTEM) (Updatable) The OCID of the destination mount target in the destination region which is used to export the file system. Example: `ocid1.mounttarget.oc1..uniqueID` * `export_id` - (Required when member_type=FILE_SYSTEM) (Updatable) The OCID of the export path in the primary region used to mount or unmount the file system. Example: `ocid1.export.oc1..uniqueID` @@ -268,6 +319,15 @@ The following arguments are supported: * `source_network_load_balancer_id` - (Required when member_type=OKE_CLUSTER) (Updatable) The OCID of the source Network Load Balancer. Example: `ocid1.networkloadbalancer.oc1..uniqueID` * `password_vault_secret_id` - (Applicable when member_type=AUTONOMOUS_DATABASE | DATABASE) (Updatable) The OCID of the vault secret where the database SYSDBA password is stored. This password is required and used for performing database DR Drill operations when using full clone. Example: `ocid1.vaultsecret.oc1..uniqueID` * `peer_cluster_id` - (Applicable when member_type=OKE_CLUSTER) (Updatable) The OCID of the peer OKE cluster. This property applies to the OKE cluster member in both the primary and standby region. Example: `ocid1.cluster.oc1..uniqueID` + * `source_volume_to_destination_encryption_key_mappings` - (Applicable when member_type=VOLUME_GROUP) (Updatable) A list of mappings between source volume IDs in the volume group and customer-managed encryption keys in the destination region which will be used to encrypt the volume after it moves to the destination region. + + If you add the entry for source volumes and its corresponding vault and encryption keys here, you can not use 'commonDestinationKey' for encrypting all volumes with common encryption key. Similarly, if you specify common vault and encryption key using 'commonDestinationKey', you cannot specify vaults and encryption keys individually for each volume using 'sourceVolumeToDestinationEncryptionKeyMappings'. + + An entry for each volume in volume group should be added in this list. The encryption key will not be updated for the volumes that are part of volume group but missing in this list. + * `destination_encryption_key` - (Required when member_type=VOLUME_GROUP) (Updatable) Create properties for a customer-managed vault and encryption key in the destination region. The customer-managed encryption key in this will be used to encrypt the resource or containing resources after they move to the destination region. + * `encryption_key_id` - (Required when member_type=VOLUME_GROUP) (Updatable) The OCID of the customer-managed encryption key in the destination region vault. Example: `ocid1.key.oc1..uniqueID` + * `vault_id` - (Required when member_type=VOLUME_GROUP) (Updatable) The OCID of the destination region vault for the customer-managed encryption key. Example: `ocid1.vault.oc1..uniqueID` + * `source_volume_id` - (Required when member_type=VOLUME_GROUP) (Updatable) The OCID of the source boot volume or block volume. Example: `ocid1.volume.oc1..uniqueID` * `vault_mappings` - (Applicable when member_type=OKE_CLUSTER) (Updatable) The list of source-to-destination vault mappings required for DR operations. This property applies to the OKE cluster member in primary region. * `destination_vault_id` - (Required when member_type=OKE_CLUSTER) (Updatable) The OCID of the destination Vault. Example: `ocid1.vault.oc1..uniqueID` * `source_vault_id` - (Required when member_type=OKE_CLUSTER) (Updatable) The OCID of the source Vault. Example: `ocid1.vault.oc1..uniqueID` @@ -285,6 +345,7 @@ The following arguments are supported: * `destination_nsg_id_list` - (Applicable when member_type=COMPUTE_INSTANCE_MOVABLE) (Updatable) A list of OCIDs of network security groups (NSG) in the destination region which should be assigned to the source VNIC. Example: `[ ocid1.networksecuritygroup.oc1..uniqueID, ocid1.networksecuritygroup.oc1..uniqueID ]` * `destination_primary_private_ip_address` - (Applicable when member_type=COMPUTE_INSTANCE_MOVABLE) (Updatable) The primary private IP address to be assigned to the source VNIC in the destination subnet. This IP address must belong to the destination subnet. Example: `10.0.3.3` * `destination_primary_private_ip_hostname_label` - (Applicable when member_type=COMPUTE_INSTANCE_MOVABLE) (Updatable) The hostname label to be assigned in the destination subnet for the primary private IP of the source VNIC. This label is the hostname portion of the private IP's fully qualified domain name (FQDN) (for example, 'myhost1' in the FQDN 'myhost1.subnet123.vcn1.oraclevcn.com'). Example: `myhost1` + * `destination_reserved_public_ip_id` - (Applicable when member_type=COMPUTE_INSTANCE_MOVABLE) (Updatable) The OCID of the reserved public IP address to be assigned to the compute instance in the destination region. Example: `ocid1.publicip.oc1..uniqueID` * `destination_subnet_id` - (Required when member_type=COMPUTE_INSTANCE_MOVABLE) (Updatable) The OCID of the destination subnet to which the source VNIC should connect. Example: `ocid1.subnet.oc1..uniqueID` * `source_vnic_id` - (Required when member_type=COMPUTE_INSTANCE_MOVABLE) (Updatable) The OCID of the source VNIC. Example: `ocid1.vnic.oc1..uniqueID` * `disassociate_trigger` - (Optional) (Updatable) An optional property when incremented triggers Disassociate. Could be set to any integer value. @@ -324,20 +385,42 @@ The following attributes are exported: * `bucket` - The bucket name inside the object storage namespace. Example: `operation_logs` * `namespace` - The namespace in object storage backup location(Note - this is usually the tenancy name). Example: `myocitenancy` * `object` - The object name inside the object storage bucket. Example: `switchover_plan_executions` - * `block_volume_operations` - Operations performed on a list of block volumes used on the non-movable compute instance. - * `attachment_details` - The details for attaching or detaching a block volume. - * `volume_attachment_reference_instance_id` - The OCID of the reference compute instance from which to obtain the attachment details for the volume. This reference compute instance is from the peer DR protection group. Example: `ocid1.instance.oc1..uniqueID` + * `block_volume_attach_and_mount_operations` - The details of the block volume operations performed on the non-movable compute instance. + * `attachments` - A list of details of attach or detach operations performed on block volumes. + * `block_volume_id` - The OCID of the block volume. Example: `ocid1.volume.oc1..uniqueID` + * `volume_attachment_reference_instance_id` - The OCID of the reference compute instance needed to obtain the volume attachment details. This reference compute instance belongs to the peer DR protection group. Example: `ocid1.instance.oc1..uniqueID` + * `mounts` - A list of details of mount operations performed on block volumes. + * `mount_point` - The physical mount point where the file system is mounted on the block volume. Example: `/mnt/yourmountpoint` + * `block_volume_operations` - Deprecated. Use the 'blockVolumeAttachAndMountOperations' attribute instead of this. Operations performed on a list of block volumes used on the non-movable compute instance. + * `attachment_details` - Deprecated. Use the 'ComputeInstanceNonMovableBlockVolumeAttachOperationDetails' definition instead of this. The details for attaching or detaching a block volume. + * `volume_attachment_reference_instance_id` - The OCID of the reference compute instance needed to obtain the volume attachment details. This reference compute instance belongs to the peer DR protection group. Example: `ocid1.instance.oc1..uniqueID` * `block_volume_id` - The OCID of the block volume. Example: `ocid1.volume.oc1..uniqueID` - * `mount_details` - The details for mounting or unmounting the file system on a block volume. + * `mount_details` - Deprecated. Use the 'ComputeInstanceNonMovableBlockVolumeMountOperationDetails' definition instead of this. The details for mounting or unmounting the file system on a block volume. * `mount_point` - The physical mount point used for mounting and unmounting the file system on a block volume. Example: `/mnt/yourmountpoint` * `bucket` - The bucket name inside the object storage namespace. Example: `bucket_name` + * `common_destination_key` - The OCID of a vault and customer-managed encryption key in the destination region. + + The customer-managed encryption key in this will be used to encrypt all the volumes of the volume group after they move to the destination region. If you specify this common vault and encryption key, you cannot specify vaults and encryption keys individually for each volume using 'sourceVolumeToDestinationEncryptionKeyMappings'. + + The customer-managed encryption key in this will be used to encrypt the file system when it move to the destination region. + * `encryption_key_id` - The OCID of the customer-managed encryption key in the destination region vault. Example: `ocid1.key.oc1..uniqueID` + * `vault_id` - The OCID of the destination region vault for the customer-managed encryption key. Example: `ocid1.vault.oc1..uniqueID` * `connection_string_type` - The type of connection strings used to connect to an Autonomous Container Database snapshot standby created during a DR Drill operation. See https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbcl/index.html for information about these service types. * `destination_availability_domain` - The availability domain of the destination mount target. Example: `BBTh:region-AD` + * `destination_backup_policy_id` - The OCID of the backup policy to use in the destination region. This policy will be used to create backups for this volume group after it moves the destination region. Example: `ocid1.volumebackuppolicy.oc1..uniqueID` * `destination_capacity_reservation_id` - The OCID of a capacity reservation in the destination region which will be used to launch the compute instance. Example: `ocid1.capacityreservation.oc1..uniqueID` * `destination_compartment_id` - The OCID of a compartment in the destination region in which the compute instance should be launched. Example: `ocid1.compartment.oc1..uniqueID` * `destination_dedicated_vm_host_id` - The OCID of a dedicated VM host in the destination region where the compute instance should be launched. Example: `ocid1.dedicatedvmhost.oc1..uniqueID` + * `destination_encryption_key` - The OCID of a vault and customer-managed encryption key in the destination region. + + The customer-managed encryption key in this will be used to encrypt all the volumes of the volume group after they move to the destination region. If you specify this common vault and encryption key, you cannot specify vaults and encryption keys individually for each volume using 'sourceVolumeToDestinationEncryptionKeyMappings'. + + The customer-managed encryption key in this will be used to encrypt the file system when it move to the destination region. + * `encryption_key_id` - The OCID of the customer-managed encryption key in the destination region vault. Example: `ocid1.key.oc1..uniqueID` + * `vault_id` - The OCID of the destination region vault for the customer-managed encryption key. Example: `ocid1.vault.oc1..uniqueID` * `destination_load_balancer_id` - The OCID of the destination load balancer. The backend sets in this destination load balancer are updated during DR. Example: `ocid1.loadbalancer.oc1..uniqueID` * `destination_network_load_balancer_id` - The OCID of the destination network load balancer. The backend sets in this destination network load balancer are updated during DR. Example: `ocid1.networkloadbalancer.oc1..uniqueID` + * `destination_snapshot_policy_id` - The OCID of the snapshot policy to use in the destination region. This policy will be attached to the file system after it moves to the destination region. Example: `ocid1.filesystemsnapshotpolicy.oc1..uniqueID` * `export_mappings` - A list of mappings between the primary region file system export and destination region mount target. * `destination_mount_target_id` - The OCID of the destination mount target on which this file system export should be created. Example: `ocid1.mounttarget.oc1..uniqueID` * `export_id` - The OCID of the export path. Example: `ocid1.export.oc1..uniqueID` @@ -368,6 +451,19 @@ The following attributes are exported: * `source_network_load_balancer_id` - The OCID of the source Network Load Balancer. Example: `ocid1.networkloadbalancer.oc1..uniqueID` * `password_vault_secret_id` - The OCID of the vault secret where the database SYSDBA password is stored. This password is required and used for performing database DR Drill operations when using full clone. Example: `ocid1.vaultsecret.oc1..uniqueID` * `peer_cluster_id` - The OCID of the peer OKE cluster. This property applies to the OKE cluster member in both the primary and standby region. Example: `ocid1.cluster.oc1.uniqueID` + * `source_volume_to_destination_encryption_key_mappings` - A list of mappings between source volume IDs in the volume group and customer-managed encryption keys in the destination region which will be used to encrypt the volume after it moves to the destination region. + + If you add the entry for source volumes and its corresponding vault and encryption keys here, you can not use 'commonDestinationKey' for encrypting all volumes with common encryption key. Similarly, if you specify common vault and encryption key using 'commonDestinationKey', you cannot specify vaults and encryption keys individually for each volume using 'sourceVolumeToDestinationEncryptionKeyMappings'. + + An entry for each volume in volume group should be added in this list. The encryption key will not be updated for the volumes that are part of volume group but missing in this list. + * `destination_encryption_key` - The OCID of a vault and customer-managed encryption key in the destination region. + + The customer-managed encryption key in this will be used to encrypt all the volumes of the volume group after they move to the destination region. If you specify this common vault and encryption key, you cannot specify vaults and encryption keys individually for each volume using 'sourceVolumeToDestinationEncryptionKeyMappings'. + + The customer-managed encryption key in this will be used to encrypt the file system when it move to the destination region. + * `encryption_key_id` - The OCID of the customer-managed encryption key in the destination region vault. Example: `ocid1.key.oc1..uniqueID` + * `vault_id` - The OCID of the destination region vault for the customer-managed encryption key. Example: `ocid1.vault.oc1..uniqueID` + * `source_volume_id` - The OCID of the source boot volume or block volume. Example: `ocid1.volume.oc1..uniqueID` * `vault_mappings` - The list of source-to-destination vault mappings required for DR operations. This property applies to the OKE cluster member in primary region. * `destination_vault_id` - The OCID of the destination Vault. Example: `ocid1.vault.oc1..uniqueID` * `source_vault_id` - The OCID of the source Vault. Example: `ocid1.vault.oc1..uniqueID` @@ -383,6 +479,7 @@ The following attributes are exported: * `destination_nsg_id_list` - A list of OCIDs of network security groups (NSG) in the destination region which should be assigned to the source VNIC. Example: `[ ocid1.networksecuritygroup.oc1..uniqueID, ocid1.networksecuritygroup.oc1..uniqueID ]` * `destination_primary_private_ip_address` - The private IP address to be assigned as the VNIC's primary IP address in the destination subnet. This must be a valid IP address in the destination subnet and the IP address must be available. Example: `10.0.3.3` * `destination_primary_private_ip_hostname_label` - The hostname label to be assigned in the destination subnet for the primary private IP of the source VNIC. This label is the hostname portion of the private IP's fully qualified domain name (FQDN) (for example, 'myhost1' in the FQDN 'myhost1.subnet123.vcn1.oraclevcn.com'). Example: `myhost1` + * `destination_reserved_public_ip_id` - The OCID of the reserved public IP address to be assigned to the compute instance in the destination region. Example: `ocid1.publicip.oc1..uniqueID` * `destination_subnet_id` - The OCID of the destination subnet to which the source VNIC should connect. Example: `ocid1.subnet.oc1..uniqueID` * `source_vnic_id` - The OCID of the source VNIC. Example: `ocid1.vnic.oc1..uniqueID` * `peer_id` - The OCID of the peer DR protection group. Example: `ocid1.drprotectiongroup.oc1..uniqueID` diff --git a/website/docs/r/nosql_table.html.markdown b/website/docs/r/nosql_table.html.markdown index aa988210f9b..6a69de4a7e3 100644 --- a/website/docs/r/nosql_table.html.markdown +++ b/website/docs/r/nosql_table.html.markdown @@ -42,7 +42,7 @@ resource "oci_nosql_table" "test_table" { The following arguments are supported: * `compartment_id` - (Required) (Updatable) Compartment Identifier. -* `ddl_statement` - (Required) (Updatable) Complete CREATE TABLE DDL statement. When update ddl_statement, it should be ALTER TABLE DDL statement. +* `ddl_statement` - (Required) (Updatable) CREATE TABLE DDL statement. While updating an existing table, note that the column order should not be changed, and new columns can only be appended at the end of the table. * `defined_tags` - (Optional) (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace": {"bar-key": "value"}}` * `freeform_tags` - (Optional) (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` * `is_auto_reclaimable` - (Optional) True if table can be reclaimed after an idle period. diff --git a/website/docs/r/resource_scheduler_schedule.html.markdown b/website/docs/r/resource_scheduler_schedule.html.markdown index c7299c0000d..a8e0151415e 100644 --- a/website/docs/r/resource_scheduler_schedule.html.markdown +++ b/website/docs/r/resource_scheduler_schedule.html.markdown @@ -10,13 +10,57 @@ description: |- # oci_resource_scheduler_schedule This resource provides the Schedule resource in Oracle Cloud Infrastructure Resource Scheduler service. -Creates a Schedule +This API creates a schedule. You must provide either resources or resourceFilters. ## Example Usage ```hcl resource "oci_resource_scheduler_schedule" "test_schedule" { +<<<<<<< ours + #Required + action = var.schedule_action + compartment_id = var.compartment_id + recurrence_details = var.schedule_recurrence_details + recurrence_type = var.schedule_recurrence_type + + #Optional + defined_tags = {"Operations.CostCenter"= "42"} + description = var.schedule_description + display_name = var.schedule_display_name + freeform_tags = {"Department"= "Finance"} + resource_filters { + #Required + attribute = var.schedule_resource_filters_attribute + + #Optional + condition = var.schedule_resource_filters_condition + should_include_child_compartments = var.schedule_resource_filters_should_include_child_compartments + value { + + #Optional + namespace = var.schedule_resource_filters_value_namespace + tag_key = var.schedule_resource_filters_value_tag_key + value = var.schedule_resource_filters_value_value + } + } + resources { + #Required + id = var.schedule_resources_id + + #Optional + metadata = var.schedule_resources_metadata + parameters { + #Required + parameter_type = var.schedule_resources_parameters_parameter_type + + #Optional + value = var.schedule_resources_parameters_value + } + } + time_ends = var.schedule_time_ends + time_starts = var.schedule_time_starts +======= #Required action = var.schedule_action compartment_id = var.compartment_id @@ -54,6 +98,7 @@ resource "oci_resource_scheduler_schedule" "test_schedule" { freeform_tags = var.schedule_freeform_tags time_ends = var.schedule_time_ends time_starts = var.schedule_time_starts +>>>>>>> theirs } ``` @@ -62,10 +107,20 @@ resource "oci_resource_scheduler_schedule" "test_schedule" { The following arguments are supported: * `action` - (Required) (Updatable) This is the action that will be executed by the schedule. +<<<<<<< ours +* `compartment_id` - (Required) (Updatable) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which the schedule is created +* `defined_tags` - (Optional) (Updatable) These are defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}` +* `description` - (Optional) (Updatable) This is the description of the schedule. +* `display_name` - (Optional) (Updatable) This is a user-friendly name for the schedule. It does not have to be unique, and it's changeable. +* `freeform_tags` - (Optional) (Updatable) These are free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` +* `recurrence_details` - (Required) (Updatable) This is the frequency of recurrence of a schedule. The frequency field can either conform to RFC-5545 formatting or UNIX cron formatting for recurrences, based on the value specified by the recurrenceType field. +* `recurrence_type` - (Required) (Updatable) Type of recurrence of a schedule +======= * `compartment_id` - (Required) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which the schedule is created * `recurrence_type` - (Required) (Updatable) Type of recurrence of a schedule. Could be set to `ICAL`, `CRON` * `recurrence_details` - (Required) (Updatable) This is the frequency of recurrence of a schedule. The frequency field can either conform to RFC-5545 formatting or UNIX cron formatting for recurrences, based on the value specified by the recurrenceType field. Example: `FREQ=WEEKLY;BYDAY=MO,TU,WE,TH;BYHOUR=10;INTERVAL=1` +>>>>>>> theirs * `resource_filters` - (Optional) (Updatable) This is a list of resources filters. The schedule will be applied to resources matching all of them. * `attribute` - (Required) (Updatable) This is the resource attribute on which the threshold is defined. We support 5 different types of attributes: `DEFINED_TAGS`, `COMPARTMENT_ID`, `TIME_CREATED`, `LIFECYCLE_STATE` and `RESOURCE_TYPE`. * `value` - (Optional) (Updatable) This is a collection of resource filter values, different types of filter has different value format, see below: @@ -88,11 +143,20 @@ The following arguments are supported: * `id` - (Required) (Updatable) This is the resource OCID. * `metadata` - (Optional) (Updatable) This is additional information that helps to identity the resource for the schedule. +<<<<<<< ours + { "id": "" "metadata": { "namespaceName": "sampleNamespace", "bucketName": "sampleBucket" } } + * `parameters` - (Optional) (Updatable) This is the user input parameters to use when acting on the resource. + + { "parameters": [ { "parameterType": "BODY", "value": { "ip": "192.168.44.44", "memory": "1024", "synced_folders": [ { "host_path": "data/", "guest_path": "/var/www", "type": "default" } ], "forwarded_ports": [] } }, { "parameterType": "PATH", "value": { "compartmentId": "ocid1.compartment.oc1..xxxxx", "instanceId": "ocid1.vcn.oc1..yyyy" } }, { "parameterType": "QUERY", "value": { "limit": "10", "tenantId": "ocid1.tenant.oc1..zzzz" } }, { "parameterType": "HEADER", "value": { "token": "xxxx" } } ] } + * `parameter_type` - (Required) (Updatable) This is the parameter type on which the input parameter is defined + * `value` - (Optional) (Updatable) This is the HTTP request header value. +======= { "id": "" "metadata": { "namespaceName": "sampleNamespace", "bucketName": "sampleBucket" } } * `defined_tags` - (Optional) (Updatable) These are defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}` * `description` - (Optional) (Updatable) This is the description of the schedule. * `display_name` - (Optional) (Updatable) This is a user-friendly name for the schedule. It does not have to be unique, and it's changeable. * `freeform_tags` - (Optional) (Updatable) These are free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` +>>>>>>> theirs * `time_ends` - (Optional) (Updatable) This is the date and time the schedule ends, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339) Example: `2016-08-25T21:10:29.600Z` * `time_starts` - (Optional) (Updatable) This is the date and time the schedule starts, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339) Example: `2016-08-25T21:10:29.600Z` * `state` - (Optional) (Updatable) The target state for the Schedule. Could be set to `ACTIVE` or `INACTIVE`. @@ -112,6 +176,7 @@ The following attributes are exported: * `display_name` - This is a user-friendly name for the schedule. It does not have to be unique, and it's changeable. * `freeform_tags` - These are free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` * `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the schedule +* `last_run_status` - This is the status of the last work request. * `recurrence_details` - This is the frequency of recurrence of a schedule. The frequency field can either conform to RFC-5545 formatting or UNIX cron formatting for recurrences, based on the value specified by the recurrenceType field. * `recurrence_type` - Type of recurrence of a schedule * `resource_filters` - This is a list of resources filters. The schedule will be applied to resources matching all of them. @@ -127,6 +192,11 @@ The following attributes are exported: * `metadata` - This is additional information that helps to identity the resource for the schedule. { "id": "" "metadata": { "namespaceName": "sampleNamespace", "bucketName": "sampleBucket" } } + * `parameters` - This is the user input parameters to use when acting on the resource. + + { "parameters": [ { "parameterType": "BODY", "value": { "ip": "192.168.44.44", "memory": "1024", "synced_folders": [ { "host_path": "data/", "guest_path": "/var/www", "type": "default" } ], "forwarded_ports": [] } }, { "parameterType": "PATH", "value": { "compartmentId": "ocid1.compartment.oc1..xxxxx", "instanceId": "ocid1.vcn.oc1..yyyy" } }, { "parameterType": "QUERY", "value": { "limit": "10", "tenantId": "ocid1.tenant.oc1..zzzz" } }, { "parameterType": "HEADER", "value": { "token": "xxxx" } } ] } + * `parameter_type` - This is the parameter type on which the input parameter is defined + * `value` - This is the HTTP request header value. * `state` - This is the current state of a schedule. * `system_tags` - These are system tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"orcl-cloud.free-tier-retained": "true"}` * `time_created` - This is the date and time the schedule was created, in the format defined by [RFC 3339](https://tools.ietf.org/html/rfc3339). Example: `2016-08-25T21:10:29.600Z`