I try to import existing resources to Pulumi. I execute following command on my terminal.
$ pulumi import aws:alb/targetGroup:TargetGroup target-group-name target-group-arn
But I had following error.
error: internal error: Error: cannot assign expression of type tuple(cty.NullVal(cty.DynamicPseudoType)) to location of type union(list(union(object({onDeregistration = union(output(string), string, annotated(0x14001d12b40)), onUnhealthy = union(output(string), string, annotated(0x14001d12b80))}, annotated(0x14001d12b00)), output(object({onDeregistration = string, onUnhealthy = string}, annotated(0x14001d12bc0))), annotated(0x14001d12c00))), none, output(list(object({onDeregistration = string, onUnhealthy = string}, annotated(0x14001d12bc0)))), annotated(0x14001d12cc0)):
on anonymous.pp line 22:
23: targetFailovers =[
24: null]
I can't solve this error. Please teach me how to solve. Or please teach me how to generate typescript code from pulumi state. Because importing was success.
appendix My environment is:
- OS
- macOS Monterey v12.5
- Arch
- m2
- pulumi version
- v3.51.1
- which pulumi
- /opt/homebrew/bin/pulumi
- pulumi runtime
- nodejs(TypeScript)