pulumi / pulumi-yaml

YAML language provider for Pulumi
Apache License 2.0
39 stars 12 forks source link

Unable to version an explicit provider from config #508

Open t0yv0 opened 1 year ago

t0yv0 commented 1 year ago

What happened?

Trying to set the version of an explicit provider from outside the stack, running into unexpected error messages from Pulumi YAML. Is there a way to do this?

Example

name: test

runtime:
  name: yaml

config:
  version:
    type: string

resources:

  provider:
    type: pulumi:providers:aws
    options:
      version: ${version}

  tested-resource:
    type: aws:s3/bucket:Bucket
    properties:
      bucket: testbucket-${pulumi.stack}
    options:
      provider: ${provider}
pulumi config set version 5.42.0
pulumi preview
error: failed to discover plugin requirements: Pulumi.yaml:15,16-26: version must be a string; 

Output of pulumi about

CLI          
Version      3.86.0
Go Version   go1.21.1
Go Compiler  gc

Host     
OS       darwin
Version  14.0
Arch     x86_64

This project is written in yaml

Current Stack: t0yv0/test/buckett

Found no resources associated with buckett

Found no pending operations associated with buckett

Backend        
Name           pulumi.com
URL            https://app.pulumi.com/t0yv0
User           t0yv0
Organizations  t0yv0, pulumi
Token type     personal

No dependencies found

Pulumi locates its logs in /var/folders/gk/cchgxh512m72f_dmkcc3d09h0000gp/T/ by default

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

Zaid-Ajaj commented 1 year ago

The solution to this issue looks very similar to #507, I'll assign it to myself ✅