Giter Club home page Giter Club logo

Comments (9)

johnsmyth avatar johnsmyth commented on July 18, 2024

We could add the ability to specify the config path but I'm not sure that it would solve your particular problem. The plugin configuration defines connections which are global - they are server-level objects, not client settings. A single Steampipe DB instance has the same connections for all clients. That means that if you want a different connection config for each user you would have to create a DB instance for each user. You can do this today using --install-dir, STEAMPIPE_INSTALL_DIR or the install_dir workspace argument.

An alternative is to create a connection for every user and set the search path on a per-client basis to default to "their" connection. This doesn't preclude them from using any other connection however, just sets the connection that would be used for unqualified queries. You could conceivably use Postgres permissions to lock this down, but you would have to implement that yourself. Steampipe creates a single steampipe user, as the Steampipe CLI is optimized for a single user.

You could also explore Turbot Pipes. Where Steampipe CLI is meant for a single person doing a single thing at a single point in time, Pipes is intended to allow many people doing many things over time.

from steampipe.

aitoehigie avatar aitoehigie commented on July 18, 2024

from steampipe.

johnsmyth avatar johnsmyth commented on July 18, 2024

I guess I misunderstood your request. It sounded like you wanted to share the same database instance from different clients, with different configurations for each. If you are going to start a separate DB instance for each user then it is reasonable to add a config path arg to the service start command. Is that what you are looking for?

As for the --install-dir, that needs to point to the equivalent of the ~/.steampipe directory. The drawback is that you would have to install the plugins in each of these instances.

from steampipe.

aitoehigie avatar aitoehigie commented on July 18, 2024

Exactly.
I would like to add a config path argument to the Steampipe command.
The steampipe instances aren't long-running instances as I intend calling it from a web server context (with Python's subprocess, then passing a config file containing the Stripe API key, that I created in that request cycle) and displaying the output in a dashboard.
Can I do this currently with Steampipe?

from steampipe.

johnsmyth avatar johnsmyth commented on July 18, 2024

When you say displaying output in a dashboard do you mean a Steampipe/Powerpipe dashboard or your own application's dashboard?

from steampipe.

johnsmyth avatar johnsmyth commented on July 18, 2024

If you are treating these instances as ephemeral and short-lived, and you are only accessing them through your own code on the back end, perhaps the SQLite Extensions or Export CLIs might be a better, more lightweight fit?

from steampipe.

aitoehigie avatar aitoehigie commented on July 18, 2024

When you say displaying output in a dashboard do you mean a Steampipe/Powerpipe dashboard or your own application's dashboard?

My application's dashboard

from steampipe.

aitoehigie avatar aitoehigie commented on July 18, 2024

If you are treating these instances as ephemeral and short-lived, and you are only accessing them through your own code on the back end, perhaps the SQLite Extensions or Export CLIs might be a better, more lightweight fit?

I think I will try the export CLI, I see it allows me to pass a --config flag. Which is fits what I am trying to accomplish.

from steampipe.

kaidaguerre avatar kaidaguerre commented on July 18, 2024

closing this issue - please raise another or get in touch via the steampipe community of you have further issues/questions

from steampipe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.