pulumi / pulumi-yaml

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

pulumi ignores `pluginDownloadURL` if program yaml file has resources that reference `config` variables. #603

Closed MitchellGerdisch closed 1 month ago

MitchellGerdisch commented 2 months ago

What happened?

See comment below - although the code referenced below demonstrates the issue, it is not related to the variables section but simply using config variables in resources.

Using the code here: https://gist.github.com/MitchellGerdisch/ac07d6f19cbf9bd2a155b0bfaad0dae5

If the YAML file has a resource with a pluginDownloadURL option and a variables section, Pulumi will ignore the pluginDownloadURL and fail as it looks in the pulumi namespace for the plugin.

Example

See code here: https://gist.github.com/MitchellGerdisch/ac07d6f19cbf9bd2a155b0bfaad0dae5

Output of pulumi about

CLI
Version 3.125.0 Go Version go1.22.5 Go Compiler gc

Plugins KIND NAME VERSION language yaml unknown

Host
OS darwin Version 13.6.7 Arch x86_64

This project is written in yaml

Found no resources associated with dev

Found no pending operations associated with dev

Backend
Name pulumi.com URL https://app.pulumi.com/

No dependencies found

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).

MitchellGerdisch commented 2 months ago

Actually this is not related to the variables section specifically. It is because there is a config value that is then referenced in the variables section. The same thing happens if any resource references a config value.

So this code also demonstrates the problem:

name: pequod-yaml-testing
runtime: yaml
description: A minimal Pulumi YAML program
config:
  foo:
    type: string
    default: "bar"
resources: 
  stacksettings:
    type: stackmgmt:StackSettings 
    properties:
      boo: ${foo}
    options:
      pluginDownloadURL: "github://api.github.com/pulumi-pequod/pequod-mlc-stackmgmt"
pulumi-bot commented 1 month ago

This issue has been addressed in PR #617 and shipped in release v1.10.0.