terraform-provider-heroku icon indicating copy to clipboard operation
terraform-provider-heroku copied to clipboard

Add support Heroku Private Spaces Logging for resource heroku_space and heroku_drain

Open jayal opened this issue 6 years ago • 5 comments

Heroku Private Spaces supports setting up a heroku drain for a space during space creation. This log drain can later be updated via heroku_drain.

Terraform Version

Terraform v0.11.14

Heroku Provider Version

Terraform v0.11.14
+ provider.heroku v2.0.1

Affected Resource(s)

Please list the resources as a list, for example:

  • heroku_space
  • heroku_drain

References

  • https://devcenter.heroku.com/articles/private-space-logging

jayal avatar Jun 25 '19 17:06 jayal

Unfortunately, the Platform API does not support passing this option as part of Private Space create method: https://devcenter.heroku.com/articles/platform-api-reference#space-create https://devcenter.heroku.com/articles/json-schema-for-platform-api

I'll look into if that's something that's been overlooked, or actually blocked somehow from becoming part of the generally available, documented Platform API.

mars avatar Jun 25 '19 18:06 mars

@mars any updates on this front? Working to setup a client who needs a private space with log draining and we'd rather not have to do it manually and then hook Terraform up after the fact

acorncom avatar Oct 21 '20 10:10 acorncom

Hi @acorncom,

I recently did an update to the heroku-go but unfortunately, the Platform API schema still does not have passing the log drain URL as an option.

I ended up spiking on an opinionated resource in my herokux provider that'll enable users to create a shield private space with logging enabled on creation.

Hope this helps.

davidji99 avatar Nov 05 '20 21:11 davidji99

@davidji99 thx much, that's quite helpful!

acorncom avatar Nov 16 '20 20:11 acorncom

It looks like Private Space creation does now support a log_drain_url: https://devcenter.heroku.com/articles/platform-api-reference#space-create

…and it's a writable option in the API schema: https://github.com/heroku/heroku-go/blob/master/v5/heroku.go#L3962

mars avatar Feb 14 '23 00:02 mars