Add JSON validation to the aws_iam_policy resource (#10239)
Although the aws_iam_policy has a problem of normalization (refs #8350), I think it would be useful simply to add JSON syntax validation. I wasted a lot of time with JSON syntax errors. Validate the aws_iam_policy using the validateJsonString helper.
This commit is contained in:
parent
4caf7e082d
commit
f85e0b7249
|
@ -32,8 +32,9 @@ func resourceAwsIamPolicy() *schema.Resource {
|
||||||
ForceNew: true,
|
ForceNew: true,
|
||||||
},
|
},
|
||||||
"policy": &schema.Schema{
|
"policy": &schema.Schema{
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Required: true,
|
Required: true,
|
||||||
|
ValidateFunc: validateJsonString,
|
||||||
},
|
},
|
||||||
"name": &schema.Schema{
|
"name": &schema.Schema{
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
|
|
Loading…
Reference in New Issue