theonestack / cfhighlander

Cloudformation DSL and component library
MIT License
25 stars 23 forks source link

Support publishing additional artifacts #165

Open aaronwalker opened 3 years ago

aaronwalker commented 3 years ago

I would be useful to be able to include additional artifacts in the S3 publish for components.

Use Case: The api gateway component supports loading a api swagger file from S3 so it would be useful to just include the api swagger definition is the published templates instead of requiring an additional deployment step

maybe something like

PublishArtifact file: "my-swagger.yaml", key: "my-swagger-#{component_version}.yaml"

or

S3Artifact file: "my-swagger.yaml", key: "my-swagger-#{component_version}.yaml"

The key could be optional

aaronwalker commented 3 years ago

@Guslington @toshke thoughts?

Guslington commented 3 years ago

@aaronwalker would it be worth exposing the artifact key value to a component

Api:
    Type: AWS::ApiGateway::RestApi
    Properties: 
    BodyS3Location: 
        Bucket: distribution_bucket
        Key: artifact_key['name']