Skip to content

I want to add to the array instead of overwriting it with extensions. #392

@kenkubomi

Description

@kenkubomi

Is it possible to add my own origins and cache behaviors to the CloudFront distribution generated by the plugin?
I tried adding it with extensions, but the existing array was overwritten.

constructs:
  website:
    type: server-side-website
    extensions:
      distribution:
        Properties:
          DistributionConfig:
            CacheBehaviors:
              - TargetOriginId: !GetAtt FilesBucket.RegionalDomainName
                PathPattern: /files/*
                ViewerProtocolPolicy: redirect-to-https
                CachePolicyId: 658327ea-f89d-4fab-a63d-7e88639e58f6
                TrustedKeyGroups:
                 - s3-for-presigned-url-group
            Origins:
              - DomainName: !GetAtt FilesBucket.RegionalDomainName
                Id: !GetAtt FilesBucket.RegionalDomainName
                OriginAccessControlId: !GetAtt CloudFrontOriginAccessControl.Id
                S3OriginConfig:
                  OriginAccessIdentity: ''

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions