I have the following on my AWS CodePipeline Cloudformation template:
Variables:
- Name: VARIABLE_NAME
Description: Some description
DefaultValue: ""
Version: 2
When I create the CodePipeline using Cloudformation, I get the following error:
Resource handler returned message: "Pipeline variable can only be used with V2 pipelines"
I am also getting the following error when I do it manually on the UI:
Any idea what I'm doing wrong or is it an AWS issue?
I'm not familiar with Cloudformation but when using terraform you can define the pipeline version using pipeline_type = "V2"
, so I'd assume it's the same for Cloudformation as well.
According to the doc you should use PipelineType: "V2"
instead of Version: 2
.