{"id":15476026,"url":"https://github.com/lesnitsky/serverless-plugin-resource-deep-merge","last_synced_at":"2025-03-28T13:26:41.555Z","repository":{"id":85541819,"uuid":"316501687","full_name":"lesnitsky/serverless-plugin-resource-deep-merge","owner":"lesnitsky","description":"Serverless plugin which allows updating CloudFormation template","archived":false,"fork":false,"pushed_at":"2020-11-30T15:45:32.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-19T02:29:43.945Z","etag":null,"topics":["serverless","serverless-plugin"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lesnitsky.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-27T12:56:47.000Z","updated_at":"2022-03-26T17:18:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"0aa9b498-38b2-4527-a0d8-a54a9f40e57b","html_url":"https://github.com/lesnitsky/serverless-plugin-resource-deep-merge","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"73efac7a4e5d17cb9f56a45a8948bbeb7b6ddcae"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lesnitsky%2Fserverless-plugin-resource-deep-merge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lesnitsky%2Fserverless-plugin-resource-deep-merge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lesnitsky%2Fserverless-plugin-resource-deep-merge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lesnitsky%2Fserverless-plugin-resource-deep-merge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lesnitsky","download_url":"https://codeload.github.com/lesnitsky/serverless-plugin-resource-deep-merge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246036281,"owners_count":20713216,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["serverless","serverless-plugin"],"created_at":"2024-10-02T03:22:00.684Z","updated_at":"2025-03-28T13:26:41.534Z","avatar_url":"https://github.com/lesnitsky.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Serverless plugin resource deep merge\n\n## Installation\n\n```sh\nnpm i -D serverless-plugin-resource-deep-merge\n```\n\n```yaml\nplugins:\n  - serverless-plugin-resource-deep-merge\n```\n\n## Usage\n\n`serverless.yaml`\n\n```yaml\nfunctions:\n  urlrewrite:\n    handler: handler.urlrewrite\n    events:\n      - cloudFront:\n          eventType: origin-request\n          origin: https://${self:custom.s3Origin}\n          isDefaultOrigin: true\n```\n\n☝️ This Lambda@Edge function will create a CloudFront distribution which is, unfortunately, hardly customizable due to the default behavior of `resources.extensions`:\n\n[As per doc](https://www.serverless.com/framework/docs/providers/aws/guide/resources/):\n\n\u003e Here's how the extension logic is defined:\n\u003e | Resource attribute | Operation |\n\u003e | ------------------ | -------------------------------------------------------------------------------------------------------------------- |\n\u003e | Properties | Merge. If a property with the same name exists in the resource, the value will be replaced with the extension value. |\n\n`Properties.DistributionConfig` replacement equals to handcrafted CloudFront config, so `deepmerge` of config might be more useful. For example, if you want to add a custom alias to your CloudFront distribution, add the following section to the `serverless.yaml`\n\n```yaml\ncustom:\n  mergeResources:\n    CloudFrontDistribution:\n      Properties:\n        DistributionConfig:\n          Aliases:\n            - some.domain.com\n```\n\n## Contributors\n\n- [Andrei Lesnitsky](https://github.com/lesnitsky_dev)\n\n## LICENSE\n\nWTFPL\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flesnitsky%2Fserverless-plugin-resource-deep-merge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flesnitsky%2Fserverless-plugin-resource-deep-merge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flesnitsky%2Fserverless-plugin-resource-deep-merge/lists"}