Open j0nathontayl0r opened 3 years ago
Edit: updated original comment with a simpler CloudFormation template. You should be able to execute the Pipeline to deploy the CloudFormation template and replicate the parameter type error I'm shown.
@JDTAY Apologies for the delay here, looks like we're coercing this value into a string: https://github.com/aws/aws-toolkit-azure-devops/blob/master/src/lib/sdkutils.ts#L254
I'm assuming that you're expecting the Adding tag. Key 'ServiceLayerTag', Value '1'
lines in your logs to be numeric rather than a string? Regardless, will take a look.
No need to apologise @bryceitoc9, I missed your reply too. :)
* InvalidParameterType: Expected params.Parameters[0].ParameterValue to be a string
* InvalidParameterType: Expected params.Parameters[1].ParameterValue to be a string
I haven't been able to cause the same bugs when iterating through tags, only parameters. Since tags should always be a string anyway. I haven't spent the time debugging the toolkit to find the bug and had to re-familiarise myself with how I replicated the issue again today. I'm working my way through the source now.
Edit: changed the code to include a simple CloudFormation template that deploys an S3 bucket.
Are Inline defined Parameter types in Azure DevOps Pipeline configuration, correctly passed in to CloudFormationCreateOrUpdateStack@1? Passing in the number type parameter from Azure Pipelines to AWS Toolkit I get the error:
I get the error: ##[error]InvalidParameterType: Expected params.Parameters[1].ParameterValue to be a string
I don't know if the Azure Pipelines service is losing/incorrectly specifying the incorrect parameter type here even though it's explicitly defined as a number or string type. Or if the AWS Toolkit is not parsing the inputs correctly.
Here's my CloudFormation template: cloudformation-template.txt
It takes two parameters as inputs.
The pipeline that executes the CloudFormation template as attached below, the parameters are also in the code block as follows.
The CloudFormation template will deploy with the default values in the CloudFormation console. But when I try to deploy it with the Azure Pipeline shown below, I get the error:
##[error]InvalidParameterType: Expected params.Parameters[1].ParameterValue to be a string
Pipeline config: pipeline.txt
I've attached the full error output from this step (refer to step.log). pipeline.log
I'm not sure where or how, but it seems the parameter types from the Pipeline are being lost, or not respected by AWS Toolkit. Any suggestions?