Skip to content

Are Inline defined Parameter types in Azure DevOps Pipeline configuration type safe, when passed in to CloudFormationCreateOrUpdateStack@1? #410

@j0nathontayl0r

Description

@j0nathontayl0r

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.

  • 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

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions