https://pulumi.com logo
#general
Title
# general
f

full-dress-10026

12/11/2018, 9:59 PM
If I explicitly set the
name
on a
aws.elasticloadbalancingv2.TargetGroup
then update the
port
to a different value, I get this message:
Copy code
Plan apply failed: Error creating LB Target Group: DuplicateTargetGroupName: A target group with the same name 'fibonacci-dev' exists, but with different settings
        status code: 400, request id: db1ef58c-fd8f-11e8-be77-fbf35d396053
b

bitter-oil-46081

12/11/2018, 10:09 PM
@stocky-spoon-28903 I assume this is because Port is a force-new property and so we re-create the resource before trying to delete the old version.
f

full-dress-10026

12/11/2018, 10:10 PM
That seems to defeat the purpose of using a
name
, no?
b

bitter-oil-46081

12/11/2018, 10:20 PM
It appears that the AWS API requires
name
to be unique across a region. I guess the
name_prefix
property is exposed by terraform (and projected by pulumi as
namePrefix
) was added to do the autonaming by default. When name is unset, you just get a resource with the name
tf-<some-random-id>
I think explicitly setting name and then trying to do any operation which requires the resource to be replaced (and it looks like for TargetGroup changing many properties requires the entire resource to be replaced) is not going to work given that we don't set delete before create today. But @stocky-spoon-28903 or @microscopic-florist-22719 would know for certain.
7 Views