Skip to content

Commit 5569e5a

Browse files
committed
fix
1 parent 199eab8 commit 5569e5a

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

docs/data-sources/lb_acls.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,5 @@ In addition to all arguments above, the following attributes are exported:
5454
- `http_filter` - The HTTP filter to match.
5555
- `http_filter_value` - The possible values to match for a given HTTP filter.
5656
- `http_filter_option` - A list of possible values for the HTTP filter based on the HTTP header.
57-
- `invert` - The condition will be of type "unless" if invert is set to `true`
57+
- `invert` - The condition will be of type "unless" if invert is set to `true`
58+
- `ips_edge_services` - Defines whether Edge Services IPs should be matched.

internal/services/lb/acl.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ func ResourceACL() *schema.Resource {
110110
Optional: true,
111111
Description: "A list of IPs or CIDR v4/v6 addresses of the client of the session to match",
112112
DiffSuppressFunc: diffSuppressFunc32SubnetMask,
113-
ConflictsWith: []string{"ips_edge_services"},
114113
},
115114
"http_filter": {
116115
Type: schema.TypeString,
@@ -138,10 +137,9 @@ func ResourceACL() *schema.Resource {
138137
Description: `If set to true, the condition will be of type "unless"`,
139138
},
140139
"ips_edge_services": {
141-
Type: schema.TypeBool,
142-
Optional: true,
143-
Description: `Defines whether Edge Services IPs should be matched`,
144-
ConflictsWith: []string{"ip_subnet"},
140+
Type: schema.TypeBool,
141+
Optional: true,
142+
Description: `Defines whether Edge Services IPs should be matched`,
145143
},
146144
},
147145
},

internal/services/lb/types.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,12 @@ func expandLbACLMatch(d *schema.ResourceData, raw any) *lb.ACLMatch {
9898
ipSubnetConfigured := isIPSubnetConfigured(d)
9999

100100
var ipSubnet []*string
101-
if ipsEdgeServices {
101+
switch {
102+
case ipsEdgeServices:
102103
ipSubnet = nil
103-
} else if ipSubnetConfigured {
104+
case ipSubnetConfigured:
104105
ipSubnet = types.ExpandSliceStringPtr(rawMap["ip_subnet"].([]any))
105-
} else {
106+
default:
106107
ipSubnet = []*string{types.ExpandStringPtr("0.0.0.0/0")}
107108
}
108109

0 commit comments

Comments
 (0)