-
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
Warnings emitted when importing aws:lb:TargetGroup, One or more imported inputs failed to validate #4361
Comments
Similarly to #4362, the elbv2 target_group resource isn't handling optional values in read properly. |
This seems to only replicate if the To repro, run the following program and then import the TG using the import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as awsx from "@pulumi/awsx";
const vpc = new awsx.ec2.Vpc("lb-vpc", {
cidrBlock: "10.0.0.0/16",
subnetStrategy: "Auto",
subnetSpecs: [
{
type: "Public",
name: "public-subnet",
},
],
numberOfAvailabilityZones: 3,
natGateways: {
strategy: "None"
}
});
const secGroup = new aws.ec2.SecurityGroup("allowTls", {
description: "Allow TLS inbound traffic and all outbound traffic",
vpcId: vpc.vpcId,
tags: {
Name: "allow_tls",
},
});
const loadbalancer = new aws.lb.LoadBalancer("my-lb", {
loadBalancerType: "application",
securityGroups: [secGroup.id],
subnets: vpc.publicSubnetIds,
internal: true,
});
const targetGroup = new aws.lb.TargetGroup("my-tg", {
port: 80,
protocol: "HTTP",
targetType: "lambda",
vpcId: vpc.vpcId,
healthCheck: {
enabled: false,
timeout: 20,
}
});
export const targetGroupArn = targetGroup.arn;
const listener = new aws.lb.Listener("my-listener", {
loadBalancerArn: loadbalancer.arn,
port: 80,
defaultActions: [{
type: "forward",
targetGroupArn: targetGroup.arn,
}],
}); The import will generate a resource like this which has an invalid value for port. As as workaround just remove that value: const importTest = new aws.lb.TargetGroup("importTest", {
healthCheck: {
enabled: false,
matcher: "200",
path: "/",
port: "", // <-- here the wrong port value got inserted
timeout: 20,
},
ipAddressType: "ipv4",
name: "my-tg-bd8a19b",
targetType: "lambda",
}); Running |
Upstream issue: hashicorp/terraform-provider-aws#38861 |
Adding this to pulumi/pulumi-terraform-bridge#2028 that has some useful context - @flostadler in particular I think this could be mitigated by pulumi/pulumi-terraform-bridge#2314 which we were attempting recently. |
Although upstream reports fixed, this still is an issue on latest.
|
The upstream fix wasn't released yet. They just released it as part of |
Done in b62cf93 presumably. |
When importing resources of type
aws:lb:TargetGroup
withpulumi import
, the resource is imported, however it emits warnings:This has surfaced when using the Pulumi Importer, issue Zaid-Ajaj/pulumi-tool-importer#2 (comment)
The text was updated successfully, but these errors were encountered: