Live data from Hacker News

Cloud Infrastructure as SQL

iasql.com

81–90 of 113 posts

Re: Cloud Infrastructure as SQL

#81
post #26

Earlier quoted context omitted.

yeah the button scrolls you to the bottom but there's no way to sign up.

ah it was a bug in some screens. we think we just fixed it. where you guys on mobile, can you check again?

Yup fixed. I just got on the wait list.

Re: Cloud Infrastructure as SQL

#82

Steampipe ( https://steampipe.io ) is an open source CLI to query cloud infrastructure using SQL (e.g. AWS, GitHub, Slack, k8s, etc). It also has a HCL language to define security benchmarks and controls (e.g. AWS CIS, etc). We are a Postgres FDW under the hood with Go-based plugins, so write would be possible, but we've chosen to focus on read only so far. Definitely interested to see how you approach create, update…

We are using steampipe to connect 30 AWS accounts via SQL. In a single call we can query all our services. Using metabase to visualise it all. I highly recommend you give it a go

How are you making the metabasesteampipe connection? Are you able to connect metabase directly to a running steampipe/ postgres server instance? or are you doing some ETL into metabase. Thanks in advance (metabase is new to me, but steampipe has been really handy)

Re: Cloud Infrastructure as SQL

#83
post #82

Earlier quoted context omitted.

We are using steampipe to connect 30 AWS accounts via SQL. In a single call we can query all our services. Using metabase to visualise it all. I highly recommend you give it a go

How are you making the metabase steampipe connection? Are you able to connect metabase directly to a running steampipe/ postgres server instance? or are you doing some ETL into metabase. Thanks in advance (metabase is new to me, but steampipe has been really handy)

Use `steampipe service start` to run Steampipe in the background [1]. It will print out a standard Postgres connection string running on port 9193 of your local machine. You can then simply point Metabase (or any other DB visualization tool) at it using the standard Postgres setup.

1 - https://steampipe.io/docs/using-steampipe/service

Re: Cloud Infrastructure as SQL

#85

Earlier quoted context omitted.

I'm frankly really confused that Terraform is still so widely used for AWS IaC when CDK exists.

One reason is because TF supports many clouds and people like having skills that are not vendor specific

Half true. The true half is that terraform will work out of the box with basically all clouds and many saas vendors. The untrue half is that terraform does nothing to abstract away the underlying vendor. You cant treat gcp VMs the same as aws EC2 instances. You do get to reuse HCL.

Re: Cloud Infrastructure as SQL

#86
post #84

If I did infrastructure in SQL I’d accidentally leave a column out of a join and end up creating millions of dollars worth of machines I didn’t want.

It's like regex. It doesn't solve a real problem, but only makes it easier to do so. Users are still responsible for every tits and bits.

Re: Cloud Infrastructure as SQL

#87

I see a lot of criticisms for not wanting to use SQL to do writes and I think that is misguided. The current state of your infrastructure is absolutely state and SQL is a great language for working with state. While Terraform and all these other "declarative" infrastructure tools are better than what came before them, you're ultimately playing Relation Stitcher by needing to connect the various pieces together. There…

SQL is great for querying (and steampipe exists just for that reason), but the point of Terraform is to be a desired state configuration system; SQL updates would remove its best feature. You could use the database as the desired state, but then it would no longer be readable text that you can version-control.

Terraform code is equivalent to the desired content of the database, and running plan generates the required update queries to make it happen.

Re: Cloud Infrastructure as SQL

#88
post #77

Seems to me whether you like this or not probably boils down to whether you like SQL or not. For someone who spends most of their time writing type-safe functional code and loving the expressive power of it, the idea of voluntarily injecting SQL into my life seems horribly retrograde. We write whole frameworks to try and avoid having to manually code SQL(!) and every time I have to do it I sigh in frustration at how…

Instead of focusing on SQL, focus on what can be done with an RDBMS with ACID properties and properly constructed data relations, constraints, and triggers.

You can not only make queries/views/etc, but you can also write transactions that make the changes, (ie the INSERT/UPDATE/UPSERT/DELETE) that are applied atomically, relying on the SQL "engine" (ie what they're building) to make sure that the relationships (foreign keys, constraints etc) are maintained.

If it's done right, then you can have the equivalent of an ODBC/JDBC driver for it and then use the ORM/framework of your choice to work with the schema.

Re: Cloud Infrastructure as SQL

#89

isnt the big advantage to infrastructure as code the fact that you can version control it? and isnt it notoriously difficult to version control SQL? maybe I am missing something

version controlling SQL queries is difficult, version controlling tables and rows of data and relations (FKs, constraints) is what RDBMSs do :)

Re: Cloud Infrastructure as SQL

#90
I find the idea quite interesting - and it could be valuable just for the read-only aspect of it alone - especially if it is queryable through an ODBC or JDBC connection.

It helps avoid some scripting / token / API overhead - but I'm wondering what the trade off is in terms of initial setup time.

One general concern I have is around Data (state) consistency of the data after DML operations (insert / update). If the data represents the state of a resource - how do you know if there's a pending operation on it as a result of an earlier Update operation? How is idempotency handled? How are conflicting concurrent state changes handled (one user forces a restart, another initiates a shutdown)? What happens if a change applied to multiple records/resources only successfully applies on some of the resources?

This isn't specific to just this approach though - it's going to apply to any kind of cloud / resource management platform. I'm not sure how they tend to handle it - but a basic single record per resource has limitations around it that mean more work is needed. Maybe you end up with change history records?

Post reply on HN