@@ -57,7 +57,7 @@ func resourceCloudStackNetworkACLRule() *schema.Resource {
57
57
Optional : true ,
58
58
Elem : & schema.Resource {
59
59
Schema : map [string ]* schema.Schema {
60
- "rule_id " : {
60
+ "rule_number " : {
61
61
Type : schema .TypeInt ,
62
62
Optional : true ,
63
63
Computed : true ,
@@ -210,7 +210,7 @@ func createNetworkACLRule(d *schema.ResourceData, meta interface{}, rule map[str
210
210
p := cs .NetworkACL .NewCreateNetworkACLParams (rule ["protocol" ].(string ))
211
211
212
212
// If a rule ID is specified, set it
213
- if ruleId , ok := rule ["rule_id " ].(int ); ok && ruleId > 0 {
213
+ if ruleId , ok := rule ["rule_number " ].(int ); ok && ruleId > 0 {
214
214
p .SetNumber (ruleId )
215
215
}
216
216
@@ -644,12 +644,12 @@ func verifyNetworkACLParams(d *schema.ResourceData) error {
644
644
}
645
645
646
646
func verifyNetworkACLRuleParams (d * schema.ResourceData , rule map [string ]interface {}) error {
647
- if ruleId , ok := rule ["rule_id " ]; ok && ruleId != nil {
648
- if rId , ok := ruleId .(int ); ok && rId != 0 {
649
- // Validate only if rule_id is explicitly set (non-zero)
647
+ if ruleNum , ok := rule ["rule_number " ]; ok && ruleNum != nil {
648
+ if rId , ok := ruleNum .(int ); ok && rId != 0 {
649
+ // Validate only if rule_number is explicitly set (non-zero)
650
650
if rId < 1 || rId > 65535 {
651
651
return fmt .Errorf (
652
- "%q must be between %d and %d inclusive, got: %d" , "rule_id " , 1 , 65535 , rId )
652
+ "%q must be between %d and %d inclusive, got: %d" , "rule_number " , 1 , 65535 , rId )
653
653
}
654
654
}
655
655
}
0 commit comments