This message was deleted.
# aws
s
This message was deleted.
e
I don’t really know how is expected to make the
templateBody
, and having references to other Pulumi resources. Because it expects an stringify JSON, and with template literals had many errors on deploy of
"template_body" contains an invalid JSON
v
Can you try
pulumi.interpolate
? It takes a template string as input which can have
Output<string>
referenced inside it, and returns a
Output<string>
e
Hi @victorious-fountain-7689 thanks for the response. I’m trying it out, but getting this error, for sure on the JSON it’s rendered but can’t see why, any ideas?
Copy code
"template_body" contains an invalid JSON: invalid character 's' looking for beginning of value
Copy code
templateBody: pulumi.interpolate`{
          "Resources": {
            "SecurityGroupId": {
              "Type": "AWS::SSM::Parameter",
              "Properties": {
                "Name": "security-group-id-${stage}",
                "Type": "String",
                "Value": ${servicesSecurityGroup.id}
              }
            },
(...)
}
how I’m supposed to add the
Value
field as an
Output<string>
. Any particular way Pulumi is expecting?
Made it work! Thanks for the help
v
Ah, nice!
👍 1