Yelp / terraform-provider-signalform

SignalForm is a terraform provider to codify SignalFx detectors, charts and dashboards
Apache License 2.0
44 stars 26 forks source link
go golang signalfx terraform terraform-provider

terraform-provider-signalform

GitHub version Build Status License

SignalForm is a terraform provider to codify SignalFx detectors, charts and dashboards, thereby making it easier to create, manage and version control them.

Signalform is not an official SignalFx product, so we do not guarantee a 1:1 mapping between the SignalFx API and the functionalities offered by the provider.

Please note that this provider is tested against Terraform 0.10. We do not guarantee that the provider works correctly with any other version of Terraform, even though it might.

Documentation is available here.

Changelog is available here.

Build And Install

Build binary from source

To build the go binary from source:

make build

The output binary will be placed in the bin/ folder.

The default platform target is linux-amd64. If you want to customize your target platform set the GOOS and GOARCH environment variables; e.g.:

GOOS=darwin GOARCH=amd64 make build

Once you have built the binary, place it in the same folder of your terraform installation for it to be available everywhere.

Build debian package from source

If you want to build your package targeting at the same time Ubuntu Trusty and Xenial, then run:

make package

The output package will be placed in the dist/ folder (e.g. dist/terraform-provider-signalform-0.9_2.2.5-default0_amd64.deb)

If you want to target a specific Ubuntu version, use the itest_* command as below:

make itest_trusty

You can set environament variables to customize your build:

Once you built the package, you can just install like:

sudo dpkg -i dist/terraform-provider-signalform.deb

Release

To make a new release:

  1. bump VERSION up in build/Makefile (use semantic versioning)
  2. run make changelog and edit the changelog file
  3. git commit
  4. git tag v<VERSION>
  5. git push origin master && git push origin --tags

Contributing

Everyone is encouraged to contribute to terraform-provider-signalform. You can contribute by forking the GitHub repo and making a pull request or opening an issue.

Running tests

To run the tests, run make test

To pass options to the test, e.g to target a specific test, pass the TEST_OPTS option to the make task - e.g

make test TEST_OPTS='-test.run TestSendRequestSuccess'

To make the tests run faster, you can run

make test TEST_OPTS='-i'

Subsequent make test commands should be quicker

FAQ

Why not calling it terraform-provider-signalfx?

Signalform is not an official SignalFx product, being owned and maintained by Yelp. For this reason, we decided not to call this provider terraform-provider-signalfx in case SignalFx decides to publish an official one.

SignalFlow is hard!

It is a bit hard, indeed. You might find useful to read the SignalFlow Overview.

Also remember that given a chart or detector created from the UI, you can see its representation in Signalflow from the Actions menu:

Show SignalFlow Signalflow