Skip to content

Commit fbe7c98

Browse files
author
Uddipaan Hazarika
committed
merged changes on appdata import
2 parents 3a1209b + 5f898da commit fbe7c98

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

internal/provider/commons.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ var updatableOracleDsourceKeys = map[string]bool{
112112
"ops_pre_log_sync": true,
113113
"ops_post_sync": true,
114114
"ignore_tag_changes": true,
115+
"rollback_on_failure": true,
115116
}
116117

117118
var updatableEnvKeys = map[string]bool{
@@ -151,4 +152,5 @@ var updatableAppdataDsourceKeys = map[string]bool{
151152
"ops_post_sync": true,
152153
"tags": true,
153154
"ignore_tag_changes": true,
155+
"rollback_on_failure": true,
154156
}

internal/provider/resource_appdata_dsource.go

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ func resourceAppdataDsource() *schema.Resource {
3636
"source_value": {
3737
Type: schema.TypeString,
3838
Optional: true,
39-
DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool {
40-
if old != new {
39+
DiffSuppressFunc: func(k, oldValue, newValue string, d *schema.ResourceData) bool {
40+
if oldValue != newValue {
4141
tflog.Info(context.Background(), "updating source_value is not allowed. plan changes are suppressed")
4242
}
4343
return d.Id() != ""
@@ -46,8 +46,8 @@ func resourceAppdataDsource() *schema.Resource {
4646
"group_id": {
4747
Type: schema.TypeString,
4848
Optional: true,
49-
DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool {
50-
if old != new {
49+
DiffSuppressFunc: func(k, oldValue, newValue string, d *schema.ResourceData) bool {
50+
if oldValue != newValue {
5151
tflog.Info(context.Background(), "updating group_id is not allowed. plan changes are suppressed")
5252
}
5353
return d.Id() != ""
@@ -78,6 +78,13 @@ func resourceAppdataDsource() *schema.Resource {
7878
"link_type": {
7979
Type: schema.TypeString,
8080
Optional: true,
81+
DiffSuppressFunc: func(k, oldValue, newValue string, d *schema.ResourceData) bool {
82+
tflog.Info(context.Background(), "In DiffSuppressFunc of link_type")
83+
if oldValue != newValue {
84+
tflog.Info(context.Background(), "updating link_type is not allowed. plan changes are suppressed")
85+
}
86+
return d.Id() != ""
87+
},
8188
},
8289
"staging_mount_base": {
8390
Type: schema.TypeString,
@@ -304,6 +311,12 @@ func resourceAppdataDsource() *schema.Resource {
304311
"sync_parameters": {
305312
Type: schema.TypeString,
306313
Optional: true,
314+
DiffSuppressFunc: func(k, oldValue, newValue string, d *schema.ResourceData) bool {
315+
if oldValue != newValue {
316+
tflog.Info(context.Background(), "updating sync_parameters is not allowed. plan changes are suppressed")
317+
}
318+
return d.Id() != ""
319+
},
307320
},
308321
// Output
309322
"id": {

0 commit comments

Comments
 (0)