https://pulumi.com logo
Title
b

bland-byte-34481

01/20/2021, 9:19 PM
I'm not sure if this is a bug so i'll ask - I get this error:
aws:lb:TargetGroup (sample-full-dev-retool-tg):
    error: aws:lb/targetGroup:TargetGroup resource 'sample-full-dev-retool-tg' has a problem: "name" cannot be longer than 32 characters
(you see the "name" is only 25 characters long... is this a bug?)
👀 1
g

gentle-diamond-70147

01/20/2021, 9:22 PM
Are you setting an explicit
name
property or using Pulumi's auto-naming functionality?
b

bland-byte-34481

01/20/2021, 9:23 PM
in this case it looks like auto-naming
that might be it (d'oh)
l

little-cartoon-10569

01/20/2021, 9:23 PM
The "name" parameter to the target group constructor is not the same as the name of the target group. There is a parameter in the args for that.
1
You can use
name: name
in the args to turn off autonaming, or use
namePrefix: somethingShort6OrFewerChars
to get a bit of both.
g

gentle-diamond-70147

01/20/2021, 9:35 PM
The error message could definitely be better here. :)
b

bland-byte-34481

01/20/2021, 9:38 PM
I don't disagree with you @gentle-diamond-70147 🙂
g

gentle-diamond-70147

01/20/2021, 9:45 PM
I'll open an issue for that. 👍
Opened https://github.com/pulumi/pulumi-aws/issues/1317 for a better error message.