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

Change monitor element schema to TypeString #154

Merged
merged 1 commit into from
May 14, 2019

Conversation

mnaboka
Copy link
Contributor

@mnaboka mnaboka commented Feb 22, 2019

The element type is set to schema.TypeInt, which does not allow us to
do interpolation. By changing this type to string all seem to work
correctly.

Our terraform configuration

monitor {
  id = "${module.poller_latency.id}"
}

The error we are seeing is this:

widget.0.monitor (id): cannot parse '' as int: strconv.ParseInt: parsing "${module.poller_latency.id}": invalid syntax

Feel free to close this PR if this is a not relevant / breaking change, i could be missing context here.

The element type is set to `schema.TypeInt`, which does not allow us to
do interpolation. By changing this type to string all seem to work
correctly.

Our terraform configuration
```
monitor {
  id = "${module.poller_latency.id}"
}
```

The error we are seeing is this:
```
widget.0.monitor (id): cannot parse '' as int: strconv.ParseInt: parsing "${module.poller_latency.id}": invalid syntax
```
@ghost ghost added the size/XS label Feb 22, 2019
@bkabrda
Copy link
Contributor

bkabrda commented May 14, 2019

This PR seem to be correct. Testing locally without your PR, I can't even use a literal int as id, as the code in buildWidgets expects it to be a string and that causes Terraform to crash. I don't see how anyone could actually be using this, hence I don't see a possibility to break backwards compatibility. Using your PR makes everything work, so I'm merging it.

Thanks a lot for submitting!

@bkabrda bkabrda merged commit 1916546 into DataDog:master May 14, 2019
jbenais pushed a commit to jbenais/terraform-provider-datadog that referenced this pull request Aug 20, 2019
…ring

Change monitor element schema to TypeString
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants