https://pulumi.com logo
Title
f

fast-cpu-35756

06/24/2021, 5:23 PM
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:
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:
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

tall-librarian-49374

06/24/2021, 7:56 PM
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

fast-cpu-35756

06/25/2021, 6:57 AM
Thank you @tall-librarian-49374