News for hackers. Stuff that matters.
Re:Terraform 1.0 by yunwal on Tuesday June 08, 2021 @09:35AM (#27434972)
I wouldn't recommend using cdktf either yet. Can't manage multiple stacks in a single repository, no full support for input variables, constant breaking changes. It's not production ready at all.

Stick with terraform if you need to provision non-aws resources. Otherwise, use aws-cdk.

Re:Terraform 1.0 by tonyhb on Tuesday June 08, 2021 @10:56AM (#27436022)
I do multiple stacks via changing the state file based off of env:

  constructor(scope: Construct, name: string, c: StackConfig) {
    super(scope, name);

    new S3Backend(this, {
      bucket: "some-bucket-here",
      key: c.name("state-env"),
      region: "" // wherever
    });
  }
 
  // ... at the bottom of main
  new Stack(app, 'something-something-dev', { environment: "dev", name: (i) => `${i}-dev` });
  new Stack(app, 'something-something-prod', { environment: "prod", name: (i) => `${i}-prod` });
Then you can use stacks properly.
Re:Terraform 1.0 by cmclaughlin on Tuesday June 08, 2021 @11:42PM (#27443982)
Support for multiple stacks in a single file was added to cdktf recently. I’ve been managing dozens of production stacks in a single repo for a while now and highly recommended it.
Re:Terraform 1.0 by ManWith2Plans on Wednesday June 09, 2021 @08:18AM (#27447029)
And yet if you try to pass values from one stack to another, it will fail spectacularly.