A 4th question: pulumi is converting all stack con...
# yaml
g
A 4th question: pulumi is converting all stack config values to strings. I want to store a boolean type there. Is there a way to store a value as a boolean, or to convert a string to a bool? I tried forcing it but didn't work
Copy code
# Pulumi.develop.yaml
config:
  myproject:myvar: false

# Pulumi.yaml

resources:
  myresource:
    options:
      protect: ${pulumi.stack}.${myvar}
    properties:
      ...
The above gives an error
Copy code
error: failed to discover plugin requirements: 
-error: Pulumi.yaml:71,16-42: protect must be a boolean value;
If I try to force it:
Copy code
options:
      protect: !!bool ${pulumi.stack}.${myvar}
It doesn't work:
Copy code
error: could not unmarshal '.../Pulumi.yaml': invalid YAML file: yaml: cannot decode !!str `${pulumi.stack}.${protect_dynamodb_tables}` as a !!bool
I also tried passing it through the
variables:
section in
Pulumi.yaml
Copy code
# Pulumi.yaml
...
variables:
  varProtectTablesAsBool:
    type: bool
    value: ${pulumi.stack}.${protect_dynamodb_tables} # tried both with !!bool and without
Still doesn't work, giving the first error
protect must be a boolean value;
e
I think there's some bugs around this at the moment, we've got people looking into it.