{"action":"created","issue":{"url":"https://api.github.com/repos/dougmoscrop/serverless-plugin-split-stacks/issues/14","repository_url":"https://api.github.com/repos/dougmoscrop/serverless-plugin-split-stacks","labels_url":"https://api.github.com/repos/dougmoscrop/serverless-plugin-split-stacks/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/dougmoscrop/serverless-plugin-split-stacks/issues/14/comments","events_url":"https://api.github.com/repos/dougmoscrop/serverless-plugin-split-stacks/issues/14/events","html_url":"https://github.com/dougmoscrop/serverless-plugin-split-stacks/pull/14","id":267630145,"number":14,"title":"Nested stack per function","user":{"login":"medikoo","id":122434,"avatar_url":"https://avatars3.githubusercontent.com/u/122434?v=4","gravatar_id":"","url":"https://api.github.com/users/medikoo","html_url":"https://github.com/medikoo","followers_url":"https://api.github.com/users/medikoo/followers","following_url":"https://api.github.com/users/medikoo/following{/other_user}","gists_url":"https://api.github.com/users/medikoo/gists{/gist_id}","starred_url":"https://api.github.com/users/medikoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/medikoo/subscriptions","organizations_url":"https://api.github.com/users/medikoo/orgs","repos_url":"https://api.github.com/users/medikoo/repos","events_url":"https://api.github.com/users/medikoo/events{/privacy}","received_events_url":"https://api.github.com/users/medikoo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"dougmoscrop","id":586516,"avatar_url":"https://avatars2.githubusercontent.com/u/586516?v=4","gravatar_id":"","url":"https://api.github.com/users/dougmoscrop","html_url":"https://github.com/dougmoscrop","followers_url":"https://api.github.com/users/dougmoscrop/followers","following_url":"https://api.github.com/users/dougmoscrop/following{/other_user}","gists_url":"https://api.github.com/users/dougmoscrop/gists{/gist_id}","starred_url":"https://api.github.com/users/dougmoscrop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dougmoscrop/subscriptions","organizations_url":"https://api.github.com/users/dougmoscrop/orgs","repos_url":"https://api.github.com/users/dougmoscrop/repos","events_url":"https://api.github.com/users/dougmoscrop/events{/privacy}","received_events_url":"https://api.github.com/users/dougmoscrop/received_events","type":"User","site_admin":false},"assignees":[{"login":"dougmoscrop","id":586516,"avatar_url":"https://avatars2.githubusercontent.com/u/586516?v=4","gravatar_id":"","url":"https://api.github.com/users/dougmoscrop","html_url":"https://github.com/dougmoscrop","followers_url":"https://api.github.com/users/dougmoscrop/followers","following_url":"https://api.github.com/users/dougmoscrop/following{/other_user}","gists_url":"https://api.github.com/users/dougmoscrop/gists{/gist_id}","starred_url":"https://api.github.com/users/dougmoscrop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dougmoscrop/subscriptions","organizations_url":"https://api.github.com/users/dougmoscrop/orgs","repos_url":"https://api.github.com/users/dougmoscrop/repos","events_url":"https://api.github.com/users/dougmoscrop/events{/privacy}","received_events_url":"https://api.github.com/users/dougmoscrop/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/dougmoscrop/serverless-plugin-split-stacks/milestones/1","html_url":"https://github.com/dougmoscrop/serverless-plugin-split-stacks/milestone/1","labels_url":"https://api.github.com/repos/dougmoscrop/serverless-plugin-split-stacks/milestones/1/labels","id":3048671,"number":1,"title":"2.0","description":null,"creator":{"login":"dougmoscrop","id":586516,"avatar_url":"https://avatars2.githubusercontent.com/u/586516?v=4","gravatar_id":"","url":"https://api.github.com/users/dougmoscrop","html_url":"https://github.com/dougmoscrop","followers_url":"https://api.github.com/users/dougmoscrop/followers","following_url":"https://api.github.com/users/dougmoscrop/following{/other_user}","gists_url":"https://api.github.com/users/dougmoscrop/gists{/gist_id}","starred_url":"https://api.github.com/users/dougmoscrop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dougmoscrop/subscriptions","organizations_url":"https://api.github.com/users/dougmoscrop/orgs","repos_url":"https://api.github.com/users/dougmoscrop/repos","events_url":"https://api.github.com/users/dougmoscrop/events{/privacy}","received_events_url":"https://api.github.com/users/dougmoscrop/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2018-01-19T14:48:00Z","updated_at":"2018-01-19T14:48:01Z","due_on":null,"closed_at":null},"comments":25,"created_at":"2017-10-23T11:18:29Z","updated_at":"2018-03-04T16:46:27Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/dougmoscrop/serverless-plugin-split-stacks/pulls/14","html_url":"https://github.com/dougmoscrop/serverless-plugin-split-stacks/pull/14","diff_url":"https://github.com/dougmoscrop/serverless-plugin-split-stacks/pull/14.diff","patch_url":"https://github.com/dougmoscrop/serverless-plugin-split-stacks/pull/14.patch"},"body":"On top of #10 and #13. I managed to setup a nested stack per function generic configuration\r\n\r\nFor the record, it's tested to work with following types of lambda specific resources (as configured directly by Serverless framework).\r\n- `AWS::Lambda::Function`\r\n- `AWS::Lambda::Version`\r\n- `AWS::Lambda::Permission`\r\n- `AWS::Logs::LogGroup`\r\n- `AWS::ApiGateway::Resource`\r\n- `AWS::ApiGateway::Method`\r\n- `AWS::Events::Rule`\r\n\r\nI believe it should work with others, but that was not tested.\r\n\r\nAny custom resources will automatically land in function nested stack if their logical ids is prefixed with lambda normalized name (it's also convention that Serverless internally follows for resource logical ids)\r\n\r\nWhile currently this plugin plays gently and offers to move only the resources that can be moved across the stacks between deployments, the described here the _stack per function_ setup is not as graceful.\r\nThe only way to make it work in existing projects is to _remove_ the mono stack and redeploy nested stacks config with this plugin turned on as a fresh new stack deployment.\r\nIt's purely because CloudFormation doesn't support _move_ of resources of certain types among stacks (it crashes with _resource already exists_).\r\n\r\n@dougmoscrop let me know what's your strategy towards that. do you think such configuration should be a part of this plugin (?) If so, let me know, I'll be happy to prepare a PR.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/dougmoscrop/serverless-plugin-split-stacks/issues/comments/370243707","html_url":"https://github.com/dougmoscrop/serverless-plugin-split-stacks/pull/14#issuecomment-370243707","issue_url":"https://api.github.com/repos/dougmoscrop/serverless-plugin-split-stacks/issues/14","id":370243707,"user":{"login":"mataide","id":28991236,"avatar_url":"https://avatars2.githubusercontent.com/u/28991236?v=4","gravatar_id":"","url":"https://api.github.com/users/mataide","html_url":"https://github.com/mataide","followers_url":"https://api.github.com/users/mataide/followers","following_url":"https://api.github.com/users/mataide/following{/other_user}","gists_url":"https://api.github.com/users/mataide/gists{/gist_id}","starred_url":"https://api.github.com/users/mataide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mataide/subscriptions","organizations_url":"https://api.github.com/users/mataide/orgs","repos_url":"https://api.github.com/users/mataide/repos","events_url":"https://api.github.com/users/mataide/events{/privacy}","received_events_url":"https://api.github.com/users/mataide/received_events","type":"User","site_admin":false},"created_at":"2018-03-04T16:46:27Z","updated_at":"2018-03-04T16:46:27Z","author_association":"NONE","body":"I am sure that the file is reading from here:\r\n\r\n```\r\n// Load eventual stacks map customizations\r\n    const customizationsPath = path.resolve(serverless.config.servicePath, 'stacks-map.js');\r\n```\r\nBut the number of resources is the same.\r\n\r\nThis configuration is confusing, it should be a config inside serverless.yml just like others plugins. Ex:\r\n\r\n```\r\ncustom:\r\n  splitstacks:\r\n    perLambda: true\r\n```"}}
{"actor":{"display_login":"mataide"}}