Skip to content

Commit 56d2bf7

Browse files
updated new parameters required for dsource linking
1 parent 4471991 commit 56d2bf7

File tree

2 files changed

+58
-14
lines changed

2 files changed

+58
-14
lines changed

examples/dsource/main.tf

Lines changed: 54 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,69 @@ provider "delphix" {
1717
host = "HOSTNAME"
1818
}
1919

20+
21+
2022
resource "delphix_appdata_dsource" "test_app_data_dsource" {
21-
source_id = "2-APPDATA_STAGED_SOURCE_CONFIG-2"
22-
group_id = "2-GROUP-1"
23+
source_id = "1-APPDATA_STAGED_SOURCE_CONFIG-6"
24+
group_id = "1-GROUP-1"
2325
log_sync_enabled = false
2426
make_current_account_owner = true
2527
link_type = "AppDataStaged"
26-
name = "test_app_data_dsource_ankit_patil"
27-
staging_mount_base = "200"
28+
name = "appdata_dsource"
29+
staging_mount_base = ""
2830
environment_user = "HOST_USER-2"
29-
staging_environment = "2-UNIX_HOST_ENVIRONMENT-2"
31+
staging_environment = "1-UNIX_HOST_ENVIRONMENT-2"
3032
parameters = jsonencode({
31-
postgresPort = 5432
33+
externalBackup : [],
34+
delphixInitiatedBackupFlag : true,
35+
delphixInitiatedBackup : [
36+
{
37+
userName : "delphix",
38+
postgresSourcePort : 5432,
39+
userPass : "delphix",
40+
sourceHostAddress : "rhel-86-7vgs-qar-105196-27a4593a.dlpxdc.co"
41+
}
42+
],
43+
singleDatabaseIngestionFlag : false,
44+
singleDatabaseIngestion : [],
45+
stagingPushFlag : false,
46+
postgresPort : 5433,
47+
configSettingsStg : [],
48+
mountLocation : "/tmp/delphix_mnt"
3249
})
3350
sync_parameters = jsonencode({
3451
resync = true
3552
})
3653
}
3754

55+
# Below are the 3 ways to link dsource with params , use any one of them
56+
# externalBackup: [
57+
# {
58+
# keepStagingInSync: false,
59+
# backupPath: "/var/tmp/backup",
60+
# walLogPath: "/var/tmp/backup"
61+
# }
62+
# ]
63+
64+
# singleDatabaseIngestion: [
65+
# {
66+
# databaseUserName: "postgres",
67+
# sourcePort: 5432,
68+
# dumpJobs: 2,
69+
# restoreJobs: 2,
70+
# databaseName: "abcd",
71+
# databaseUserPassword: "postgres",
72+
# dumpDir: "abcd",
73+
# sourceHost: "abcd",
74+
# postgresqlFile: "abcd"
75+
# }
76+
# ]
77+
78+
# delphixInitiatedBackup : [
79+
# {
80+
# userName : "delphix",
81+
# postgresSourcePort : 5432,
82+
# userPass : "delphix",
83+
# sourceHostAddress : "rhel-86-7vgs-qar-105196-27a4593a.dlpxdc.co"
84+
# }
85+
# ]

internal/provider/resource_appdata_dsource_test.go

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,10 @@ resource "delphix_appdata_dsource" "new_data_dsource" {
8383
make_current_account_owner = true
8484
link_type = "AppDataStaged"
8585
name = "%s"
86-
staging_mount_base = "200"
86+
staging_mount_base = ""
8787
environment_user = "%s"
8888
staging_environment = "%s"
89-
parameters = jsonencode({
90-
%s
91-
})
89+
parameters = jsonencode(%s)
9290
sync_parameters = jsonencode({
9391
resync = true
9492
})
@@ -105,12 +103,10 @@ resource "delphix_appdata_dsource" "new_data_dsource" {
105103
make_current_account_owner = true
106104
link_type = "AppDataStaged"
107105
name = "%s"
108-
staging_mount_base = "200"
106+
staging_mount_base = ""
109107
environment_user = "%s"
110108
staging_environment = "%s"
111-
parameters = jsonencode({
112-
%s
113-
})
109+
parameters = jsonencode(%s)
114110
sync_parameters = jsonencode({
115111
resync = true
116112
})

0 commit comments

Comments
 (0)