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 apikey resource #48

Merged
merged 3 commits into from Aug 7, 2021
Merged

Conversation

fgouteroux
Copy link
Contributor

Hi @jtopjian

Adding support of apikey management.

However I have a question: does I need to open a PR to https://github.com/sensu/sensu-go to update the apikey client file, or the update of vendor file is enough (vendor/github.com/sensu/sensu-go/cli/client/apikey.go)

Also CI is failing, when updating the username of apikey, I cannot reproduce it in my environment. Do you have some idea ?

@jtopjian
Copy link
Owner

@fgouteroux Thanks!

If the vendor / client library needs modified then yeah, it'll need to be done in a PR for that repo.

The vendor/ directory is an exact clone of the upstream libraries. It's just bundled into the repo for ease of "pinning".

@jtopjian
Copy link
Owner

@fgouteroux Here's the documentation about vendoring with Go modules: https://golang.org/ref/mod#vendoring

Let me know if you have any questions about it. Vendoring isn't absolutely required, but it was used in some other projects I used to help with, so I carried the pattern over.

@fgouteroux
Copy link
Contributor Author

Thanks for the explanation. In the meanwhile I have open the PR sensu/sensu-go#4336 I'm not sure if sensu will accept it and when. Concerning the ci test failing I tried with sensu 6 and the test is passing. I don't Know why maybe the sensu version as in ci this is the version 5.21 but i'm not sure

@jtopjian
Copy link
Owner

@fgouteroux Sounds good. I'll poke around with the CI tests and see if I can figure it out. 🙂

@fgouteroux
Copy link
Contributor Author

fgouteroux commented Jul 27, 2021

@jtopjian good news, sensu have accepted and merged the PR sensu/sensu-go#4336. So I've updated the go.mod file and I got the error

github.com/jtopjian/terraform-provider-sensu imports
	github.com/hashicorp/terraform-plugin-sdk/plugin imports
	github.com/hashicorp/terraform-plugin-sdk/internal/plugin/discovery imports
	github.com/hashicorp/go-getter imports
	cloud.google.com/go/storage imports
	google.golang.org/api/option imports
	google.golang.org/api/internal imports
	google.golang.org/grpc/naming: module google.golang.org/grpc@latest found (v1.39.0), but does not contain package google.golang.org/grpc/naming

As explained here etcd-io/etcd#12124, I add a replace statement to fix the error. Let me know if it's ok.

@jtopjian
Copy link
Owner

jtopjian commented Aug 6, 2021

@fgouteroux I'm very sorry for the late reply. I think the replace statement is fine.

This PR looks good to me. Let me know if you wanted to do any additional work or if it's good to merge.

@fgouteroux
Copy link
Contributor Author

@jtopjian no worries, it's ok for the merge

@jtopjian jtopjian merged commit 1341992 into jtopjian:master Aug 7, 2021
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.

None yet

2 participants