mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Add JSON validation to the aws_sqs_queue resource.
This commit adds support for new helper function which is used to normalise and validate JSON string. Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
This commit is contained in:
parent
5697a52b4f
commit
538327b61f
@ -73,13 +73,18 @@ func resourceAwsSqsQueue() *schema.Resource {
|
|||||||
"policy": {
|
"policy": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs,
|
|
||||||
Computed: true,
|
Computed: true,
|
||||||
|
ValidateFunc: validateJsonString,
|
||||||
|
DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs,
|
||||||
},
|
},
|
||||||
"redrive_policy": {
|
"redrive_policy": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
StateFunc: normalizeJson,
|
ValidateFunc: validateJsonString,
|
||||||
|
StateFunc: func(v interface{}) string {
|
||||||
|
json, _ := normalizeJsonString(v)
|
||||||
|
return json
|
||||||
|
},
|
||||||
},
|
},
|
||||||
"arn": {
|
"arn": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
|
Loading…
Reference in New Issue
Block a user