Retain existing files in codepipeline

I’m deploying code from codecommit to an EC2 instance that already has a version of the code. I get an error saying the file already exists.
Manually in AWS this is set during create a deployment → additional deployment behaviour settings, content options - retain the content. I can’t see this option in aws_codepipeline. In CloudFormation it exists and is called ActionMode (and in the aws api its called fileExistsBehavior). Anyone know why this isn’t in Terraform? Is there a workaround? I want to keep my code running on EC2 and only deploy changed files in codecommit.