Skip to content

Commit b130c36

Browse files
authored
Fix IP ACL read (#2515)
1 parent f53cc43 commit b130c36

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

access/resource_ip_access_list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func ResourceIPAccessList() *schema.Resource {
5353
if err != nil {
5454
return err
5555
}
56-
common.StructToData(status, s, d)
56+
common.StructToData(status.IpAccessList, s, d)
5757
return nil
5858
},
5959
Update: func(ctx context.Context, d *schema.ResourceData, c *common.DatabricksClient) error {

access/resource_ip_access_list_test.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ func TestIPACLRead(t *testing.T) {
205205
{
206206
Method: http.MethodGet,
207207
Resource: "/api/2.0/ip-access-lists/" + TestingId + "?",
208-
Response: settings.CreateIpAccessListResponse{
208+
Response: settings.FetchIpAccessListResponse{
209209
IpAccessList: &settings.IpAccessListInfo{
210210
ListId: TestingId,
211211
Label: TestingLabel,
@@ -221,11 +221,6 @@ func TestIPACLRead(t *testing.T) {
221221
},
222222
},
223223
},
224-
State: map[string]any{
225-
"label": TestingLabel,
226-
"list_type": TestingListTypeString,
227-
"ip_addresses": TestingIpAddressesState,
228-
},
229224
Resource: ResourceIPAccessList(),
230225
Read: true,
231226
New: true,

0 commit comments

Comments
 (0)