Can't create a Target Group in C#
See original GitHub issueHello!
- Vote on this issue by adding a 👍 reaction
- To contribute a fix for this issue, leave a comment (and link to your pull request, if you’ve opened one already)
Issue details
When I try to create a target group, I get an error which prevents the rest of my pulumi up
command from working. I’m using version 4.25.0
. I’ve tried dropping down many versions and they all produce the same errror.
Note that error only pops up intermittently. Most of the time, I will get the error, but in rare occasions (< 5% of the time) I don’t get an error.
Steps to reproduce
- Start a new C# project with
pulumi new aws-csharp
- Create a new target group within the stack (this is an exerpt straight out of the samples but using
Pulumi.Aws.LB
instead of the deprecatedPulumi.Aws.ElasticLoadBalancingV2
(which also produces the same error)
using Pulumi;
using Ec2 = Pulumi.Aws.Ec2;
using Elb = Pulumi.Aws.LB;
class MyStack : Stack
{
public MyStack()
{
// Read back the default VPC and public subnets, which we will use.
var vpc = Output.Create(Ec2.GetVpc.InvokeAsync(new Ec2.GetVpcArgs { Default = true }));
var vpcId = vpc.Apply(vpc => vpc.Id);
var webTg = new Elb.TargetGroup("web-tg", new Elb.TargetGroupArgs
{
Port = 80,
Protocol = "HTTP",
TargetType = "ip",
VpcId = vpcId
});
}
}
- Run with
pulumi up
Expected: Everything to run fine and the AWS target group should be generated
Actual:
Diagnostics:
pulumi:pulumi:Stack (app-dev):
error: Running program 'app.dll' failed with an unhandled exception:
System.InvalidOperationException: Expected System.Double but got System.String deserializing Pulumi.Aws.LB.TargetGroup.deregistrationDelay
at object Pulumi.Serialization.Converter.ConvertObject(string context, object val, Type targetType)
at OutputData<object> Pulumi.Serialization.Converter.ConvertValue(string context, Value value, Type targetType, ImmutableHashSet<Resource> resources)
at async Task Pulumi.Deployment.CompleteResourceAsync(Resource resource, bool remote, Func<string, Resource> newDependency, ResourceArgs args, ResourceOptions options, ImmutableDictionary<string, IOutputCompletionSource> completionSources)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Target groups for your Application Load Balancers
When you create a target group, you specify its target type, which determines the type of target you specify when registering targets with...
Read more >Can't use an existing Target Group when creating a new AWS ...
I'm trying to create a new ECS Service on an Application Load Balancer. When I get to the step to add the container...
Read more >cannot have more than one target group on a single NLB ...
NLB listeners currently allow for more than one target group to be ... The following resource(s) failed to create: [NLBlistener1B46F543D].
Read more >DescribeTargetGroups - Elastic Load Balancing - 亚马逊云科技
Describes the specified target groups or all of your target groups. By default, all target groups are ... The specified load balancer does...
Read more >Subscriptions Terms & Conditions - Target
If we are unable to complete an order with the credit card or Target Debit Card that you used to create your subscription,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ok folks, I have identified the issue here in our bridge code and a fix in on the way! I am sorry about this
Paul
Reproduced on my machine, can confirm that the deregistrationDelay property is coming back as a string from the provider. https://github.com/pulumi/pulumi/pull/8286 will provide a work around for this as long as deregistrationDelay isn’t actually used. There is also an underlying bug in the provider that we think this should be an int but it’s coming back as a string, I guess we need a shim to just call parseInt on the string returned from terraform.