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.
pull/10300/head
Masayuki Morita 10 years ago committed by Paul Stack
parent 4caf7e082d
commit f85e0b7249

@ -32,8 +32,9 @@ func resourceAwsIamPolicy() *schema.Resource {
ForceNew: true,
},
"policy": &schema.Schema{
Type: schema.TypeString,
Required: true,
Type: schema.TypeString,
Required: true,
ValidateFunc: validateJsonString,
},
"name": &schema.Schema{
Type: schema.TypeString,

Loading…
Cancel
Save