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

Replace templated kong2tf with recursive implementation #1390

Merged
merged 1 commit into from
Sep 8, 2024

Conversation

mheap
Copy link
Member

@mheap mheap commented Sep 8, 2024

I've replaced the template approach with an implementation that recursively walks input data. This means that kong2tf will work with any entity that deck supports. It will even work with new fields automatically without templates needing to be updated.

In addition, I added support for importing every supported entity (we don't support important consumer group members in the provider).

I've tested this by creating one of every entity in the Konnect UI, running deck dump --konnect-token $KONNECT_TOKEN --konnect-control-plane-name "CP With Everything" --with-id, then kong2tf and the imports all work as expected with go run main.go file kong2tf -s ~/tfimport-check/kong.yaml --generate-imports-for-control-plane-id "0dea9abf-074a-4988-bdd6-c9ea1ea25d4b" --ignore-credential-changes

@mheap
Copy link
Member Author

mheap commented Sep 8, 2024

I'm going to merge to the branch - wanted to submit a PR to make it clear what changed. Please feel free to review on here even after merge

@mheap mheap merged commit bf711da into feat/kong2tf Sep 8, 2024
37 of 39 checks passed
@mheap mheap deleted the kong2tf-mh branch September 8, 2024 20:07
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