Open tiagob opened 3 years ago
Punting for now since cdktf is very early.
main.ts
is required in cdktf. Can't use index.ts
or build/index.ts
. Should be read from package.json
main
Included tsconfig.json
(in cdktf init) doesn’t work with yarn workspaces with expo react-native
Hi Tiago, just sharing that I appreciated the investigation you did on this issue, and it was helpful for me to decide skipping using CDK for now.
Thank you!
https://learn.hashicorp.com/terraform/cdktf/cdktf-build-ts https://github.com/hashicorp/terraform-cdk
Advantages are:
Terraform providers are supported via an HCL to TS generator. So Auth0 etc. should work https://www.terraform.io/docs/providers/auth0/index.html
Open questions
Auth0 dependency for building web and thus s3 files
Custom provider. Requires golang (more complicated than Pulumi) https://learn.hashicorp.com/terraform/providers/setup-implement-read
Different stacks. Isn't supported yet IDEAL SOLUTION https://github.com/hashicorp/terraform-cdk/issues/35 https://github.com/hashicorp/terraform-cdk/issues/34
Cloud invalidation
A module to handle via SQS and a lambda function. Overly complicated https://github.com/dirt-simple/terraform-aws-cloudfront-invalidation
Wrap the script around another script to do the invalidation (better but not great) LIKELY SOLUTION https://stackoverflow.com/questions/56835557/aws-cdk-post-deployment-actions
Custom provider. Requires golang (more complicated than Pulumi) https://learn.hashicorp.com/terraform/providers/setup-implement-read