Hello All, I am having an issue with `config` in a...
# general
b
Hello All, I am having an issue with
config
in a custom Pulumi template. It seems
default
can't handle an object for
aws:defaultTags
. Here is my
Pulumi.yaml
in the template
Copy code
name: ${PROJECT}
description: ${DESCRIPTION}
runtime: nodejs
stackConfigDir: config/
template:
  description: A minimal AWS TypeScript Pulumi program
  config:
    aws:defaultTags:
      default:
        tags:
          Tag1: value1
          Tag2: value2
    aws:region:
      description: The AWS region to deploy into
      default: us-east-1
I run the
pulumi new
command and get the following error
Copy code
$ pulumi new ~/dev/rs-pulumi-templates/aws-typescript --name sandbox --stack sandbox --yes
error: yaml: unmarshal errors:
  line 10: cannot unmarshal !!map into string
The behavior I expect is to get a Pulumi project created with this in the
Pulumi.sandbox.yaml
Copy code
encryptionsalt: v1:X5f2X+HrmBA=:v1:W4AbC74tERwws/44:W9KutY3Gg2o7xh4sMr//DrIeCmj+lQ==
config:
  aws:region: us-east-1
  aws:defaultTags:
    tags:
      Tag1: value1
      Tag2: value2
I was able to get the configurations I want by running
pulumi new
with the
--config-path
and
--config
flags. I was also able to get the expected result using the
pulumi config
command. Ideally, I'd like to get the expected outcome from the template, not the command line. Any ideas on what I am doing wrong or if it is even possible? Thanks
a
It looks like templates don’t handle complex values, though I agree they should. I opened https://github.com/pulumi/pulumi/issues/10892 to track the issue.
b
Thanks @ancient-policeman-24615. I had already created an issue. We messaged back and forth. This became the issue to track the problem. https://github.com/pulumi/pulumi/issues/10891
139 Views