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(entities): support terraform in config card [khcp-12445] #1549

Merged
merged 34 commits into from
Aug 14, 2024

Conversation

kaiarrowood
Copy link
Contributor

@kaiarrowood kaiarrowood commented Aug 9, 2024

Summary

Add support to view terraform configuration for entities.
For KHCP-12445.
This work is behind a FF: khcp-12445-terraform-config-details

Adoption PR: https://github.com/Kong/konnect-ui-apps/pull/3935

image

Resources

@kaiarrowood kaiarrowood self-assigned this Aug 9, 2024
@kaiarrowood kaiarrowood changed the title Feat/khcp 12445 terraform config card feat(entities): support terraform in config card [12445] Aug 9, 2024
@kaiarrowood kaiarrowood changed the title feat(entities): support terraform in config card [12445] feat(entities): support terraform in config card [khcp-12445] Aug 9, 2024
@kaiarrowood kaiarrowood marked this pull request as ready for review August 13, 2024 15:57
@kaiarrowood kaiarrowood requested review from a team as code owners August 13, 2024 15:57
Copy link
Contributor

@aanchalm01 aanchalm01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good.

However, id field is missing in the Terraform format for any entity.

Eg:
image 2048

image 2047

I am not familiar with Terraform, but

  • why is it my_** for every resource ? eg: resource "konnect_gateway_service" "my_service" {
  • same with my_** in control_plane_id = konnect_gateway_control_plane.my_konnect_cp.id

Copy link
Contributor

@mptap mptap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noticed a styling issue with long text in Terraform config running over the Copy button
Screenshot 2024-08-13 at 1 41 41 PM

CaCertificate = 'ca_certificate',
Certificate = 'certificate',
Consumer = 'consumer',
ConsumerGroup = 'consumer_group',
Copy link
Contributor

@mptap mptap Aug 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kaiarrowood We need an entry for ConsumerCredential to display Terraform since we do display JSON/YAML Configuration in the ConsumerCredentialForm

Suggested change
ConsumerGroup = 'consumer_group',
ConsumerGroup = 'consumer_group',
ConsumerCredential = 'consumer_credential',

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consumer credentials are plugins 🤔 I need to look into this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will fix in a future update

Copy link
Contributor

@mptap mptap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kaiarrowood We need to display Terraform in the ConsumerCredentialForm since we do display JSON/YAML Configuration
Screenshot 2024-08-13 at 1 55 59 PM

Copy link
Contributor

@aanchalm01 aanchalm01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! Great work ⭐

@kaiarrowood kaiarrowood merged commit 794b4a4 into main Aug 14, 2024
21 checks passed
@kaiarrowood kaiarrowood deleted the feat/khcp-12445-terraform-config-card branch August 14, 2024 19:33
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.

4 participants