News for hackers. Stuff that matters.
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.

There are no comments on this comment yet.