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

View and copy Terraform configuration #194286

Open
jloleysens opened this issue Sep 27, 2024 · 9 comments
Open

View and copy Terraform configuration #194286

jloleysens opened this issue Sep 27, 2024 · 9 comments
Assignees
Labels
discuss loe:needs-research This issue requires some research before it can be worked on or estimated Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience)

Comments

@jloleysens
Copy link
Contributor

jloleysens commented Sep 27, 2024

Describe the feature:
Our TF provider enables managing certain Kibana assets via Terraform config. Most notably today:

  • Action connector
  • Alerting rule
  • Data view
  • Security role
  • SLO
  • Space
  • Synthentics monitor
  • Synthetics private location

(ref)

It would be cool if there were a way to view or copy-as-TF-config from the UI. Perhaps as an option in the save dialog?

Describe a specific use case for the feature:

Many developers manage observability assets via Terraform. This would be nice way to support/ease their workflow by allowing them to view/export/copy their resource as Terraform.

Additional thoughts

The TF provider is versioned and we should probably provide a version selector to support up to x old versions.

@jloleysens jloleysens added discuss loe:needs-research This issue requires some research before it can be worked on or estimated Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) labels Sep 27, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/appex-sharedux (Team:SharedUX)

@wandergeek
Copy link
Contributor

We desperately need this. To the point where platform has created some hacky tooling leveraging LLMs and Tampermonkey to allow the download of these assets: https://github.com/elastic/cluster-mgmt/tree/main/tools/asset_downloader

@sebelga
Copy link
Contributor

sebelga commented Oct 16, 2024

@jloleysens How do you see such a feature as a shared service/component?

It feels like it would be more a task for specific teams and plugins to add a button to copy-as-TF-config in their UI, using an EuiCopy component + a serializer to convert their specific business objects.

Not sure I see what reusable/shared service we could provide. Thoughts?

@jloleysens
Copy link
Contributor Author

Yeah, that's a good point. I thought the "copy-as-TF-config" flow there might be a generic UX like asking users if they want to copy/download "this and related objects".

But maybe it can be more simple than that for a starting point like just having the "copy as TF" button would be better. Perhaps we could ask presentation team what they think, curious to hear if Clint has any ideas too!

@sebelga
Copy link
Contributor

sebelga commented Oct 17, 2024

I thought the "copy-as-TF-config" flow there might be a generic UX like asking users if they want to copy/download "this and related objects"

If I understand correctly, the shared part would be the wrapping of a modal that opens to confirm download?

It all depends on the end UX we are looking for. I find that having a "Copy Terraform config" button that simply copies the config to my clipboard is handy and enough (without the need to have to confirm in a modal).

Now, if for some reason the JSON or yml being copied is so big that it justifies to download as JSON, then maybe having a modal that asks if the user wants to copy to clipboard or download in file could be useful.

So my conclusion is that we should first think about the end UX with a few concrete examples in Kibana where this button would be really useful. We could start implementing it directly in the plugin code and only after decide if there is so much boilerplate that it deserves a reusable solution.

@jloleysens
Copy link
Contributor Author

think about the end UX with a few concrete examples in Kibana

Yeah, I agree. @wandergeek is there a particular workflow that you have been using? Perhaps a type of Kibana asset that would be nice to support first? I know dashboards is one, but given the list of currently supported resources perhaps we can look at adding this kind of functionality to the SLO creation workflow.

@wandergeek
Copy link
Contributor

wandergeek commented Oct 29, 2024

Whoops sorry for the late response here @jloleysens! So the tampermonkey script and API service I've developed supports SLOs, alerting rules, and dashboards. If I was to select one I guess SLOs is a good choice. Since SLO thresholds are the kind of things that are important for customers to track in SCM.

@sebelga btw here's a demo of the downloady tool I've created: https://elastic.slack.com/archives/C014FQLQBE1/p1715837664704509?thread_ts=1715837581.506669&cid=C014FQLQBE1.

@sebelga
Copy link
Contributor

sebelga commented Oct 30, 2024

btw here's a demo of the downloady tool I've created

Nice demo! Why did you use a Lambda function instead of our NodeJs server to generate the Terraform?

@tsullivan
Copy link
Member

So my conclusion is that we should first think about the end UX with a few concrete examples in Kibana where this button would be really useful. We could start implementing it directly in the plugin code and only after decide if there is so much boilerplate that it deserves a reusable solution.

Hi, I'd like to propose a UX for this feature that leverages the Sharing Modal. Right now, it would not be easy to implement, but the SharedUX team has an epic on our roadmap to work on this quarter that will make the Sharing Modal extensible for plugin developers. The result would be that applications have a Share item in the top nav menu, which opens a modal, and in that modal the user is presented with options for copying the Terraform configuration. These options may be in a tab of the modal.

cc @eokoneyo

@sebelga sebelga removed their assignment Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss loe:needs-research This issue requires some research before it can be worked on or estimated Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience)
Projects
None yet
Development

No branches or pull requests

6 participants