Closed mheap closed 2 months ago
@Prashansa-K I'm primarily looking for mistakes + potential bugs in this review. I know the code needs a ton of work to be up to standard. I'd like to submit that in a followup as this is a Summit feature.
Attention: Patch coverage is 82.83828%
with 104 lines
in your changes missing coverage. Please review.
Please upload report for BASE (
main@fb795ad
). Learn more about missing BASE report. Report is 11 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@mheap Do we want this command to be in prod before the summit? Or we doing a beta release first?
@Prashansa-K Before summit - the provider is already available as a beta
@mheap This looks good to me. The presence of exhaustive tests is giving me more confidence on this. Just the lint failure and konnect integration test needs to be checked out.
Integration test seems like a flake. Could be related to this issue https://github.com/Kong/deck/issues/1365.
@Prashansa-K @battlebyte Can you work together to fix the lint error and release?
I am working on fixing the integration test errors here: https://github.com/Kong/deck/pull/1396 PR is in review. Once this is merged in main, we can merge it here.
For the release, I will add a changelog with this PR: https://github.com/Kong/deck/pull/1395 which is already there for a pending release item. @battlebyte Could you help me with a changelog entry? Also, I believe now since we have a added a new command, we would have to bump the minor version?
@Prashansa-K @mheap PR for the docs here: https://github.com/Kong/docs.konghq.com/pull/7899
Adds the
kong2tf
command to convert a deck file to Terraform.If
--generate-imports-for-control-plane-id
is provided,import
blocks will be added to Terraform to adopt existing resources.If
--ignore-credential-changes
is added, any credentials will be ignored until they are destroyed and recreated.Tested with the following deck file which contains one of every entity, including plugin scopes.
Steps to test yourself:
deck
or the UIdeck dump --konnect-token $KONNECT_TOKEN --konnect-control-plane-name "YOUR_CP_NAME" --with-id
deck file kong2tf -s ./kong.yaml --generate-imports-for-control-plane-id "0dea9abf-074a-4988-bdd6-c9ea1ea25d4b" --ignore-credential-changes
terraform plan
. It will show all entities being adopted