Is there a curl resource type?



I’m assuming many of you come across the need to configure some object using an API and then using like an alpine image, apk add curl and jq etc and then storing what needs stored in outputs for further processing. Is there not a resource type already that does this stuff? Maybe one that you can write an on_failure condition for if you get a non-200 response?

Just checking… (lazy)



What you’ve described sounds like making an image to run a task in then saving the outputs of that task somewhere external. IMO it doesn’t really make sense to have a curl resource because resources are for getting/putting versioned things rather than for executing commands.


Yeah I see what you’re saying and I did do it that way initially. I’m tempted to create a resource type though based on a python. Something that I can give a yml that provides a list of the queries i’m interested in and provides a response with the results. Since I’m doing this kinda stuff enough it would be much simpler and more elegant. Anyhow thanks for the response. Will update if I get the time to follow through…


I’ve got something here: However, as @crsimmons mentioned, this isn’t really a versioned thing and is really more like executing a command. I created this “resource” mainly for notifications after a task completes successfully, and also needed access to the build metadata.


Agreeing with @crsimmons - I think this is another example that would benefit from


Thanks that’s interesting. I’m assuming that was before

was made available?


Ah yes, I guess I could have used that resource instead. However, I wanted to have a general HTTP resource that was easily configurable just for testing purposes at the time…