Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

uptimerobot_alert_contact isn't outputting id #23

Closed
tcarrondo opened this issue Apr 1, 2019 · 8 comments
Closed

uptimerobot_alert_contact isn't outputting id #23

tcarrondo opened this issue Apr 1, 2019 · 8 comments

Comments

@tcarrondo
Copy link

The resource uptimerobot_alert_contact isn't outputting id.

@tcarrondo
Copy link
Author

tcarrondo commented Apr 1, 2019

this makes impossible to:

alert_contact {
    id = "${resource.uptimerobot_alert_contact.slack.id}"
    # threshold  = 0  # pro only
    # recurrence = 0  # pro only
  }

@drubin
Copy link
Contributor

drubin commented Apr 5, 2019

You should not have resource. in your example. It should be "${uptimerobot_alert_contact.slack.id}"

Here is a full example we use in our tests
From https://github.com/louy/terraform-provider-uptimerobot/blob/master/uptimerobot/resource_uptimerobot_monitor_test.go#L130-L144

resource "uptimerobot_alert_contact" "test" {
  friendly_name = "#infrastructure"
  type = "slack"
  value = "https://slack.com/services/xxxx"
}
resource "uptimerobot_monitor" "test" {
  friendly_name = "%s"
  type          = "%s"
  url           = "%s"
  alert_contact {
    id         = "${uptimerobot_alert_contact.test.id}"
    threshold  = 0
    recurrence = 0
  }
}

@tcarrondo
Copy link
Author

My bad! thanks for the hint!

@drubin
Copy link
Contributor

drubin commented Apr 5, 2019

@tcarrondo Thought I fixed this ages ago... I noticed it a while ago.

Here is a PR fixing the issue. Hopefully it will help others.

#24

@louy
Copy link
Owner

louy commented Aug 20, 2019

@all-contributors please add @drubin for answering questions

@allcontributors
Copy link
Contributor

@louy

I've put up a pull request to add @drubin! 🎉

@louy
Copy link
Owner

louy commented Aug 20, 2019

@all-contributors please add @tcarrondo for bug report

@allcontributors
Copy link
Contributor

@louy

I've put up a pull request to add @tcarrondo! 🎉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants