average-school-38756
01/10/2021, 2:46 AM$ pulumi preview --diff
= aws:lb/targetGroup:TargetGroup: (import)
[id=arn:aws:elasticloadbalancing:us-east-2:REDACTED:targetgroup/exampleTargetGroup-20b6d5b/REDACTED]
[urn=urn:pulumi:dev::hello::aws:lb/targetGroup:TargetGroup::exampleTargetGroup]
[provider=urn:pulumi:dev::hello::pulumi:providers:aws::default_3_20_0::REDACTED]
healthCheck : {
enabled : false
healthyThreshold : 5
interval : 35
matcher : "200"
path : "/"
timeout : 30
unhealthyThreshold: 2
}
lambdaMultiValueHeadersEnabled: false
name : "exampleTargetGroup-20b6d5b"
targetType : "lambda"
[...]
error: Preview failed: refreshing urn:pulumi:dev::hello::aws:lb/targetGroupAttachment:TargetGroupAttachment::exampleTargetGroupAttachment: 1 error occurred:
* Error reading Target Health: ValidationError: A target group ARN must be specified
status code: 400, request id: 76b68087-feea-451d-8e22-2770fe1edafa
Code looks like this (and works in the original stack):
lb.TargetGroupAttachment("exampleTargetGroupAttachment",
target_group_arn=example_target_group.arn,
target_id=example_fn.arn,
opts=pulumi.resource.ResourceOptions(depends_on=[example_target_group, with_lb, example_fn], import_='arn:aws:elasticloadbalancing:us-east-2:REDACTED:targetgroup/exampleTargetGroup-20b6d5b/REDACTED')
)
Why would it be saying the target group ARN isn't specified?