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

wooden-country-28133

11/14/2023, 1:58 PM
Hello, I'm trying to create a simple target group as below with pulumi java
Copy code
var targetGroup = new TargetGroup("targetGroup", TargetGroupArgs.builder()
        .port(8080)
        .protocol("HTTP")
        .vpcId(vpc.id())
        .build());
But then I get the below error and I'm not sure how to resolve the same
Type                   Name            Status           Info
pulumipulumiStack iac-pulumi-dev failed 2 errors; 22 messages + └─ awslbTargetGroup targetGroup created (2s) Diagnostics: pulumipulumiStack (iac-pulumi-dev): error: Running program [PID: 20516](unknown) failed with an unhandled exception: java.lang.UnsupportedOperationException: Convert [com.pulumi.aws.lb.TargetGroup.targetHealthStates]: Error converting 'java.util.Collections$UnmodifiableRandomAccessList' to 'TypeShape{type=interface java.util.List, parameters=[TypeShape{type=class com.pulumi.aws.lb.outputs.TargetGroupTargetHealthState, parameters=[]}]}'. null at com.pulumi.serialization.internal.Converter.convertObjectUntyped(Converter.java:119) at com.pulumi.serialization.internal.Converter.convertValue(Converter.java:86) at com.pulumi.core.internal.OutputCompletionSource.setValue(OutputCompletionSource.java:95) at com.pulumi.deployment.internal.DeploymentImpl$ReadOrRegisterResourceInternal.lambda$completeResourceAsync$0(DeploymentImpl.java:1187) at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646) at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) Caused by: java.lang.NullPointerException at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:903) at com.google.common.collect.ImmutableList$Builder.add(ImmutableList.java:815) at com.pulumi.serialization.internal.Converter.tryConvertList(Converter.java:642) at com.pulumi.serialization.internal.Converter.tryConvertObjectInner(Converter.java:277) at com.pulumi.serialization.internal.Converter.convertObjectUntyped(Converter.java:115) ... 10 more [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! Nov 14, 2023 85707 AM com.pulumi.deployment.internal.DeploymentImpl$DefaultEngineLogger errorAsync SEVERE: Running program [PID: 20516](unknown) failed with an unhandled exception: java.lang.UnsupportedOperationException: Convert [com.pulumi.aws.lb.TargetGroup.targetHealthStates]: Error converting 'java.util.Collections$UnmodifiableRandomAccessList' to 'TypeShape{type=interface java.util.List, parameters=[TypeShape{type=class com.pulumi.aws.lb.outputs.TargetGroupTargetHealthState, parameters=[]}]}'. null at com.pulumi.serialization.internal.Converter.convertObjectUntyped(Converter.java:119) at com.pulumi.serialization.internal.Converter.convertValue(Converter.java:86) at com.pulumi.core.internal.OutputCompletionSource.setValue(OutputCompletionSource.java:95) at com.pulumi.deployment.internal.DeploymentImpl$ReadOrRegisterResourceInternal.lambda$completeResourceAsync$0(DeploymentImpl.java:1187) at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646) at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) Caused by: java.lang.NullPointerException at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:903) at com.google.common.collect.ImmutableList$Builder.add(ImmutableList.java:815) at com.pulumi.serialization.internal.Converter.tryConvertList(Converter.java:642) at com.pulumi.serialization.internal.Converter.tryConvertObjectInner(Converter.java:277) at com.pulumi.serialization.internal.Converter.convertObjectUntyped(Converter.java:115) ... 10 more error: an unhandled error occurred: 'C:\Program Files\Maven\apache-maven-3.9.5\bin\mvn.cmd C:\Program Files\Maven\apache-maven-3.9.5\bin\mvn.cmd -Dorg.slf4j.simpleLogger.defaultLogLevel=warn --no-transfer-progress compile exec:java' exited with non-zero exit code: 1
f

full-activity-46331

11/16/2023, 11:01 AM
Facing similar issue. Tried to set "targetHealthStates" but unable to access it on "com.pulumi.aws.alb.TargetGroup" although given in the documentation.
s

square-train-76559

11/16/2023, 11:40 PM
is it resolved?
is it resolved?
f

full-activity-46331

11/17/2023, 1:15 AM
Not yet. It seems to be an internal issue in the SDK. You can have a look at this on the Pulumi Slack channel. https://pulumi-community.slack.com/archives/C01PF3E1B8V/p1700020885860759
11 Views