aws / aws/aws-toolkit-azure-devops
Are Inline defined Parameter types in Azure DevOps Pipeline configuration type safe, when passed in to CloudFormationCreateOrUpdateStack@1?
- Dominant language
- TypeScript
- Stars
- 258
- Forks
- 114
- PR merge metrics
- No merged PRs in 30d
Description
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](https://github.com/aws/aws-toolkit-azure-devops/files/6469715/cloudformation-template.txt)
It takes two parameters as inputs.
* String Type - String type parameter
* NumberType - Number type parameter
```
NumberType:
Type: Number
Description: A Number type parameter
Default: 1
StringType:
Type: String
Description: A string type parameter, captured as a number
Default: astring
```
The pipeline that executes the CloudFormation template as attached below, the parameters are also in the code block as follows.
```
- name: NumberType
displayName: BucketPrefix
type: number
default: 1
- name: StringType
displayName: StringType
type: string
default: "1"
```
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](https://github.com/aws/aws-toolkit-azure-devops/files/6469719/pipeline.txt)
I've attached the full error output from this step (refer to step.log).
[pipeline.log](https://github.com/aws/aws-toolkit-azure-devops/files/6469738/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?
Contributor guide
Research direction
Start by reviewing the attached pipeline.log alongside pipeline.txt, cloudformation-template.txt, and the CloudFormationCreateOrUpdateStack@1 step. Reproduce the deployment with both the number and string parameters, then determine whether the task passes the number as a non-string value; done means the deployment succeeds with correctly handled parameter values or the behavior is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, azure
- Domain
- cloud, devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100