Skip to content

Commit ce16570

Browse files
HUBS-2080 - changes to rename source_id to sourece_value as we support both id/name in input and persist the same source_value as user inout and keep the source_id as recieved from dct response
1 parent 2f9a77d commit ce16570

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

docs/resources/appdata_dsource.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ resource "delphix_appdata_dsource" "dsource_name" {
111111

112112
## Argument Reference
113113

114-
* `source_id` - (Required) Id of the source to link.
114+
* `source_value` - (Required) Id or Name of the source to link.
115115

116116
* `group_id` - (Required) Id of the dataset group where this dSource should belong to.
117117

examples/dsource/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ provider "delphix" {
1919

2020

2121
# resource "delphix_appdata_dsource" "test_app_data_dsource" {
22-
# source_id = "1-APPDATA_STAGED_SOURCE_CONFIG-6"
22+
# source_name = "1-APPDATA_STAGED_SOURCE_CONFIG-6"
2323
# group_id = "1-GROUP-1"
2424
# log_sync_enabled = false
2525
# make_current_account_owner = true
@@ -52,7 +52,7 @@ provider "delphix" {
5252
# }
5353

5454
resource "delphix_appdata_dsource" "test_app_data_dsource_second" {
55-
source_id = "1-APPDATA_STAGED_SOURCE_CONFIG-7"
55+
source_name = "1-APPDATA_STAGED_SOURCE_CONFIG-7"
5656
group_id = "1-GROUP-1"
5757
log_sync_enabled = false
5858
make_current_account_owner = true

internal/provider/resource_appdata_dsource.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func resourceAppdataDsource() *schema.Resource {
2525
Type: schema.TypeString,
2626
Optional: true,
2727
},
28-
"source_id": {
28+
"source_value": {
2929
Type: schema.TypeString,
3030
Required: true,
3131
},
@@ -250,6 +250,10 @@ func resourceAppdataDsource() *schema.Resource {
250250
Type: schema.TypeString,
251251
Computed: true,
252252
},
253+
"source_id": {
254+
Type: schema.TypeString,
255+
Computed: true,
256+
},
253257
"database_type": {
254258
Type: schema.TypeString,
255259
Computed: true,
@@ -390,7 +394,7 @@ func resourceAppdataDsourceCreate(ctx context.Context, d *schema.ResourceData, m
390394
if v, has_v := d.GetOk("name"); has_v {
391395
appDataDSourceLinkSourceParameters.SetName(v.(string))
392396
}
393-
if v, has_v := d.GetOk("source_id"); has_v {
397+
if v, has_v := d.GetOk("source_value"); has_v {
394398
appDataDSourceLinkSourceParameters.SetSourceId(v.(string))
395399
}
396400
if v, has_v := d.GetOk("group_id"); has_v {

0 commit comments

Comments
 (0)