Live data from Hacker News

Libaws: A simpler way to declare AWS infrastructure

github.com

81–90 of 93 posts

Re: Libaws: A simpler way to declare AWS infrastructure

#81
post #34

Earlier quoted context omitted.

I'm really fascinated about why so many infrastructure-as-code tools are actually infrastructure-as-markup. Many of them seem to "evolve" until they're awkward attempts at bolting full programming language semantics onto that markup language. I imagine it started out as wanting to keep a simple configuration-style format for infrastructure but fell apart when people's stacks grew large and complex. Projects like Pulu…

In the early days, people would write imperative scripts to provision infrastructure, but once it's out there you can't just delete resources that you no longer want by deleting the relevant blocks from your script and re-running it--you had to delete them manually or write a "migration script". This was untenable. Then some tools came out which let you use YAML or JSON to describe the desired state of the world, and…

Amazon's CDK emits YAML.

Troposphere emits YAML.

You can diff the outputs if you wish, or did I misunderstand your last paragraph.

Re: Libaws: A simpler way to declare AWS infrastructure

#82
post #60

> X should be easy > proposes solution that involves YAML Am I crazy, ignorant, or is YAML the most tedious and error-prone format edit?

To be fair, I find editing YAML files not that bad, especially with VSCode checking the syntax and pointing out anomalies. But it can be tricky to read other people's YAML files on GitHub. It's easy to miss subtle mistakes.

The worst YAML is when they use the templating and anchors for repetition. It ends up completely unreadable.

Though better than when Jinja is used on YAML.

Re: Libaws: A simpler way to declare AWS infrastructure

#83
post #19

Terraform modules? In particular, https://github.com/terraform-aws-modules/ is a better solution for anyone looking for this IMO. (Yes there is a comparison to 'terraform' in the Readme - I'm not convinced it's considering modules, versus just using the AWS provider directly. Another bonus of using tf modules over this: you can eventually realise you need to graduate to using the AWS provider directly, and do so quit…

Why change language when you can do the same with Cloudformation?

https://github.com/cfn-modules/docs

I would personally switch to CDK, but of you wanted to add predefined templates you don't need to switch your existing languages.

Re: Libaws: A simpler way to declare AWS infrastructure

#84
post #19

Terraform modules? In particular, https://github.com/terraform-aws-modules/ is a better solution for anyone looking for this IMO. (Yes there is a comparison to 'terraform' in the Readme - I'm not convinced it's considering modules, versus just using the AWS provider directly. Another bonus of using tf modules over this: you can eventually realise you need to graduate to using the AWS provider directly, and do so quit…

Why change language when you can do the same with Cloudformation? https://github.com/cfn-modules/docs I would personally switch to CDK, but of you wanted to add predefined templates you don't need to switch your existing languages.

Sure, if you're already using it. Greenfield personally I'd prefer Terraform, but each to their own.

Re: Libaws: A simpler way to declare AWS infrastructure

#85
post #34

> X should be easy > proposes solution that involves YAML Am I crazy, ignorant, or is YAML the most tedious and error-prone format edit?

I'm really fascinated about why so many infrastructure-as-code tools are actually infrastructure-as-markup. Many of them seem to "evolve" until they're awkward attempts at bolting full programming language semantics onto that markup language. I imagine it started out as wanting to keep a simple configuration-style format for infrastructure but fell apart when people's stacks grew large and complex. Projects like Pulu…

I am fond of Starlark, the Python-like configuration language of Bazel. It's code, but they've removed most of the footguns that you encounter when using Python as configuration (e.g. you can't mutate global state).

I think it's a pleasant middle ground between config and code, it's definitely code, but limited.

Re: Libaws: A simpler way to declare AWS infrastructure

#86

> X should be easy > proposes solution that involves YAML Am I crazy, ignorant, or is YAML the most tedious and error-prone format edit?

I didn’t even get that far. I simply can’t deal with anything that does indentation with 2 spaces.

PS: I forgot that I wrote a cloud init file merely hours ago. Yuck.

Re: Libaws: A simpler way to declare AWS infrastructure

#87

> X should be easy > proposes solution that involves YAML Am I crazy, ignorant, or is YAML the most tedious and error-prone format edit?

I didn’t even get that far. I simply can’t deal with anything that does indentation with 2 spaces. PS: I forgot that I wrote a cloud init file merely hours ago. Yuck.

[deleted]

Re: Libaws: A simpler way to declare AWS infrastructure

#88
post #31

I am convinced that AWS is intentionally obtuse in order to promote job security for engineers and thus be the preferred platform

Same for devops in general and often, programming too. A few smart, cunning personal-life-optimizers drove this and a vast majority of innocent workers profit from this system. Personally, I profit from this and I am very scared the people that pay us eventually realize how easy everything could be.

Re: Libaws: A simpler way to declare AWS infrastructure

#89
post #34

Earlier quoted context omitted.

I'm really fascinated about why so many infrastructure-as-code tools are actually infrastructure-as-markup. Many of them seem to "evolve" until they're awkward attempts at bolting full programming language semantics onto that markup language. I imagine it started out as wanting to keep a simple configuration-style format for infrastructure but fell apart when people's stacks grew large and complex. Projects like Pulu…

In the early days, people would write imperative scripts to provision infrastructure, but once it's out there you can't just delete resources that you no longer want by deleting the relevant blocks from your script and re-running it--you had to delete them manually or write a "migration script". This was untenable. Then some tools came out which let you use YAML or JSON to describe the desired state of the world, and…

> Eventually the industry caught on to the scam and demanded programming languages back, so we got CDKs which misunderstand the assignment in a different way. Rather than emitting YAML…

You’re in for a shock when you realise all they do is emit YAML

Re: Libaws: A simpler way to declare AWS infrastructure

#90
post #48

Earlier quoted context omitted.

...and doing that allows one to interface to existing sources of truth for inventory and whatnot.

Feels like it needs to be stated it also introduces additional attack vectors. It’s not without consequence.

agree
Post reply on HN