however, that placed the burden upon the user to (a) ensure said lambdas were deployed, in every account, and (b) that the lambda worked reliably for all possible inputs
It'd be like if python started shipping with a binding to jq: great for the places where it's available, but otherwise you need to have a strategy for when it's not. Now, the "cloudformation standard library" includes it OOtB which can help things like Fn::ForEach::TheAZs: [ "MyAZ", { Ref: Fn::GetAZs }, ... ] which previously was monster stupid to work around
It’s pretty hard to express abstraction and control flow in a format like YAML or XML. You’ll probably find less friction in using https://aws.amazon.com/cdk/ to generate arbitrary CloudFormation templates from a mature programming language.
I’ve occasionally done the same with Terraform, writing Python or Groovy to generate Terraform-flavored JSON rather than hand-write HCL templates that would be too verbose to understand and maintain (looking at you, DynamoDB autoscaling).
My heartburn with the CDK is that it wants to run any such generated CFN, whereas I want it to render any such CFN, the way that troposphere works. Because the quick-create URL that one can give to any potential consumer of the CFN template does not accept CDK code, and "ok, just open a terminal and ..." is the mind-killer for getting other people to deploy something. That's the way GCP thinks about the world and is indescribably painful
If terraform or CDK or tf-cdk work for projects, more power to them, but they are for sure not replacements for each other
5 comments
[ 2.8 ms ] story [ 21.5 ms ] threadhowever, that placed the burden upon the user to (a) ensure said lambdas were deployed, in every account, and (b) that the lambda worked reliably for all possible inputs
It'd be like if python started shipping with a binding to jq: great for the places where it's available, but otherwise you need to have a strategy for when it's not. Now, the "cloudformation standard library" includes it OOtB which can help things like Fn::ForEach::TheAZs: [ "MyAZ", { Ref: Fn::GetAZs }, ... ] which previously was monster stupid to work around
I’ve occasionally done the same with Terraform, writing Python or Groovy to generate Terraform-flavored JSON rather than hand-write HCL templates that would be too verbose to understand and maintain (looking at you, DynamoDB autoscaling).
If terraform or CDK or tf-cdk work for projects, more power to them, but they are for sure not replacements for each other