Code cleanup
This commit is contained in:
parent
3977256c17
commit
902ca25f36
|
@ -320,15 +320,11 @@ func resourceAwsSecurityGroupIPPermGather(d *schema.ResourceData, permissions []
|
|||
ruleMap := make(map[string]map[string]interface{})
|
||||
for _, perm := range permissions {
|
||||
var fromPort, toPort int
|
||||
if perm.FromPort == nil {
|
||||
fromPort = 0
|
||||
} else {
|
||||
fromPort = *perm.FromPort
|
||||
if v := perm.FromPort; v != nil {
|
||||
fromPort = *v
|
||||
}
|
||||
if perm.ToPort == nil {
|
||||
toPort = 0
|
||||
} else {
|
||||
toPort = *perm.ToPort
|
||||
if v := perm.ToPort; v != nil {
|
||||
toPort = *v
|
||||
}
|
||||
|
||||
k := fmt.Sprintf("%s-%d-%d", *perm.IPProtocol, fromPort, toPort)
|
||||
|
|
Loading…
Reference in New Issue