I'm having trouble with something My pulumi progra...
# aws
g
I'm having trouble with something My pulumi program (yaml) was working ok I came back to it after a year, I needed to update lambdas to node24 runtime I discovered that the aws. plugin version (6.7 something) didn't support node24 I googled around and found that there's a new v7 of the aws provider I set my lambda resources to use that Somehow, it update the default for the whole program to the v7, which for unknown reasons, broke everything Huge diff in preview with nearly every resource being updated (mostly tags + region, but a few actual changes) pulumi up failed horribly So i went back to v6.8x by setting the default:true provider resource However, this now won't let me do lambdas on v7 because it conflicts with the default provider version I am about to set
Copy code
options:
      version:
on to every single resource, which is tedious. What's normal or best practice in this scenario?
a
Are you trying to use a different version of AWS for your lambda then the rest of your program?
c
Can you try running
pulumi preview --refresh --run-program
with the downgraded provider?
g
trying to use a different version of AWS for your lambda then the rest of your program
yes
Can you try running
pulumi preview --refresh --run-program
with the downgraded provider?
I've downgraded the provider and everything is working I abandoned the attempt to run the lambdas on a newer version and just sticking with node22 for now
🙏 1
a
If you want a resource to be at a different version of the provider than all others, you will need to give it a different version of provider. For example, this works:
Copy code
name: dev-yaml
runtime: yaml
resources:
  v7:
    type: pulumi:providers:aws
    options:
      version: 7.0.0
  v6:
    type: pulumi:providers:aws
    options:
      version: 6.83.2
    defaultProvider: true

  v7bucket:
    type: aws:s3:Bucket
    options:
      provider: ${v7}

  v6bucket:
    type: aws:s3:Bucket
🙌 1
🤯 1
🤩 1
g
Thanks @ancient-policeman-24615 that worked perfectly. Exactly what I needed. I can't believe I didn't know about this functionality of yaml to refer to earlier keys like that
${v7}
😄 1