domingo, 31 de octubre de 2021

What Terraform is NOT

Both https://cuddly-octo-palm-tree.com/posts/2021-10-10-tyska-terraform/ and https://news.ycombinator.com/item?id=29020460 touch on this topic I was a bit surprised when I started looking at terraform.

Your "code" won't be agnostic to the cloud you use. So I think it shares very little with the properties of "code" I usually assume.

Still, it's a good tool that gives a language and a syntax to talk about a set of infrastructure things. But given I've heard stories about the dependency graph not being really reliable (and for sure I've already seen deploys gone wrong in the middle of the process), I ask myself if it's really worth it (for smallish infrastructures).

A nice thing I felt when using it is the fast feedback loop when trying stuff. being able to test something new from a fresh aws account using plan,apply,destroy in 5 minutes.  That's super cool indeed

martes, 19 de octubre de 2021

Terraform and aws batch: empty env variable disappearing

So I had my dose of head scratching today when noticed that if you set an environment variable to the empty string for an aws batch job, aws ignores it, and next time you terraform plan, terraform will think it is out of sync, so it'll tell you it has to add that value again


miércoles, 13 de octubre de 2021

awk is cool (again)

Awk is lately appearing in HN more often.  I quite like awk, but having gone through Perl, bash, awk, I see people praise awk for being a POSIX compliant enhanced scripting language.  And while being true, I don't think this matters much to the commenters. They see it as an improved bash. And I think we're repeating the history.

Shortcomings that people see in bash, or awk, are solved in Perl. But people dismiss Perl for some reason, and they (we) are going to rediscover it in different forms. Perl is so optimized for scripting that it's really hard to beat. And it has a awk-like mode, so you can easily do the "/pattern/ {action}" thing.

 

Still, here are some threads on awk, with mentions to Perl.  I specially liked K (from K&R) awk.help file. That guy knows how to write!


https://news.ycombinator.com/item?id=28707463

https://earthly.dev/blog/awk-examples/

https://www.cs.princeton.edu/courses/archive/spring19/cos333/awk.help

 https://ferd.ca/awk-in-20-minutes.html

https://www.gnu.org/software/gawk/manual/gawk.pdf

http://www.cs.unibo.it/~sacerdot/doc/awk/nawkA4.pdf

https://ia803404.us.archive.org/0/items/pdfy-MgN0H1joIoDVoIC7/The_AWK_Programming_Language.pdf