mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
aws: kms validation - Add missing placeholders for Errorf
This commit is contained in:
parent
5466d69450
commit
2b244e21bc
@ -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
|
||||||
},
|
},
|
||||||
|
@ -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
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user