vexxhost / terraform-provider-uptimerobot

A terraform provider for UptimeRobot
Mozilla Public License 2.0
30 stars 16 forks source link

Cant retrieve default alert contact by email #27

Open gonzalob opened 6 days ago

gonzalob commented 6 days ago

Trying to find the default alert contract by using the account's email address (as defined in the readme file) fails with [exec] │ Error: failed to find alert contact by name

Browsing through the source, https://github.com/vexxhost/terraform-provider-uptimerobot/blob/master/internal/provider/data_source_uptimerobot_alert_contact.go tries to find its details by matching the friendly_name API attribute, but it comes back empty when querying (details hidden for privacy):

curl -X POST https://api.uptimerobot.com/v2/getAlertContacts -d api_key=${API_KEY}
{"stat":"ok","offset":0,"limit":50,"total":1,"alert_contacts":[{"id":"<...>","friendly_name":"","type":2,"status":2,"value":"<...>"}]}%