Comments (9)
Okay, I've quickly added schema.ImportStatePassthrough
and I can confirm importing boards works fine 👍🏻 I'll clean that up tomorrow and release it.
Importing triggers should also be possible, it will just a bit more implementation work because we need both the dataset and the ID.
from terraform-provider-honeycombio.
Yeah, that's right. It's something you have to explicitly enable/implement per resource.
Which resource would you like to import?
Since reading honeycombio_board
only requires an ID this can be implemented with schema.ImportStatePassthrough
.
Importing triggers is a bit more difficult since we need both the ID and the datasaet to retrieve the trigger.
from terraform-provider-honeycombio.
Which resource would you like to import?
Primarily interested in boards at the moment (that's the issue I ran into), was torn between opening per resource issues or a blanket one. I could see someone wanting to import a trigger, not really seeing a marker import use case.
Okay, I've quickly added schema.ImportStatePassthrough and I can confirm importing boards works fine 👍🏻 I'll clean that up tomorrow and release it.
Awesome, thanks
Importing triggers should also be possible, it will just a bit more implementation work because we need both the dataset and the ID.
Something like terraform import honeycombio_trigger.whatever <dataset>/<id>
?
from terraform-provider-honeycombio.
Primarily interested in boards at the moment (that's the issue I ran into), was torn between opening per resource issues or a blanket one. I could see someone wanting to import a trigger, not really seeing a marker import use case.
Agree. One issue for all imports is fine imo, we can add both implementations simultaneously.
Something like
terraform import honeycombio_trigger.whatever <dataset>/<id>
?
Yeah, but we have to keep in mind that /
is a valid character in a dataset name. I have a dataset named kvrhdn/terraform-provider-honeycombio
for example.
But we might be able to write a function that always uses the last /
in the string. I think we can assume an ID will only contain alphanumeric characters and especially no /
...
from terraform-provider-honeycombio.
Yeah, but we have to keep in mind that / is a valid character in a dataset name. I have a dataset named kvrhdn/terraform-provider-honeycombio for example.
Well that's interesting...
So I created a dataset called test/dataset
, and the url becomes <team>/datasets/test-dataset
.
If I try to create test-dataset
later, it appears to just be a noop.
anyways...
But we might be able to write a function that always uses the last / in the string. I think we can assume an ID will only contain alphanumeric characters and especially no /...
Yeah, that sounds reasonable
from terraform-provider-honeycombio.
Well that's interesting...
So I created a dataset called test/dataset, and the url becomes /datasets/test-dataset.If I try to create test-dataset later, it appears to just be a noop.
Yeah, that's also something I discovered: if you put the dataset in the URL, it has to be sanitized (replace /
by -
) but if you use it in the body it should stay the same...
go-honeycombio has a little extra logic for this when calling the markers and triggers API
https://github.com/kvrhdn/go-honeycombio/blob/main/client.go#L185
from terraform-provider-honeycombio.
All in all not a lot of work to implement this 😀
I'll add an importer to honeycombio_trigger
as well and make a new release tomorrow.
from terraform-provider-honeycombio.
sweet, thanks again
from terraform-provider-honeycombio.
Import has been implemented for boards and triggers! 🙂
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.