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

feat: Codegen v2 #137

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

feat: Codegen v2 #137

wants to merge 1 commit into from

Conversation

alexluong
Copy link
Collaborator

@alexluong alexluong commented Jan 30, 2025

This is a WIP PR with a good POC for the new codegen.

It supported the pattern where you can use do this

resource "hookdeck_destination" "destination" {
  name = "destination"
}

resource "hookdeck_connection" "connection_shopify" {
  name           = "connection_shopify"
  destination_id = hookdeck_destination.destination.id
  source_id      = hookdeck_shopify_source.source_shopify.id
}

resource "hookdeck_shopify_source" "source_shopify" {
  name = "source_shopify"
}

resource "hookdeck_shopify_source_config" "shopify_config" {
  source_id = hookdeck_shopify_source.source_shopify.id
  auth = {
    webhook_secret_key = "example-secret-key"
  }
}

Currently, the hookdeck_shopify_source doesn't support setting its own config yet, but that's doable next.

Please check this out and QA to see if things make sense!

Next steps:

  • support hookdeck_shopify_source.config
  • support data source (can be a next version)
  • generate source from OpenAPI instead of hard-coded template (probably should be a follow-up)

Not a blocker but @alvarp mentioned there will be some changes to the source response which can help with the code, so I'm waiting for that. For now, I was able to get things to work with some hacky code, so not a blocker for now.

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.

1 participant