fix(region): security group rule create (#20695)

This commit is contained in:
屈轩
2024-07-01 11:31:38 +08:00
committed by GitHub
parent e4fff38c43
commit a6834fe8ae
6 changed files with 13 additions and 4 deletions
@@ -83,6 +83,9 @@ func (self *SecurityGroupRuleCreateTask) OnInit(ctx context.Context, obj db.ISta
CIDR: rule.CIDR,
Action: secrules.TSecurityRuleAction(rule.Action),
}
if len(opts.CIDR) == 0 {
opts.CIDR = "0.0.0.0/0"
}
iRule, err := iGroup.CreateRule(opts)
if err != nil {