zalando-stups / senza

Deploy immutable application stacks and create and execute AWS CloudFormation templates in a sane way

Home Page:https://pypi.python.org/pypi/stups-senza

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make property overwriting for senza components less destructive

Tar-Minyatur opened this issue · comments

When using a senza component to build a stack, it would be great if it was possible to overwrite properties in a less destructive way.

Expected Behavior

We are using the default component WeightedDnsElasticLoadBalancer. Now we want to open port 80 in addition to port 443 in order to allow our application to redirect users from http to https. We want to keep all of the configuration and extend it with one additional entry.

Actual Behavior

Currently this is not possible, because we can only use the option to overwrite the Listeners property like this:

  - AppLoadBalancer:
      Type: Senza::WeightedDnsElasticLoadBalancer
      ...
      Listeners:
      - LoadBalancerPort: 80
        Protocol: HTTP
        InstancePort: 80
        InstanceProtocol: HTTP
      - LoadBalancerPort: 443
        Protocol: HTTPS
        InstancePort: 80
        InstanceProtocol: HTTP
        SSLCertificateId: "????"

Doing this, we completely miss out on the ease of use that the component provides with regard to selecting the correct SSL certificate, because our definition completely overwrites the one senza creates.

As a solution it would be nice if we could either flag our Listeners entry as "these are additional, not a replacement" or alternatively have a way of tell senza to inject the SSLCertificateId.