Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(data-source): data.betteruptime_monitor returns duplicate error for multiple monitors with same URL #128

Open
1 of 3 tasks
asyrafnorafandi opened this issue Dec 12, 2024 · 0 comments

Comments

@asyrafnorafandi
Copy link

Issue Overview

data.betteruptime_monitor returns duplicate error for multiple monitors with same URL


Type of Issue

  • Bug Report
  • Feature Request
  • Documentation Issue

Terraform Version

Run terraform -version and paste the output here.

Terraform v1.9.8

Provider Version

BetterStackHQ/better-uptime v0.12.2

Reproduction Steps

  1. Create two monitors with the same URL

Configuration Snippet

data "betteruptime_monitor" "this" {
  url = "https://google.com"
}

Expected Behavior

It should return a map/list of monitors that match the URL filter


Actual Behavior

Error returned

data.betteruptime_monitor.this: Reading...
╷
│ Error: duplicate
│ 
│   with data.betteruptime_monitor.this,
│   on data.tf line 1, in data "betteruptime_monitor" "this":
│    1: data "betteruptime_monitor" "this" {
│ 
╵

Suggestion

  • Possible to create data.betteruptime_monitor to filter for other values aside from URL
  • Create another data source to fetch for multiple monitors with similar attributes data.betteruptime_monitors which returns a map of monitors
@asyrafnorafandi asyrafnorafandi changed the title data.betteruptime_monitor returns duplicate error for multiple monitors with same URL bug(data-source): data.betteruptime_monitor returns duplicate error for multiple monitors with same URL Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant