If I get some time I might implement this. It would be great to be able to add Papertrail systems and be able to add them as drains on a heroku app.
/cc @leonsodhi
Agreed, it would be good to see a Papertrail provider, generally. That way people outside of Heroku can utilize it too.
However, the Heroku provider supports addons, so you can do this now:
resource "heroku_app" "foobar" {
name = "terraform-test-app"
config_vars {
foo = "bar"
}
}
resource "heroku_addon" "foobar" {
app = "${heroku_app.foobar.name}"
plan = "papertrail:choklad"
}
output "url" {
value = "${heroku_addon.foobar.config_vars.0}=${heroku_app.foobar.config_vars.0.PAPERTRAIL_API_TOKEN}"
}
Then, on subsequent apply. (Won't be on the first one, see #99)
$ terraform apply
heroku_app.foobar: Refreshing state... (ID: terraform-test-app)
heroku_addon.foobar: Refreshing state... (ID: b4e40050-1d26-4e6d-8c08-910b968e7c62)
Apply complete! Resources: 0 added, 0 changed, 0 destroyed.
Outputs:
url = PAPERTRAIL_API_TOKEN=w8jeiQ8RAw0bLlfasdfasf
Just though that was super cool and mention it. Not 100% smooth at the moment but shows some of the power of Terraform!
Oh, if it wasn't obvious, I was trying to demonstrate how you could provision a papertrail addon for use _outside_ of Heroku. Kind of cool. :smile:
Thanks for the CC, @ejholmes. I've bumped the internal issue we have open to provide a log destination API to create ports for Heroku apps. Will follow up here and/or in the ticket raised a while back if anything happens.
@ejholmes did you ever get a spike of this started?
Nope. Not using papertrail or terraform atm :)
We'd welcome any PRs w/ Papertrail support, but we don't have any plans as a core team to work on the feature, so closing this for now.
This would be so good. @mubeta06 can you build?
@phinze I have worked on this, Here is the first implementation https://github.com/oogway/terraform-provider-papertrail
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
@phinze I have worked on this, Here is the first implementation https://github.com/oogway/terraform-provider-papertrail