cloudtools / troposphere

troposphere - Python library to create AWS CloudFormation descriptions
BSD 2-Clause "Simplified" License
4.93k stars 1.45k forks source link

codepipeline::OutputArtifacts does not support Files property #2274

Open pdpol opened 4 hours ago

pdpol commented 4 hours ago

I'm putting together a CodePipeline stack and found that the OutputArtifacts class does not support the documented Files property.

Is this a known issue, and are there known workarounds to supplying the path of artifacts in a build action that I need to access in the next stage?

markpeek commented 3 hours ago

The Files property is missing from the resource specification so troposphere doesn't know about it. I did patch it in via PR #2275. You can pull that branch to see if it is actually implemented in CloudFormation.

pdpol commented 2 hours ago

Thank you @markpeek! I was able to successfully generate a valid yaml template with the patch. I am now running into unrelated errors in CloudFormation that I'll have to figure out but this does appear to add the proper support.

pdpol commented 2 hours ago

Unfortunately it appears the error I got may actually be related. Essentially, I had a working build stage with a single action that I wanted to add an output artifact to as well as a subsequent test stage with an input artifact that references it.

While I was able to generate a template with the patch, updating my stack resulted in this error:

Resource handler returned message: "The following action cannot contain a commands field: BuildAction. To use the commands field, use a compute action. (Service: CodePipeline, Status Code: 400, Request ID: 6f0ba7ae-68a2-4a9d-a49d-93a840952ec0)" (RequestToken: 35247562-9ed4-d609-0f30-d0f6a30a0193, HandlerErrorCode: GeneralServiceException)

Removing the Files property managed to fix it, so I think there's probably something I'm not understanding about the purpose of that property or how it works that is both causing the error and potentially also not required for my purposes.