Earlier quoted context omitted.
I don't know if people have even tried Pulumi before recommending it. I've tried it, and it has buggy defaults, diff generation, etc. Each time I applied the same code, it would generate a diff based off of some internal defaults and... recreate the exact same infrastructure by _tearing it down_ and making it fresh. Not ideal. Would advise using the TF CDK specifically.
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.
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.