aws: kms validation - Add missing placeholders for Errorf

This commit is contained in:
Radek Simko 2015-11-14 20:28:19 +00:00 committed by Radek Simko
parent 5466d69450
commit 2b244e21bc
2 changed files with 3 additions and 3 deletions

View File

@ -31,7 +31,7 @@ func resourceAwsKmsAlias() *schema.Resource {
value := v.(string) value := v.(string)
if !regexp.MustCompile(`^(alias\/)[a-zA-Z0-9:/_-]+$`).MatchString(value) { if !regexp.MustCompile(`^(alias\/)[a-zA-Z0-9:/_-]+$`).MatchString(value) {
es = append(es, fmt.Errorf( es = append(es, fmt.Errorf(
"name must begin with 'alias/' and be comprised of only [a-zA-Z0-9:/_-]", k)) "%q must begin with 'alias/' and be comprised of only [a-zA-Z0-9:/_-]", k))
} }
return return
}, },

View File

@ -40,7 +40,7 @@ func resourceAwsKmsKey() *schema.Resource {
value := v.(string) value := v.(string)
if !(value == "ENCRYPT_DECRYPT" || value == "") { if !(value == "ENCRYPT_DECRYPT" || value == "") {
es = append(es, fmt.Errorf( es = append(es, fmt.Errorf(
"key_usage must be ENCRYPT_DECRYPT or not specified")) "%q must be ENCRYPT_DECRYPT or not specified", k))
} }
return return
}, },
@ -57,7 +57,7 @@ func resourceAwsKmsKey() *schema.Resource {
value := v.(int) value := v.(int)
if value > 30 || value < 7 { if value > 30 || value < 7 {
es = append(es, fmt.Errorf( es = append(es, fmt.Errorf(
"deletion window must be between 7 and 30 days inclusive")) "%q must be between 7 and 30 days inclusive", k))
} }
return return
}, },