IP access list update returns INVALID_STATE

Problem

You are trying to update an IP access list and you get an INVALID_STATE error message.

{"error_code":"INVALID_STATE","message":"Your current IP 3.3.3.3 will not be allowed to access the workspace under current configuration"}

Cause

The IP access list update that you are trying to commit does not include your current public IP address. If your current IP address is not included in the access list, you are blocked from the environment.

If you assume that your current IP is 3.3.3.3, this example API call results in an INVALID_STATE error message.

curl -X POST -n \
  https://<databricks-instance>/api/2.0/ip-access-lists
  -d '{
    "label": "office",
    "list_type": "ALLOW",
    "ip_addresses": [
        "1.1.1.1",
        "2.2.2.2/21"
      ]
    }'
Illustration showing a failed IP access list update.

Solution

You must always include your current public IP address in the JSON file that is used to update the IP access list.

If you assume that your current IP is 3.3.3.3, this example API call results in a successful IP access list update.

curl -X POST -n \
  https://<databricks-instance>/api/2.0/ip-access-lists
  -d '{
    "label": "office",
    "list_type": "ALLOW",
    "ip_addresses": [
        "1.1.1.1",
        "2.2.2.2/21",
        "3.3.3.3"
      ]
    }'
Illustration showing a successful IP access list update.