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

Support for retrieving/configuration notifications? #7

Open
woneill opened this issue Jun 24, 2019 · 2 comments
Open

Support for retrieving/configuration notifications? #7

woneill opened this issue Jun 24, 2019 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@woneill
Copy link

woneill commented Jun 24, 2019

Being able to apply notifications across workspaces would be a useful feature. There appears to be support for it in the API.

@fprimex
Copy link
Contributor

fprimex commented Jun 25, 2019

I'm up for implementing anything that's in the API. My goal right now is to address the 2 issues and 1 PR that are still over at tfe-cli, then I'd be happy to tackle this next.

Please note that notification support is coming to the tfe provider soon, and in general we like to encourage the use of that provider where it makes sense to do so:

hashicorp/terraform-provider-tfe#68

If you enjoy shell scripting and want to contribute the notifications commands, it is pretty easy to get started. I've re-engineered tfh from tfe-cli with ease-of-development in mind.

notification would work almost exactly like workspace. The options are created by writing documentation:

tfh/usr/share/doc/tfh/tfh_notification.md
tfh/usr/share/doc/tfh/tfh_notification_new.md
tfh/usr/share/doc/tfh/tfh_notification_list.md
tfh/usr/share/doc/tfh/tfh_notification_show.md
tfh/usr/share/doc/tfh/tfh_notification_verify.md
tfh/usr/share/doc/tfh/tfh_notification_delete.md

And then the implementation for each command goes in its own shell file as a function:

tfh/lib/tfh/cmd/tfh_notification.sh
tfh/lib/tfh/cmd/tfh_notification_new.sh
tfh/lib/tfh/cmd/tfh_notification_list.sh
tfh/lib/tfh/cmd/tfh_notification_show.sh
tfh/lib/tfh/cmd/tfh_notification_verify.sh
tfh/lib/tfh/cmd/tfh_notification_delete.sh

Everything else will be wired up correctly just by implementing those two things (docs and function) properly.

You could (and I will) literally copy the workspace commands to new notification names, do search and replace (carefully), then modify the variables, JSON payload structures, and output.

@fprimex fprimex added the enhancement New feature or request label Jun 25, 2019
@fprimex fprimex self-assigned this Jun 25, 2019
@woneill
Copy link
Author

woneill commented Jun 28, 2019

Thanks for the pointer to the tfe provider as I hadn't been aware of that option!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants