Hi Team, Anyone could have a clue why I’m facing t...
# dotnet
f
Hi Team, Anyone could have a clue why I’m facing this error ? looks like something internal is not right while creating
ScheduledAction
in AWS:
Copy code
var scheduledScaleOutAction = new ScheduledAction($"{name}-scheduled-scale-out", new ScheduledActionArgs
                {
                    Schedule = "cron(0 00 23 ? * * *)",
                    ServiceNamespace = appScaleTarget.ServiceNamespace,
                    ScalableDimension = appScaleTarget.ScalableDimension,
                    ResourceId = appScaleTarget.ResourceId,
                    ScalableTargetAction = new ScheduledActionScalableTargetActionArgs
                    {
                        MinCapacity = 3,
                        MaxCapacity = 9,
                    },
                });
I’m getting the following error:
Copy code
Diagnostics:
  pulumi:pulumi:Stack (IdP-Production):
    error: Running program '/Users/alibazzi/Documents/GitHub/*******.IaC.dll' failed with an unhandled exception:
    System.InvalidOperationException: Expected System.Double but got System.String deserializing Pulumi.Aws.AppAutoScaling.Outputs.ScheduledActionScalableTargetAction(maxCapacity)
       at Pulumi.Serialization.Converter.ConvertObject(String context, Object val, Type targetType)
       at Pulumi.Serialization.Converter.ConvertValue(String context, Value value, Type targetType, ImmutableHashSet`1 resources)
       at Pulumi.Deployment.CompleteResourceAsync(Resource resource, Boolean remote, Func`2 newDependency, ResourceArgs args, ResourceOptions options, ImmutableDictionary`2 completionSources)
       at Pulumi.Deployment.Runner.<>c__DisplayClass9_0.<<WhileRunningAsync>g__HandleCompletion|0>d.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at Pulumi.Deployment.Runner.WhileRunningAsync()
t
This is usually caused by a bug in the provider where the type of a property doesn’t match the value from API. Could you file an issue in https://github.com/pulumi/pulumi-aws/issues? Also, a broader improvement is tracked in https://github.com/pulumi/pulumi/issues/7329
f
Thank you @tall-librarian-49374