Comments (2)
I'm not a huge fan of this kind of processing within the provider as it would not be transparent to user. So far we haven't had to modify user input to make it compliant to the API (as far as I can remember at least).
Additionally, if the Honeycomb API and UI start to support newlines (not unlikely imo) the behaviour from the provider would be annoying.
Does wrapping the string with trimspace
work? This should remove all spaces and newlines.
My preferred solutions in order:
- if this breaks the Honeycomb UI, the Honeycomb API should refuse this
- we should document a workaround (e.g. if
trimspace
works) - maybe we can show a Terraform warning if we detect newlines in the expression field
- we can add a validation rule to the expression field (but I'd like to avoid this as this will require a code change if the API changes)
from terraform-provider-honeycombio.
Thanks for your input.
- Honeycomb team is notified and has filed a bug
trimspace
does help- Documentation update: PR #83
An example of working terraform code:
resource "honeycombio_derived_column" "tmp_action" {
alias = "tmp_action"
dataset = var.dataset
description = "SLI: successful action"
expression = trimspace(<<EOT
IF(
REG_MATCH($request, `PATCH https://www.whatever.[a-z]+:443/gw/api/subscriptions/[0-9]+/bar?`),
AND(
OR(
STARTS_WITH($backend_status_code, "2"),
STARTS_WITH($backend_status_code, "3"),
STARTS_WITH($backend_status_code, "4")
),
LTE($backend_processing_time, 2)
)
)
EOT
)
}
from terraform-provider-honeycombio.
Related Issues (20)
- honeycombio_trigger example in docs fails at `terraform apply` due to time_range and frequency values
- adding `expand_json_depth` after creation causes drift HOT 1
- honeycombio_query_specification changes not picked up properly HOT 1
- Test issue for Asana
- Testing Asana integration
- honeycombio_dataset - add import support
- client: should escape any query params
- Changing recipient details for Slack type recipient in honeycombio_trigger causes 422 failure HOT 2
- PagerDuty notification recipients don't handle default computed value HOT 2
- Validate derived column expressions during the planning stage HOT 5
- Changing recipient details for Slack type recipient in honeycombio_burn_alert causes 422 failure HOT 1
- Add SLO Data source HOT 2
- Floating point rounding issues in 0.15.x HOT 3
- Expose threshold option to set number of triggers before sending an alert HOT 3
- Support pinning in the Honeycomb.io UI HOT 1
- Make `dataset` optional for the honeycomb_query resource HOT 4
- r/honeycombio_board: removing "graph_settings" from query does not set all values to false
- Legacy `HONEYCOMBIO_APIKEY` environment variable doesn't work anymore
- honeycombio_burn_alert > dynamic `recipient` "Value Conversion Error" HOT 5
- Add Sweepers for test cleanup
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-provider-honeycombio.