Skip to content

Commit

Permalink
Merge pull request #2153 from oracle/release_gh
Browse files Browse the repository at this point in the history
Releasing version 6.2.0
  • Loading branch information
ravinitp authored Jul 10, 2024
2 parents 41ab0c3 + 5f2ac33 commit 7cac9d9
Show file tree
Hide file tree
Showing 153 changed files with 626 additions and 125 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 6.2.0 (July 10, 2024)

### Added
- Support for Support Dynamic list of ZDM parameters for Oracle<>Oracle migrations
- Support for Shared Resources feature
### Bug Fix
- Update current_version_number on secret_content update

## 6.1.0 (July 02, 2024)

### Added
Expand Down
110 changes: 105 additions & 5 deletions examples/databasemigration/migration/migration.tf
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,14 @@ data "oci_database_migration_job" "test_job" {
job_id = var.jobId
}

data "oci_database_migration_agent" "test_agent" {
agent_id = "agentId"
}


variable "migration_id" {
default = ""
}
data "oci_database_migration_migrations" "test_migrations" {
#Required
compartment_id = var.compartment_id
migration_id = var.migration_id
}

data "oci_database_migration_job_advisor_report" "test_job_advisor_report" {
Expand All @@ -123,8 +124,43 @@ data "oci_database_migration_job_output" "test_job_output" {
data "oci_database_migration_migration_object_types" "test_migration_object_types" {
connection_type = "MYSQL"
}
variable "connection_string" {
default = ""
}
variable "nsg_ids" {
default = ""
}
resource "oci_database_migration_connection" "test_connection_rds_source" {
compartment_id = var.compartment_id
display_name = "TF_display_test_rds_source"
connection_type = "ORACLE"
key_id = var.kms_key_id
vault_id = var.kms_vault_id
connection_string = var.connection_string
password = "BEstrO0ng_#11"
technology_type = "AMAZON_RDS_ORACLE"
username = "ggfe"
nsg_ids = var.nsg_ids
replication_password="replicationPassword"
replication_username="replicationUsername"
}

data "oci_database_migration_agent_images" "test_agent_images" {}
variable "database_autonomous_id" {
default = ""
}
resource "oci_database_migration_connection" "test_connection_rds_target" {
compartment_id = var.compartment_id
display_name = "TF_display_test_rds_target"
connection_type = "ORACLE"
key_id = var.kms_key_id
vault_id = var.kms_vault_id
database_id = var.database_autonomous_id
password = "BEstrO0ng_#11"
technology_type = "OCI_AUTONOMOUS_DATABASE"
username = "ggfe"
replication_password="replicationPassword"
replication_username="replicationUsername"
}

resource "oci_database_migration_connection" "test_connection_target" {
compartment_id = var.compartment_id
Expand Down Expand Up @@ -200,6 +236,70 @@ resource "oci_database_migration_migration" "test_migration" {
display_name = "displayName"
}

resource "oci_database_migration_migration" "test_offline_migration" {
compartment_id = var.compartment_id
database_combination = "MYSQL"
source_database_connection_id = var.source_connection_mysql_id
target_database_connection_id = var.target_connection_mysql_id
type = "OFFLINE"
display_name = "displayName"
}

variable "source_connection_oracle_id" {
default = ""
}
variable "source_connection_container_oracle_id" {
default = ""
}
variable "target_connection_oracle_id" {
default = ""
}
variable "bucket_oracle_id" {
default = ""
}
resource "oci_database_migration_migration" "test_oracle_migration" {
compartment_id = var.compartment_id
database_combination = "ORACLE"
source_database_connection_id = var.source_connection_oracle_id
source_container_database_connection_id = var.source_connection_container_oracle_id
target_database_connection_id = var.target_connection_oracle_id
advanced_parameters {
data_type = "STRING"
name = "DATAPUMPSETTINGS_METADATAONLY"
value = "True"
}
data_transfer_medium_details {
type = "OBJECT_STORAGE"
object_storage_bucket {
bucket = var.bucket_oracle_id
namespace = "namespace"
}
}
type = "ONLINE"
display_name = "displayName"
}

resource "oci_database_migration_migration" "test_oracle_rds_migration" {
compartment_id = var.compartment_id
database_combination = "ORACLE"
source_database_connection_id = oci_database_migration_connection.test_connection_rds_source.id
target_database_connection_id = oci_database_migration_connection.test_connection_rds_target.id

data_transfer_medium_details {
type = "AWS_S3"
name = "rdsbucket"
region = "us-east-1"
secret_access_key = "12345/12345"
access_key_id = "12345"
object_storage_bucket {
bucket = var.bucket_oracle_id
namespace = "namespace"
}
}
type = "ONLINE"
display_name = "displayName"
}

output "password" {
sensitive = true
value = random_string.autonomous_database_admin_password.result
Expand Down
19 changes: 2 additions & 17 deletions examples/metering_computation/usage/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,12 @@
variable "tenancy_ocid" {
}

variable "user_ocid" {
}

variable "fingerprint" {
}

variable "private_key_path" {
}

variable "compartment_ocid" {
}

variable "region" {
}

provider "oci" {
region = var.region
tenancy_ocid = var.tenancy_ocid
user_ocid = var.user_ocid
fingerprint = var.fingerprint
private_key_path = var.private_key_path
auth = "SecurityToken"
config_file_profile = "terraform-federation-test"
}

variable "time_usage_ended" {
Expand Down
Binary file modified examples/zips/adm.zip
Binary file not shown.
Binary file modified examples/zips/aiAnomalyDetection.zip
Binary file not shown.
Binary file modified examples/zips/aiDocument.zip
Binary file not shown.
Binary file modified examples/zips/aiLanguage.zip
Binary file not shown.
Binary file modified examples/zips/aiVision.zip
Binary file not shown.
Binary file modified examples/zips/always_free.zip
Binary file not shown.
Binary file modified examples/zips/analytics.zip
Binary file not shown.
Binary file modified examples/zips/announcements_service.zip
Binary file not shown.
Binary file modified examples/zips/api_gateway.zip
Binary file not shown.
Binary file modified examples/zips/apm.zip
Binary file not shown.
Binary file modified examples/zips/appmgmt_control.zip
Binary file not shown.
Binary file modified examples/zips/artifacts.zip
Binary file not shown.
Binary file modified examples/zips/audit.zip
Binary file not shown.
Binary file modified examples/zips/autoscaling.zip
Binary file not shown.
Binary file modified examples/zips/bastion.zip
Binary file not shown.
Binary file modified examples/zips/big_data_service.zip
Binary file not shown.
Binary file modified examples/zips/blockchain.zip
Binary file not shown.
Binary file modified examples/zips/budget.zip
Binary file not shown.
Binary file modified examples/zips/capacity_management.zip
Binary file not shown.
Binary file modified examples/zips/certificatesManagement.zip
Binary file not shown.
Binary file modified examples/zips/cloudBridge.zip
Binary file not shown.
Binary file modified examples/zips/cloudMigrations.zip
Binary file not shown.
Binary file modified examples/zips/cloudguard.zip
Binary file not shown.
Binary file modified examples/zips/cluster_placement_groups.zip
Binary file not shown.
Binary file modified examples/zips/compute.zip
Binary file not shown.
Binary file modified examples/zips/computecloudatcustomer.zip
Binary file not shown.
Binary file modified examples/zips/computeinstanceagent.zip
Binary file not shown.
Binary file modified examples/zips/concepts.zip
Binary file not shown.
Binary file modified examples/zips/container_engine.zip
Binary file not shown.
Binary file modified examples/zips/container_instances.zip
Binary file not shown.
Binary file modified examples/zips/database.zip
Binary file not shown.
Binary file modified examples/zips/databaseTools.zip
Binary file not shown.
Binary file modified examples/zips/databasemanagement.zip
Binary file not shown.
Binary file modified examples/zips/databasemigration.zip
Binary file not shown.
Binary file modified examples/zips/datacatalog.zip
Binary file not shown.
Binary file modified examples/zips/dataflow.zip
Binary file not shown.
Binary file modified examples/zips/dataintegration.zip
Binary file not shown.
Binary file modified examples/zips/datalabeling.zip
Binary file not shown.
Binary file modified examples/zips/datasafe.zip
Binary file not shown.
Binary file modified examples/zips/datascience.zip
Binary file not shown.
Binary file modified examples/zips/demand_signal.zip
Binary file not shown.
Binary file modified examples/zips/devops.zip
Binary file not shown.
Binary file modified examples/zips/disaster_recovery.zip
Binary file not shown.
Binary file modified examples/zips/dns.zip
Binary file not shown.
Binary file modified examples/zips/em_warehouse.zip
Binary file not shown.
Binary file modified examples/zips/email.zip
Binary file not shown.
Binary file modified examples/zips/events.zip
Binary file not shown.
Binary file modified examples/zips/fast_connect.zip
Binary file not shown.
Binary file modified examples/zips/functions.zip
Binary file not shown.
Binary file modified examples/zips/fusionapps.zip
Binary file not shown.
Binary file modified examples/zips/generative_ai.zip
Binary file not shown.
Binary file modified examples/zips/goldengate.zip
Binary file not shown.
Binary file modified examples/zips/health_checks.zip
Binary file not shown.
Binary file modified examples/zips/id6.zip
Binary file not shown.
Binary file modified examples/zips/identity.zip
Binary file not shown.
Binary file modified examples/zips/identity_data_plane.zip
Binary file not shown.
Binary file modified examples/zips/identity_domains.zip
Binary file not shown.
Binary file modified examples/zips/integration.zip
Binary file not shown.
Binary file modified examples/zips/jms.zip
Binary file not shown.
Binary file modified examples/zips/jms_java_downloads.zip
Binary file not shown.
Binary file modified examples/zips/kms.zip
Binary file not shown.
Binary file modified examples/zips/license_manager.zip
Binary file not shown.
Binary file modified examples/zips/limits.zip
Binary file not shown.
Binary file modified examples/zips/load_balancer.zip
Binary file not shown.
Binary file modified examples/zips/log_analytics.zip
Binary file not shown.
Binary file modified examples/zips/logging.zip
Binary file not shown.
Binary file modified examples/zips/management_agent.zip
Binary file not shown.
Binary file modified examples/zips/management_dashboard.zip
Binary file not shown.
Binary file modified examples/zips/marketplace.zip
Binary file not shown.
Binary file modified examples/zips/media_services.zip
Binary file not shown.
Binary file modified examples/zips/metering_computation.zip
Binary file not shown.
Binary file modified examples/zips/monitoring.zip
Binary file not shown.
Binary file modified examples/zips/mysql.zip
Binary file not shown.
Binary file modified examples/zips/network_firewall.zip
Binary file not shown.
Binary file modified examples/zips/network_load_balancer.zip
Binary file not shown.
Binary file modified examples/zips/networking.zip
Binary file not shown.
Binary file modified examples/zips/nosql.zip
Binary file not shown.
Binary file modified examples/zips/notifications.zip
Binary file not shown.
Binary file modified examples/zips/object_storage.zip
Binary file not shown.
Binary file modified examples/zips/ocvp.zip
Binary file not shown.
Binary file modified examples/zips/onesubscription.zip
Binary file not shown.
Binary file modified examples/zips/opa.zip
Binary file not shown.
Binary file modified examples/zips/opensearch.zip
Binary file not shown.
Binary file modified examples/zips/operator_access_control.zip
Binary file not shown.
Binary file modified examples/zips/opsi.zip
Binary file not shown.
Binary file modified examples/zips/optimizer.zip
Binary file not shown.
Binary file modified examples/zips/oracle_cloud_vmware_solution.zip
Binary file not shown.
Binary file modified examples/zips/oracle_content_experience.zip
Binary file not shown.
Binary file modified examples/zips/oracle_digital_assistant.zip
Binary file not shown.
Binary file modified examples/zips/os_management_hub.zip
Binary file not shown.
Binary file modified examples/zips/osmanagement.zip
Binary file not shown.
Binary file modified examples/zips/osp_gateway.zip
Binary file not shown.
Binary file modified examples/zips/osub_billing_schedule.zip
Binary file not shown.
Binary file modified examples/zips/osub_organization_subscription.zip
Binary file not shown.
Binary file modified examples/zips/osub_subscription.zip
Binary file not shown.
Binary file modified examples/zips/osub_usage.zip
Binary file not shown.
Binary file modified examples/zips/pic.zip
Binary file not shown.
Binary file modified examples/zips/psql.zip
Binary file not shown.
Binary file modified examples/zips/queue.zip
Binary file not shown.
Binary file modified examples/zips/recovery.zip
Binary file not shown.
Binary file modified examples/zips/redis.zip
Binary file not shown.
Binary file modified examples/zips/resourcemanager.zip
Binary file not shown.
Binary file modified examples/zips/resourcescheduler.zip
Binary file not shown.
Binary file modified examples/zips/serviceManagerProxy.zip
Binary file not shown.
Binary file modified examples/zips/service_catalog.zip
Binary file not shown.
Binary file modified examples/zips/service_connector_hub.zip
Binary file not shown.
Binary file modified examples/zips/service_mesh.zip
Binary file not shown.
Binary file modified examples/zips/stack_monitoring.zip
Binary file not shown.
Binary file modified examples/zips/storage.zip
Binary file not shown.
Binary file modified examples/zips/streaming.zip
Binary file not shown.
Binary file modified examples/zips/usage_proxy.zip
Binary file not shown.
Binary file modified examples/zips/vault_secret.zip
Binary file not shown.
Binary file modified examples/zips/vbs_inst.zip
Binary file not shown.
Binary file modified examples/zips/visual_builder.zip
Binary file not shown.
Binary file modified examples/zips/vn_monitoring.zip
Binary file not shown.
Binary file modified examples/zips/vulnerability_scanning_service.zip
Binary file not shown.
Binary file modified examples/zips/web_app_acceleration.zip
Binary file not shown.
Binary file modified examples/zips/web_app_firewall.zip
Binary file not shown.
Binary file modified examples/zips/web_application_acceleration_and_security.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ require (
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/oklog/run v1.0.0 // indirect
github.com/oracle/oci-go-sdk/v65 v65.69.0
github.com/oracle/oci-go-sdk/v65 v65.69.1
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/sony/gobreaker v0.5.0 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQ
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/oracle/oci-go-sdk/v65 v65.69.0 h1:DbrRf5qcpwl7V3ixk6dxDYfHtOs3aMmlsHFld3oBjMk=
github.com/oracle/oci-go-sdk/v65 v65.69.0/go.mod h1:IBEV9l1qBzUpo7zgGaRUhbB05BVfcDGYRFBCPlTcPp0=
github.com/oracle/oci-go-sdk/v65 v65.69.1 h1:X3vNSw9tXOxML96L3wBxrK7cwESgP/H1IgR8rTH5Ab4=
github.com/oracle/oci-go-sdk/v65 v65.69.1/go.mod h1:IBEV9l1qBzUpo7zgGaRUhbB05BVfcDGYRFBCPlTcPp0=
github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4=
github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
Expand Down
4 changes: 2 additions & 2 deletions internal/globalvar/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"log"
)

const Version = "6.1.0"
const ReleaseDate = "2024-07-03"
const Version = "6.2.0"
const ReleaseDate = "2024-07-10"

func PrintVersion() {
log.Printf("[INFO] terraform-provider-oci %s\n", Version)
Expand Down
53 changes: 46 additions & 7 deletions internal/integrationtest/core_instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,12 @@ var (
"source_type": acctest.Representation{RepType: acctest.Required, Create: `bootVolume`},
"is_preserve_boot_volume_enabled": acctest.Representation{RepType: acctest.Optional, Create: `false`},
}
CoreInstanceSourceDetailsUpdateImageIdRepresentation = map[string]interface{}{
"source_id": acctest.Representation{RepType: acctest.Required, Create: `${var.InstanceImageOCIDShieldedCompatible[var.region]}`},
CoreInstanceSourceDetailsUpdateImageIdRequiredRepresentation = map[string]interface{}{
"source_id": acctest.Representation{RepType: acctest.Required, Create: `${var.InstanceImageOCIDShieldedCompatible[var.region]}`},
"source_type": acctest.Representation{RepType: acctest.Required, Create: `image`},
}
CoreInstanceSourceDetailsUpdateImageIdOptionalRepresentation = map[string]interface{}{
"source_id": acctest.Representation{RepType: acctest.Required, Create: `${var.InstanceImageOCID[var.region]}`},
"source_type": acctest.Representation{RepType: acctest.Required, Create: `image`},
"is_preserve_boot_volume_enabled": acctest.Representation{RepType: acctest.Optional, Create: `false`},
"kms_key_id": acctest.Representation{RepType: acctest.Optional, Create: `${lookup(data.oci_kms_keys.test_keys_dependency.keys[0], "id")}`},
Expand Down Expand Up @@ -2896,6 +2900,7 @@ func TestAccResourceCoreInstance_UpdateSourceDetails(t *testing.T) {

config := `
provider oci {
alias = "boot-volume-replacement"
test_time_maintenance_reboot_due = "2030-01-01 00:00:00"
}
` + acctest.CommonTestVariables()
Expand All @@ -2918,7 +2923,11 @@ func TestAccResourceCoreInstance_UpdateSourceDetails(t *testing.T) {
{
Config: acctest.ProviderTestConfig() + compartmentIdVariableStr + CoreInstanceBootVolumeSwapResourceDependencies +
acctest.GenerateResourceFromRepresentationMap("oci_core_instance", "test_instance", acctest.Optional, acctest.Create,
acctest.RepresentationCopyWithRemovedProperties(CoreInstanceRepresentation, []string{"dedicated_vm_host_id", "launch_options", "image"})),
acctest.RepresentationCopyWithRemovedProperties(
// SourceDetails w/o kms_key
acctest.GetUpdatedRepresentationCopy("source_details", acctest.RepresentationGroup{RepType: acctest.Required,
Group: instanceSourceDetailsSansKmsRepresentation}, CoreInstanceRepresentation),
[]string{"dedicated_vm_host_id", "launch_options", "image"})),
Check: acctest.ComposeAggregateTestCheckFuncWrapper(
resource.TestCheckResourceAttrSet(resourceName, "availability_domain"),
resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId),
Expand All @@ -2936,13 +2945,43 @@ func TestAccResourceCoreInstance_UpdateSourceDetails(t *testing.T) {
),
},

// Step 1: verify updates to existing source_details property does not destroy the resource - Update the imageId associated with source details
// Step 1: verify updates to existing source_details property does not destroy the resource - Update only imageId associated with source details
{
Config: config + compartmentIdVariableStr + CoreInstanceBootVolumeSwapResourceDependencies + utils.DefinedShieldedImageOCIDs +
acctest.GenerateResourceFromRepresentationMap("oci_core_instance", "test_instance", acctest.Optional, acctest.Create,
acctest.RepresentationCopyWithRemovedProperties(
acctest.GetUpdatedRepresentationCopy("source_details", acctest.RepresentationGroup{RepType: acctest.Optional, Group: CoreInstanceSourceDetailsUpdateImageIdRepresentation},
CoreInstanceRepresentation),
// Updating source_details with only required properties
acctest.GetUpdatedRepresentationCopy("source_details", acctest.RepresentationGroup{RepType: acctest.Required,
Group: CoreInstanceSourceDetailsUpdateImageIdRequiredRepresentation}, CoreInstanceRepresentation),
[]string{"dedicated_vm_host_id", "launch_options", "image"})),
Check: acctest.ComposeAggregateTestCheckFuncWrapper(
resource.TestCheckResourceAttrSet(resourceName, "availability_domain"),
resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId),
resource.TestCheckResourceAttr(resourceName, "shape", "VM.Standard2.1"),
resource.TestCheckResourceAttrSet(resourceName, "subnet_id"),
resource.TestCheckResourceAttr(resourceName, "source_details.#", "1"),
resource.TestCheckResourceAttrSet(resourceName, "source_details.0.source_id"),
resource.TestCheckResourceAttr(resourceName, "source_details.0.source_type", "image"),
resource.TestCheckResourceAttr(resourceName, "source_details.0.boot_volume_size_in_gbs", "60"),

func(s *terraform.State) (err error) {
resId2, err = acctest.FromInstanceState(s, resourceName, "id")
if resId != resId2 {
return fmt.Errorf("Resource recreated when it was supposed to be updated.")
}
return err
},
),
},

// Step 2: verify updates to all optional properties associated with source_details - kmsKey, bootVolumeSize etc.
{
Config: config + compartmentIdVariableStr + CoreInstanceBootVolumeSwapResourceDependencies + utils.DefinedShieldedImageOCIDs +
acctest.GenerateResourceFromRepresentationMap("oci_core_instance", "test_instance", acctest.Optional, acctest.Create,
acctest.RepresentationCopyWithRemovedProperties(
// Updating source_details with only required properties
acctest.GetUpdatedRepresentationCopy("source_details", acctest.RepresentationGroup{RepType: acctest.Optional,
Group: CoreInstanceSourceDetailsUpdateImageIdOptionalRepresentation}, CoreInstanceRepresentation),
[]string{"dedicated_vm_host_id", "launch_options", "image"})),
Check: acctest.ComposeAggregateTestCheckFuncWrapper(
resource.TestCheckResourceAttrSet(resourceName, "availability_domain"),
Expand All @@ -2965,7 +3004,7 @@ func TestAccResourceCoreInstance_UpdateSourceDetails(t *testing.T) {
),
},

// Step 2: verify updates to existing source_details property does not destroy the resource - Update the bootVolumeId associated with the source details
// Step 3: verify updates to existing source_details property does not destroy the resource - Update the bootVolumeId associated with the source details
{
Config: config + compartmentIdVariableStr + CoreInstanceBootVolumeSwapResourceDependencies +
acctest.GenerateResourceFromRepresentationMap("oci_core_instance", "test_instance", acctest.Optional, acctest.Create,
Expand Down
Loading

0 comments on commit 7cac9d9

Please sign in to comment.