Earlier quoted context omitted.
Maybe it shines if your infrastructure is really dynamic?
The project I'm on involves dynamic infrastructure. I don't see any benefit Pulumi provides over Terraform in this regard. In fact, Terraform's module system is more convenient if you want to do per-tenant infra versioning for example.
Here's setting up Guardduty in AWS in multiple regions using a terraform module: https://github.com/gruntwork-io/terraform-aws-security/blob/...
In pulumi, it would be:
``` import * as pulumi from "@pulumi/pulumi"; import * as aws from "@pulumi/aws";
[ "us-east-1", "us-east-2", "us-west-1", "us-west-2", "ap-south-1", "ap-northeast-2", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ca-central-1", "eu-central-1", "eu-west-1", "eu-west-2", "eu-west-3", "sa-east-1", ].forEach((region) => { const provider = new aws.Provider(`aws-provider-${region}`, { region: region, });
const guardDuty = new aws.guardduty.Detector(`detector-${region}`, {
enable: true,
}, { provider: provider });
});
```