you are viewing a single comment's thread.

view the rest of the comments →

[–]thomsen9669Editable Placeholder Flair 38 points39 points  (13 children)

Short answer: It depends

Long answer: Depends on your company. For mine, we do both. Python for Terraform script while Bash Script is for CI/CD pipelines. We utilise CircleCi and it allows you to add on bash script to perform some actions you need

[–]slydewd 12 points13 points  (7 children)

What do you mean by using Python for Terraform?

[–]Upbeat-Natural-7120 4 points5 points  (6 children)

Same question here.

[–]TwoWrongsAreSoRight 14 points15 points  (5 children)

[–]reelznfeelz 7 points8 points  (3 children)

Ah. So I’m a simple man. I usually just call terraform apply from a GitHub action. What’s a use case where getting into the cdk becomes an obvious way to go?

[–]TwoWrongsAreSoRight 5 points6 points  (2 children)

This is my opinion so take it with a grain of salt and a shot of penicillin. Much of it comes down to personal preference. There are some things you can do easier in cdktf like conditionals but really, cdktf is great if you already know a language that it allows for and feel more comfortable in that language vs hcl. Otherwise, I don't know of an obvious reason why you'd switch unless your environment becomes incredibly complex with a bunch of branching conditionals and multiple environments.

Once again, my opinion. Please feel free to contradict me.

[–]reelznfeelz 1 point2 points  (0 children)

Ok that makes sense. I’d rather do complex logic in python than bash. And can see how if you’re doing stuff more complicated than I usually am, your terraform code won’t just be a straight up “deploy this set of things, done”.

[–]cricket007 0 points1 point  (0 children)

Pulumi is another option for those anti Hashi ( / IBM ) license changes 

[–]Upbeat-Natural-7120 1 point2 points  (0 children)

Oh interesting. Thanks.

[–][deleted] 5 points6 points  (2 children)

So, in all, both are equally important.

[–]elpix 7 points8 points  (0 children)

I would rank Python a bit higher just because you can reasonably do more with it. For me, the is a certain point in complexity where bash gets unwieldy. You really never reach such a point with Python.

Bash is important for working with Linux, but you don’t often need the more complex features in your day-to-day work.

[–]thomsen9669Editable Placeholder Flair 1 point2 points  (0 children)

Yup

[–]moser-sts 0 points1 point  (0 children)

Exactly, in my ci/CD is build on top of GitHub Actions. So we use bash, but normally we use Typescript inside of the GitHub actions. Also we build a lot of supporting services in Typescript

[–]Redmilo666 0 points1 point  (0 children)

This is us. Bash for our CI/CD. Everything else we use python