File tree 3 files changed +18
-9
lines changed
internal/service/apigateway
3 files changed +18
-9
lines changed Original file line number Diff line number Diff line change
1
+ ```release-note:bug
2
+ resource/aws_api_gateway_rest_api: Improve refresh to avoid unnecessary diffs in `policy`
3
+ ```
4
+
5
+ ```release-note:bug
6
+ resource/aws_api_gateway_rest_api_policy: Improve refresh to avoid unnecessary diffs in `policy`
7
+ ```
Original file line number Diff line number Diff line change @@ -117,11 +117,12 @@ func ResourceRestAPI() *schema.Resource {
117
117
Elem : & schema.Schema {Type : schema .TypeString },
118
118
},
119
119
"policy" : {
120
- Type : schema .TypeString ,
121
- Optional : true ,
122
- Computed : true ,
123
- ValidateFunc : validation .StringIsJSON ,
124
- DiffSuppressFunc : verify .SuppressEquivalentPolicyDiffs ,
120
+ Type : schema .TypeString ,
121
+ Optional : true ,
122
+ Computed : true ,
123
+ ValidateFunc : validation .StringIsJSON ,
124
+ DiffSuppressFunc : verify .SuppressEquivalentPolicyDiffs ,
125
+ DiffSuppressOnRefresh : true ,
125
126
StateFunc : func (v interface {}) string {
126
127
json , _ := structure .NormalizeJsonString (v )
127
128
return json
Original file line number Diff line number Diff line change @@ -33,10 +33,11 @@ func ResourceRestAPIPolicy() *schema.Resource {
33
33
},
34
34
35
35
"policy" : {
36
- Type : schema .TypeString ,
37
- Required : true ,
38
- ValidateFunc : validation .StringIsJSON ,
39
- DiffSuppressFunc : verify .SuppressEquivalentPolicyDiffs ,
36
+ Type : schema .TypeString ,
37
+ Required : true ,
38
+ ValidateFunc : validation .StringIsJSON ,
39
+ DiffSuppressFunc : verify .SuppressEquivalentPolicyDiffs ,
40
+ DiffSuppressOnRefresh : true ,
40
41
StateFunc : func (v interface {}) string {
41
42
json , _ := structure .NormalizeJsonString (v )
42
43
return json
You can’t perform that action at this time.
0 commit comments