This message was deleted.
s
This message was deleted.
b
you can either set it on the stack:
Copy code
pulumi config set aws:region us-west-2
or you can create providers which you pass to resources: https://www.pulumi.com/docs/reference/pkg/aws/provider/#region_python
different stacks for each region is common
h
OK, thanks! i couldn’t find any examples that dealt with this so I didn’t know
b
h
ah perfect, i’m using Python but I should be able to do the same there
b
Here's a very basic python example.
Copy code
import pulumi
import pulumi_aws as aws

regs = aws.get_regions()

for i in regs.names:
    new_provider = aws.Provider(f'provider-{i}',
        region=i
    )

    vpc = aws.ec2.DefaultVpc(f'default-vpc-{i}',
        opts=pulumi.ResourceOptions(provider=new_provider)
    )