-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error importing AWS targetGroup with pulumi cli #2534
Comments
It happens exactly the same. |
@SergioGenially and @MoralGr Thank you for reporting this issue. I'm trying to reproduce this with all the latest: CLI 3.68.0 and @pulumi/aws 5.41.0. I created a target group with the following repro: import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const main = new aws.ec2.Vpc("main", {cidrBlock: "10.0.0.0/16"});
const test = new aws.lb.TargetGroup("test", {
port: 80,
protocol: "HTTP",
vpcId: main.id,
}); And then import the resulting target group as another resource. The command succeeds for me. I suspect I need to set some other property on my target group to reproduce. Could you please provide more details about your target group configuration, ideally, as a Pulumi program? Also, which version of the provider are you using? Thank you! |
Hello @mikhailshilkov. We was using @pulumi/aws 5.30.0... After upgrading the plugin to 5.41.0 the import ran successfully. Thank you so much for your support and sorry for the inconvenience. |
This issue has reappeared starting with v6.7.0 and confirmed in 6.13.3. My process:
|
Noting https://github.com/pulumi/pulumi/blob/master/pkg/codegen/hcl2/model/diagnostics.go#L41 possibly where the error is coming from. |
Thank you all, apologies for the experience here, we'll have a look shortly, this sounds like it's something that need to be fixed by an integration test so we stop regressing on it. |
#2517 I believe is where this was dealt with before. |
6.32.0 - not affected |
This makes sure that AWS targetGroup can be imported without error.
Adding a regression test in #3859 and closing for now as it appears to be fixed in the latest provider v6.32.0. |
This makes sure that AWS targetGroup can be imported without error. It currently passes on the latest version of the provider, but #2534 shows that it had a history of silently regressing. This test will keep us from regressing this again. --------- Co-authored-by: VenelinMartinov <[email protected]>
What happened?
I encountered an error while executing the import command for AWS targetGroup:
pulumi import aws:alb/targetGroup:TargetGroup new-targetgroup arn:aws:elasticloadbalancing:eu-west-1:XXXXXXXX:targetgroup/my_targetGroup/YYYYYYYYYY
The error message received was:
error: anonymous.pp:28,22-29,14: cannot assign expression of type (null) to location of type list({ onDeregistration: output(string) | string, onUnhealthy: output(string) | string } | output({ onDeregistration: string, onUnhealthy: string })) | output(list({ onDeregistration: string, onUnhealthy: string }))?: ;
Expected Behavior
The resource TargetGroup should have been imported correctly without any error.
Steps to reproduce
To reproduce the issue, just execute the targetGroup import command:
pulumi import aws:alb/targetGroup:TargetGroup
Output of
pulumi about
Additional context
I have attempted to downgrade the Pulumi CLI to previous versions, but I am still encountering the same error.
Contributing
I would like to contribute to the resolution of this issue. Please let me know if there is any guidance or assistance I can provide.
Thank you for your attention to this matter.
The text was updated successfully, but these errors were encountered: