pulumi / pulumi-yaml

YAML language provider for Pulumi
Apache License 2.0
38 stars 11 forks source link

The values ​​set in Pulumi config cannot be created as string. #602

Closed ryullulala closed 1 month ago

ryullulala commented 1 month ago

What happened?

Values ​​set in Pulumi Config are converted to integers even if you omit "". However, variable values ​​declared inside Pulumi.yaml give string values ​​when enclosed in "".

Example

This code returns an integer. When accessing ${project_number}. Pulumi.dev.yaml

encryptionsalt: abcdefg
config:
  project_number: "110717590588"

This code returns a string. When accessing ${project_number}. Pulumi.yaml

name: test
runtime: yaml
description: A minimal Google Cloud Pulumi YAML program
variables:
  project_number: "110717590588"

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 debian Version 11.9 Arch aarch64

This project is written in yaml

Additional context

No response

Contributing

No response

justinvp commented 1 month ago

Thanks for opening the issue and sorry for the trouble! This is actually the same issue as https://github.com/pulumi/pulumi-yaml/issues/577, so I'm going to close this as a duplicate. We should prioritize addressing this soon, but in the meantime, see https://github.com/pulumi/pulumi-yaml/issues/577#issuecomment-2111336585 for a workaround.