Open jacobdotcosta opened 1 year ago
As the API of Godaddy is not too complex - see doc, we could also using curl or similar tool to create/delete/get a DNS record
YOUR_IP_ADDRESS=10.0.215.34
YOUR_DOMAIN_NAME="snowdrop.dev"
YOUR_NAME="console2-openshift-console.apps.ocp"
TYPE="A"
payload="
[{
\"data\": \"$YOUR_IP_ADDRESS\",
\"ttl\": 600
}]"
curl -X DELETE -H "Authorization: sso-key ${YOUR_API_KEY}:${YOUR_API_SECRET}" \
-H "Content-Type: application/json" \
"https://api.godaddy.com/v1/domains/${YOUR_DOMAIN_NAME}/records/${TYPE}/${YOUR_NAME}"
curl -X PUT -H "Authorization: sso-key ${YOUR_API_KEY}:${YOUR_API_SECRET}" \
-H "Content-Type: application/json" \
-d "$payload" \
"https://api.godaddy.com/v1/domains/${YOUR_DOMAIN_NAME}/records/${TYPE}/${YOUR_NAME}"
curl -X GET -H "Authorization: sso-key ${YOUR_API_KEY}:${YOUR_API_SECRET}" \
-H "Content-Type: application/json" \
"https://api.godaddy.com/v1/domains/${YOUR_DOMAIN_NAME}/records/${TYPE}/${YOUR_NAME}"
TODO
Subsequent additional tasks