Skip to content

Commit aea3982

Browse files
Leonardo AguilarNishtha Goel
authored andcommitted
Added - Support for [DMS] Fixing AWS_S3 issue in the example file
1 parent 9ccb8fc commit aea3982

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

examples/databasemigration/migration/migration.tf

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,12 @@ resource "oci_database_migration_connection" "test_connection_target_usr_managed
241241
}
242242
}
243243

244+
variable "secret_access_key" {
245+
default = ""
246+
}
247+
variable "access_key_id" {
248+
default = ""
249+
}
244250
resource "oci_database_migration_migration" "test_migration" {
245251
compartment_id = var.compartment_id
246252

@@ -263,14 +269,14 @@ resource "oci_database_migration_migration" "test_migration" {
263269
}
264270
data_transfer_medium_details_v2 {
265271
type = "AWS_S3"
266-
access_key_id = "AKIA4XMMNYWWF4PYZ3EW"
272+
access_key_id = var.access_key_id
267273
object_storage_bucket {
268274
bucket = "bucket"
269275
namespace = "namespace"
270276
}
271277
name = "AWS-S3"
272278
region = "Ashburn"
273-
secret_access_key = "3xYJLMQkRDROe7/QzrZTgRDzeq2akfkn+Hb+C95D"
279+
secret_access_key = var.secret_access_key
274280
}
275281
datapump_settings {
276282
export_directory_object {
@@ -408,4 +414,4 @@ resource "oci_database_migration_migration" "test_no_ssh_migration" {
408414
output "password" {
409415
sensitive = true
410416
value = random_string.autonomous_database_admin_password.result
411-
}
417+
}

internal/service/database_migration/database_migration_migration_resource.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2310,7 +2310,13 @@ func (s *DatabaseMigrationMigrationResourceCrud) mapToUpdateDirectoryObject(fiel
23102310
result.Name = &tmp
23112311
}
23122312

2313-
if path, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "path")); ok {
2313+
/*if path, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "path")); ok {
2314+
tmp := path.(string)
2315+
result.Path = &tmp
2316+
}*/
2317+
2318+
path, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "path"))
2319+
if ok && s.D.HasChange("path") {
23142320
tmp := path.(string)
23152321
result.Path = &tmp
23162322
}

0 commit comments

Comments
 (0)