Live data from Hacker News

Cloud Infrastructure as SQL

iasql.com

71–80 of 113 posts

Re: Cloud Infrastructure as SQL

#71

Earlier quoted context omitted.

personally, I love terraform. I dont like statefiles though. Its annoying to have them in a vault system

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

Re: Cloud Infrastructure as SQL

#72
post #62

Earlier quoted context omitted.

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

CDK still uses cloudformation under the hood right? Anything to do with CF gets a hard pass from me.

Credit where credit is due CF is better than it used to be. Of course just like TF doesn't rollback CF will rollback and on an initial deploy you get in this weird state where you have to completely remove your stack to try again.

But it was significantly faster than it used to be. I never want to use it tho.

Re: Cloud Infrastructure as SQL

#73

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

Awesome! Would love to hear more about your use case and any suggestions for improvements if you want to DM me.

Re: Cloud Infrastructure as SQL

#74
post #67

Earlier quoted context omitted.

Great to hear :-) Please check out our open source mods (e.g. AWS Compliance, GitHub Sherlock, DigitalOcean Thrifty) - we'd love your feedback & help! https://hub.steampipe.io/mods

Ooh this looks really powefull, any plans to add hetzner and backblaze?

Both seem to have reasonable Go SDK libraries, so it should be easy to create new plugins for them. I've added them to our internal backlog, but all our plugins are open source if you'd like to try building it yourself! The Linode plugin is a simple, similar example to use as a starting point [1]. We also have docs for writing plugins [2].

1 - https://github.com/turbot/steampipe-plugin-linode 2 - https://steampipe.io/docs/develop/writing-plugins

Re: Cloud Infrastructure as SQL

#75
post #62

Earlier quoted context omitted.

CDK still uses cloudformation under the hood right? Anything to do with CF gets a hard pass from me.

Credit where credit is due CF is better than it used to be. Of course just like TF doesn't rollback CF will rollback and on an initial deploy you get in this weird state where you have to completely remove your stack to try again. But it was significantly faster than it used to be. I never want to use it tho.

They actually released support for retrying failed stack updates the other week: https://aws.amazon.com/blogs/aws/new-for-aws-cloudformation-...

Re: Cloud Infrastructure as SQL

#76
I feel like this has the most value for highly state full services. If your primitives are declarative, then this feels like a step backwards compared to CDK (I don’t have experience with terraform). As it turns out, composition and abstraction are really powerful tools for building complex infrastructures. For reading infrastructure state though, this sounds amazing.

Re: Cloud Infrastructure as SQL

#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 frustrating, verbose and repetitive it is.

But I'm guessing there's a whole crowd of people out there thinking "finally I can just use SQL and none of these ridiculous programming languages to manage my infra ..."

Re: Cloud Infrastructure as SQL

#78
post #66

I'm not sure if this is useful at any capacity. Sorry to be hard on that.

There is good and bad. You're giving up conventional text based version control (assuming the 'database' behind this is anything like a conventional RDBMS database.) You could pick up a lot of flexibility; multiple, high feature frontends using anything that can deal with a relational schema, for example. Automation could benefit from the (loosely) standards based API that is SQL. I think it's worth exploring. I susp…

I mentioned Steampipe [1] above, it has an open source OCI plugin [1] to query resources (no support for write operations). It's a Postgres FDW under the hood, and uses subset of Postgres types (bool, bigint, double, text, inet, cidr, timestamptz and jsonb) along with their standard operators. This approach has proven very simple and effective for us.

1 - https://steampipe.io 2 - https://github.com/turbot/steampipe-plugin-oci

Re: Cloud Infrastructure as SQL

#79

Earlier quoted context omitted.

Credit where credit is due CF is better than it used to be. Of course just like TF doesn't rollback CF will rollback and on an initial deploy you get in this weird state where you have to completely remove your stack to try again. But it was significantly faster than it used to be. I never want to use it tho.

They actually released support for retrying failed stack updates the other week: https://aws.amazon.com/blogs/aws/new-for-aws-cloudformation-...

Well, that’s only 5 years too late to make me consider it :P

The situation where anything goes wrong, and you just sit there staring at CF being unable to delete some S3 bucket for hours, eventually going into the console manually and deleting it in one second. Has left me really sour on the whole thing.

Re: Cloud Infrastructure as SQL

#80

I can see SELECTs being useful here, but yeesh INSERT/UPDATE/DELETEs would scare the heck out of me. Also not clear on how/why this would be a SaaS product - this seems like it's a library you would download, throw some keys at, and thanks.

> yeesh INSERT/UPDATE/DELETEs would scare the heck out of me Out of curiosity, why would they?

1. Idempotency. Accidentally run an INSERT twice and you get two VMs instead of one. Sure you could be careful and do upsert-queries but is everyone in your org equally careful?

2. Reverts, in terraform it's as easy as removing the resource and re-applying. Or even just run teardown. Even if you've added other things in the meantime. With SQL if you've INSERTED something you need to come up with the corresponding DELETE query. Rollbacks might be a thing but can they be applied partially?

3. Version control and code reviews. And are you sure the code that was reviewed is what was actually ran in your terminal before you commited, or did you depend on manually inserted side-effects?

4. Dependencies between resources, this has already been covered a lot in this thread. Especially together with teardowns this becomes extra complicated.

Post reply on HN