Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manage extension configuration as plain JSON #22

Merged
merged 1 commit into from
Aug 14, 2018

Conversation

pdecat
Copy link
Contributor

@pdecat pdecat commented May 9, 2018

This allows to manage the configuration of extensions.

I've got an example here with Slack extension: https://github.com/pdecat/terraform-provider-pagerduty/commit/ed531c38b45898a21e41f97289f46b18acd92a3d#diff-88dbff91359cd2b53c89698836a283cbR182
Note: OAuth authorization still needs be done by hand.

I'm prepping a PR for the terraform part.

@pdecat pdecat force-pushed the f-extension-config branch from fd4f61a to a20469e Compare May 31, 2018 22:11
Copy link
Owner

@heimweh heimweh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @pdecat,

thanks for this. LGTM 👍

@heimweh heimweh merged commit 50c2611 into heimweh:master Aug 14, 2018
@pdecat pdecat deleted the f-extension-config branch August 14, 2018 14:43
@pdecat
Copy link
Contributor Author

pdecat commented Aug 14, 2018

Hi @heimweh , thanks!

Note that the travis build of master failed with the following error:

go get -u honnef.co/go/tools/cmd/gosimple
# honnef.co/go/tools/lint/lintutil
../../../honnef.co/go/tools/lint/lintutil/util.go:273: undefined: types.SizesFor
make: *** [tools] Error 2

cf. https://travis-ci.org/heimweh/go-pagerduty/builds/415930357

It probably requires a more recent version of golang as 1.8 does not support it.

golang/go#19545

@heimweh
Copy link
Owner

heimweh commented Aug 14, 2018

Hi @pdecat, thanks! should be fixed now.

heimweh pushed a commit to PagerDuty/terraform-provider-pagerduty that referenced this pull request Aug 16, 2018
* Update go-pagerduty from github.com/pdecat/go-pagerduty fork's f-extension-config branch:
    govendor fetch github.com/heimweh/go-pagerduty/pagerduty::github.com/pdecat/go-pagerduty/pagerduty@=f-extension-config

* Manage extension configuration as plain JSON

* Add github.com/hashicorp/terraform/helper/validation dependencies

* Update vendored go-pagerduty dependency now that heimweh/go-pagerduty#22 is merged

* Replace custom json diff with terraform's structure.SuppressJsonDiff()

* Check extension config is set before trying to unmarshall it

* Document the service extension config field

* Fix indentation

* Fix storage of the JSON data returned by the API
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants