Skip to content

Commit 1109d3f

Browse files
minor updates
1 parent e138db3 commit 1109d3f

File tree

3 files changed

+7
-13
lines changed

3 files changed

+7
-13
lines changed

docs/resources/appdata_dsource.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ In Delphix terminology, a dSource is a database that the Delphix Continuous Data
44
A dSource is created and managed by the Delphix Continuous Data Engine.
55

66

7-
The appdata dSource resource allows Terraform to apply and destroy Delphix dSources.
7+
The appdata dSource resource allows Terraform to CREATE,READ and DELETE dSources.
88
Modification of existing appdata dSource resources is not supported. All supported parameters are listed below
99

1010
## Example Usage
11-
Appdata dSource linking can be done in 3 methods , the parameters for these methods wary based on the linking mechanism to be used.
11+
Appdata dSource linking can be done in 3 methods,the parameters for these methods wary based on the linking mechanism to be used.
1212

1313
```hcl
1414
# Link dSource using external backup.
@@ -137,7 +137,7 @@ resource "delphix_appdata_dsource" "dsource_name" {
137137

138138
* `ops_pre_sync` - (Optional) Operations to perform before syncing the created dSource. These operations can quiesce any data prior to syncing
139139
* `name` - Name of the hook
140-
* `command` - (Required)Command to be executed
140+
* `command` - Command to be executed
141141
* `shell` - Type of shell. Valid values are `[bash, shell, expect, ps, psd]`
142142
* `credentials_env_vars` - List of environment variables that will contain credentials for this operation
143143
* `base_var_name` - Base name of the environment variables. Variables are named by appending '_USER', '_PASSWORD', '_PUBKEY' and '_PRIVKEY' to this base name, respectively. Variables whose values are not entered or are not present in the type of credential or vault selected, will not be set.
@@ -154,7 +154,7 @@ resource "delphix_appdata_dsource" "dsource_name" {
154154

155155
* `ops_post_sync` - (Optional) Operations to perform after syncing a created dSource.
156156
* `name` - Name of the hook
157-
* `command` - (Required)Command to be executed
157+
* `command` - Command to be executed
158158
* `shell` - Type of shell. Valid values are `[bash, shell, expect, ps, psd]`
159159
* `credentials_env_vars` - List of environment variables that will contain credentials for this operation
160160
* `base_var_name` - Base name of the environment variables. Variables are named by appending '_USER', '_PASSWORD', '_PUBKEY' and '_PRIVKEY' to this base name, respectively. Variables whose values are not entered or are not present in the type of credential or vault selected, will not be set.

internal/provider/resource_appdata_dsource.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ func resourceAppdataDsourceCreate(ctx context.Context, d *schema.ResourceData, m
457457

458458
job_res, job_err := PollJobStatus(*apiRes.Job.Id, ctx, client)
459459
if job_err != "" {
460-
ErrorLog.Printf("Job Polling failed but continuing with provisioning. Error: %s", job_err)
460+
ErrorLog.Printf("Job Polling failed but continuing with dSource creation. Error: %s", job_err)
461461
}
462462

463463
InfoLog.Printf("Job result is %s", job_res)
@@ -535,7 +535,6 @@ func resourceAppdataDsourceUpdate(ctx context.Context, d *schema.ResourceData, m
535535
changedKeys = append(changedKeys, k)
536536
}
537537
}
538-
539538
// revert and set the old value to the changed keys
540539
for _, key := range changedKeys {
541540
old, _ := d.GetChange(key)

internal/provider/resource_appdata_dsource_test.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@ func TestDsource_create_positive(t *testing.T) {
2727
CheckDestroy: testDsourceDestroy,
2828
Steps: []resource.TestStep{
2929
{
30-
Config: testDsourceBasic(sourceId, groupId, name, environmentUser, stagingEnvironment, ""),
31-
// Check: resource.ComposeTestCheckFunc(
32-
// testDsourceExists("delphix_appdata_dsource.new_data_dsource", sourceId),
33-
// resource.TestCheckResourceAttr("delphix_appdata_dsource.new_data_dsource", "source_id", sourceId)),
30+
Config: testDsourceBasic(sourceId, groupId, name, environmentUser, stagingEnvironment, ""),
3431
ExpectError: regexp.MustCompile(`.*`),
3532
},
3633
{
@@ -41,9 +38,7 @@ func TestDsource_create_positive(t *testing.T) {
4138
},
4239
{
4340
Config: testDsourceUpdate(sourceId, groupId, "update_same_dsource", environmentUser, stagingEnvironment, postgresPort),
44-
// Check: resource.ComposeTestCheckFunc(
45-
// testDsourceExists("delphix_appdata_dsource.new_data_dsource", sourceId)),
46-
Check: resource.ComposeAggregateTestCheckFunc(
41+
Check: resource.ComposeAggregateTestCheckFunc(
4742
// irrelevant
4843
),
4944
ExpectError: regexp.MustCompile(`.*`),

0 commit comments

Comments
 (0)