Conditionally create CodePipeline actions based on CloudFormation conditions
As per the above link fn::if works within aws codepipeline but unfortunately its not working for me
Below is my code:
- !If
- testCondition
- Name: SwitchEnvironment
ActionTypeId:
Category: Build
Owner: AWS
Provider: CodeBuild
Version: 1
Configuration:
ProjectName: !Ref SwitchDeployment
InputArtifacts:
- Name: Source
OutputArtifacts:
- Name: SwitchDeployment
RunOrder: 1
- !Ref AWS::NoValue
If I set this condition false, the cloudformation says "Property Actions cannot be empty".