https://pulumi.com logo
#yaml
Title
# yaml
f

freezing-kitchen-80795

06/01/2023, 5:49 PM
I notice that the yaml example section of Providers in the docs is missing - does this mean it is not possible to create multiple aws:Providers (e.g. for different regions, or different aws accounts), and use them in a Pulumi.yaml file?
a

adventurous-eve-83859

06/02/2023, 12:47 AM
You can instantiate multiple versions of a provider in YAML, i.e.
Copy code
resources:
  aws1:
    type: pulumi:providers:aws
    defaultProvider: true
    options:
      region: us-east-1
  aws2:
    type: pulumi:providers:aws
    options:
      region: us-west-1
  bucket1:
    type: aws:s3:Bucket
    properties:
      acl: private
      tags:
        Environment: Dev
        Name: Bucket in us-east-1
  bucket2:
    type: aws:s3:Bucket
    properties:
      acl: private
      tags:
        Environment: Dev
        Name: Bucket in us-east-2
    options:
      provider: ${aws2}
How to do so is sort of explained on the YAML reference page, and on the individual provider doc itself, but agree that YAML should be on the Resource providers page
f

freezing-kitchen-80795

06/02/2023, 8:32 AM
Thanks for the detailed answer!
2 Views