-
Notifications
You must be signed in to change notification settings - Fork 5
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
Expose code change webhook from sleuth_code_change_source
resource
#200
Comments
Sleuth's GraphQL does expose a Why would you prefer using Sleuth's TF provider over GitLab one for managing GitLab project webhooks? |
Sorry, I should have clarified: we're using GitLab integration in Sleuth in read-only mode. Hence, if I'm not misunderstanding, we need to set up the same webhook ourselves.
To clarify, the issue is not about providing a custom webhook URL to the Sleuth provider, but exposing the webhook URL as an output attribute of the code change source resource. The intention is that our Terraform would create the code change resource, get the webhook URL Sleuth has created along with it, and then set this URL in the GitLab repository ourselves using the GitLab provider (since we are using read-only mode). Does that help to explain the issue, or am I misunderstanding your question? |
np, sorry for misunderstanding from my side. (I'm not too familiar with TF and am sorry if am asking silly questions) So defining the i.e.: # creates code change source in Sleuth
resource "sleuth_code_change_source" "cd" {
project_slug = sleuth_project.tf.slug
name = "foo"
repository = {
…
}
}
# Does something in GitLab…
resource "something_gitlab" "gl" {
webhook = sleuth_code_change_source.cd.webhook
webhook_secret = sleuth_code_change_source.cd.webhook_secret
} |
Yes, exactly that! 😄 The GitLab resource we'd be using for reference is |
Got it 👍 I'll see what we can do about it and will keep you updated. |
We're managing our Sleuth code change sources using this provider, which works great for the most part!
We'd also like to manage the GitLab project webhooks from within the same set of Terraform. The GitLab Terraform provider allows us to create these, but the Sleuth provider does not currently expose the webhook URL or secret for a given code change source.
As I understand, the webhook URL/secret is exposed by Sleuth's GraphQL API. Would it be possible to add these as attributes exposed by a
sleuth_code_change_source
?The text was updated successfully, but these errors were encountered: