@@ -57,7 +57,7 @@ func resourceCloudStackNetworkACLRule() *schema.Resource {
5757 Optional : true ,
5858 Elem : & schema.Resource {
5959 Schema : map [string ]* schema.Schema {
60- "rule_id " : {
60+ "rule_number " : {
6161 Type : schema .TypeInt ,
6262 Optional : true ,
6363 Computed : true ,
@@ -210,7 +210,7 @@ func createNetworkACLRule(d *schema.ResourceData, meta interface{}, rule map[str
210210 p := cs .NetworkACL .NewCreateNetworkACLParams (rule ["protocol" ].(string ))
211211
212212 // 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 {
214214 p .SetNumber (ruleId )
215215 }
216216
@@ -644,12 +644,12 @@ func verifyNetworkACLParams(d *schema.ResourceData) error {
644644}
645645
646646func 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)
650650 if rId < 1 || rId > 65535 {
651651 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 )
653653 }
654654 }
655655 }
0 commit comments