@Jason_Tran It makes sense that you’ve mentioned. I was playing around last March 9th with the API in order to create restore jobs via curl command from my local machine, (such as this interaction question from my side can proof it).
Was in that time when I had to enable API access list (not because the error with terraform runners - I was wrong, sorry - ) in order to allow my home IP address to execute the curl request to create restore jobs.
So after that when I executed my pipelines from terraform and github actions, indeed according to the three cases you’ve mentioned, that is why the system is requiring from me to allow the IPs ranges, because from that time my API Access list has been activated and with entries.
I am going to disable it, but now I have 1700 entries approx … Do you know how can I delete them in a bulk way via API?
I just found the example request to delete one entry
UPDATE:
@Jason_Tran It works now.
- I removed the access list entries I had with a loop like this
#!/bin/bash
ip_addresses=("13.64.0.0%2F16" "13.65.0.0%2F16" "...")
len=${#ip_addresses[@]}
for ((i=0; i<=$len; i++))
do
echo ${ip_addresses[$i]}
curl --user "{PUBLIC_KEY}:{PRIVATE_KEY}" --digest --include \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--request DELETE "https://cloud.mongodb.com/api/atlas/v1.0/orgs/{ORG_ID}/apiKeys/{API_KEY_ID}/accessList/${ip_addresses[$i]}"
done
- I toggled off atlas api access list from my organization settings and now terraform and Github actions runners are able to contact Mongo Atlas API. Thanks for the hints in this situation