i'm splitting one project into two, by importing e...
# aws
i'm splitting one project into two, by importing existing stack resources into the new stack. One has me stumped: i have a TargetGroupAttachment which won't validate.
Copy code
$ pulumi preview --diff
    = aws:lb/targetGroup:TargetGroup: (import)
        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):
Copy code
    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?
Seeing that 400, maybe Pulumi is trying to do a health check on the target group and doesn't know to use the _import value rather than the ID (which doesn't exist in the state yet)?