{"action":"created","comment":{"url":"https://api.github.com/repos/awslabs/aws-cdk/pulls/comments/220894395","pull_request_review_id":159405744,"id":220894395,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMDg5NDM5NQ==","diff_hunk":"@@ -93,23 +112,83 @@ export class Resource extends Referenceable {\n         this.dependsOn.push(...other);\n     }\n \n+    /**\n+     * Adds an override to the synthesized CloudFormation resource. To add a\n+     * property override, either use `addPropertyOverride` or prefix `path` with\n+     * \"Properties.\" (i.e. `Properties.TopicName`).\n+     *\n+     * @param path  The path of the property, you can use dot notation to\n+     *              override values in complex types. Any intermdediate keys\n+     *              will be created as needed.\n+     * @param value The value. Could be primitive or complex.\n+     */\n+    public addOverride(path: string, value: any) {\n+        const parts = path.split('.');\n+        let curr: any = this.rawOverrides;\n+\n+        while (parts.length > 1) {\n+            const key = parts.shift()!;\n+\n+            // if we can't recurse further or the previous value is not an\n+            // object overwrite it with an object.\n+            const isObject = curr[key] != null && typeof(curr[key]) === 'object' && !Array.isArray(curr[key]);\n+            if (!isObject) {\n+                curr[key] = { };\n+            }\n+\n+            curr = curr[key];\n+        }\n+\n+        const lastKey = parts.shift()!;\n+        curr[lastKey] = value;\n+    }\n+\n+    /**\n+     * Syntactic sugar for `addOverride(path, undefined)`.\n+     * @param path The path of the value to delete\n+     */\n+    public addDeletionOverride(path: string) {\n+        this.addOverride(path, undefined);\n+    }\n+\n+    /**\n+     * Adds an override to a resource property.\n+     *\n+     * Syntactic sugar for `addOverride(\"Properties.<...>\", value)`.\n+     *\n+     * @param propertyPath The path of the property\n+     * @param value The value\n+     */\n+    public addPropertyOverride(propertyPath: string, value: any) {","path":"packages/@aws-cdk/cdk/lib/cloudformation/resource.ts","position":82,"original_position":82,"commit_id":"6e48773430cafaf033caafd4692c6c77fa917dca","original_commit_id":"6e48773430cafaf033caafd4692c6c77fa917dca","user":{"login":"rix0rrr","id":524162,"node_id":"MDQ6VXNlcjUyNDE2Mg==","avatar_url":"https://avatars2.githubusercontent.com/u/524162?v=4","gravatar_id":"","url":"https://api.github.com/users/rix0rrr","html_url":"https://github.com/rix0rrr","followers_url":"https://api.github.com/users/rix0rrr/followers","following_url":"https://api.github.com/users/rix0rrr/following{/other_user}","gists_url":"https://api.github.com/users/rix0rrr/gists{/gist_id}","starred_url":"https://api.github.com/users/rix0rrr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rix0rrr/subscriptions","organizations_url":"https://api.github.com/users/rix0rrr/orgs","repos_url":"https://api.github.com/users/rix0rrr/repos","events_url":"https://api.github.com/users/rix0rrr/events{/privacy}","received_events_url":"https://api.github.com/users/rix0rrr/received_events","type":"User","site_admin":false},"body":"Is it honestly even worth having these? The syntactic sugar they offer is trivial.","created_at":"2018-09-27T11:57:26Z","updated_at":"2018-09-27T11:58:46Z","html_url":"https://github.com/awslabs/aws-cdk/pull/784#discussion_r220894395","pull_request_url":"https://api.github.com/repos/awslabs/aws-cdk/pulls/784","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/awslabs/aws-cdk/pulls/comments/220894395"},"html":{"href":"https://github.com/awslabs/aws-cdk/pull/784#discussion_r220894395"},"pull_request":{"href":"https://api.github.com/repos/awslabs/aws-cdk/pulls/784"}}},"pull_request":{"url":"https://api.github.com/repos/awslabs/aws-cdk/pulls/784","id":218440791,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE4NDQwNzkx","html_url":"https://github.com/awslabs/aws-cdk/pull/784","diff_url":"https://github.com/awslabs/aws-cdk/pull/784.diff","patch_url":"https://github.com/awslabs/aws-cdk/pull/784.patch","issue_url":"https://api.github.com/repos/awslabs/aws-cdk/issues/784","number":784,"state":"open","locked":false,"title":"feat(core): resource overrides (escape hatch)","user":{"login":"eladb","id":598796,"node_id":"MDQ6VXNlcjU5ODc5Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/598796?v=4","gravatar_id":"","url":"https://api.github.com/users/eladb","html_url":"https://github.com/eladb","followers_url":"https://api.github.com/users/eladb/followers","following_url":"https://api.github.com/users/eladb/following{/other_user}","gists_url":"https://api.github.com/users/eladb/gists{/gist_id}","starred_url":"https://api.github.com/users/eladb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eladb/subscriptions","organizations_url":"https://api.github.com/users/eladb/orgs","repos_url":"https://api.github.com/users/eladb/repos","events_url":"https://api.github.com/users/eladb/events{/privacy}","received_events_url":"https://api.github.com/users/eladb/received_events","type":"User","site_admin":false},"body":"Adds capabilities and documentation to allow users to add overrides to synthesized resource definitions in case of gaps in L2s.\r\n\r\nSee [documentation topic](https://github.com/awslabs/aws-cdk/blob/521570a7c3a3788ce313f310ccb35bd1484ad2f5/docs/src/aws-construct-lib.rst#access-the-aws-cloudformation-layer)\r\n\r\n\r\n- resource.addOverride(path, value)\r\n- resource.addPropertyOverride(propertyPath, value)\r\n- resource.addDeletionOverride(p, v)\r\n- resource.addPropertyDeletionOVerride(pp, v)\r\n- xxxResource.propertyOverrides (of type XxxResourceProps)\r\n\r\nFixes #606\r\n\r\nBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license.\r\n","created_at":"2018-09-26T20:14:23Z","updated_at":"2018-09-27T11:58:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"57258341a7680fc6a28db968ec8485b34e272264","assignee":null,"assignees":[],"requested_reviewers":[{"login":"RomainMuller","id":411689,"node_id":"MDQ6VXNlcjQxMTY4OQ==","avatar_url":"https://avatars2.githubusercontent.com/u/411689?v=4","gravatar_id":"","url":"https://api.github.com/users/RomainMuller","html_url":"https://github.com/RomainMuller","followers_url":"https://api.github.com/users/RomainMuller/followers","following_url":"https://api.github.com/users/RomainMuller/following{/other_user}","gists_url":"https://api.github.com/users/RomainMuller/gists{/gist_id}","starred_url":"https://api.github.com/users/RomainMuller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RomainMuller/subscriptions","organizations_url":"https://api.github.com/users/RomainMuller/orgs","repos_url":"https://api.github.com/users/RomainMuller/repos","events_url":"https://api.github.com/users/RomainMuller/events{/privacy}","received_events_url":"https://api.github.com/users/RomainMuller/received_events","type":"User","site_admin":false},{"login":"Doug-AWS","id":16107690,"node_id":"MDQ6VXNlcjE2MTA3Njkw","avatar_url":"https://avatars1.githubusercontent.com/u/16107690?v=4","gravatar_id":"","url":"https://api.github.com/users/Doug-AWS","html_url":"https://github.com/Doug-AWS","followers_url":"https://api.github.com/users/Doug-AWS/followers","following_url":"https://api.github.com/users/Doug-AWS/following{/other_user}","gists_url":"https://api.github.com/users/Doug-AWS/gists{/gist_id}","starred_url":"https://api.github.com/users/Doug-AWS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Doug-AWS/subscriptions","organizations_url":"https://api.github.com/users/Doug-AWS/orgs","repos_url":"https://api.github.com/users/Doug-AWS/repos","events_url":"https://api.github.com/users/Doug-AWS/events{/privacy}","received_events_url":"https://api.github.com/users/Doug-AWS/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/awslabs/aws-cdk/pulls/784/commits","review_comments_url":"https://api.github.com/repos/awslabs/aws-cdk/pulls/784/comments","review_comment_url":"https://api.github.com/repos/awslabs/aws-cdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/awslabs/aws-cdk/issues/784/comments","statuses_url":"https://api.github.com/repos/awslabs/aws-cdk/statuses/6e48773430cafaf033caafd4692c6c77fa917dca","head":{"label":"awslabs:benisrae/escape-hatch","ref":"benisrae/escape-hatch","sha":"6e48773430cafaf033caafd4692c6c77fa917dca","user":{"login":"awslabs","id":3299148,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyOTkxNDg=","avatar_url":"https://avatars0.githubusercontent.com/u/3299148?v=4","gravatar_id":"","url":"https://api.github.com/users/awslabs","html_url":"https://github.com/awslabs","followers_url":"https://api.github.com/users/awslabs/followers","following_url":"https://api.github.com/users/awslabs/following{/other_user}","gists_url":"https://api.github.com/users/awslabs/gists{/gist_id}","starred_url":"https://api.github.com/users/awslabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awslabs/subscriptions","organizations_url":"https://api.github.com/users/awslabs/orgs","repos_url":"https://api.github.com/users/awslabs/repos","events_url":"https://api.github.com/users/awslabs/events{/privacy}","received_events_url":"https://api.github.com/users/awslabs/received_events","type":"Organization","site_admin":false},"repo":{"id":105808767,"node_id":"MDEwOlJlcG9zaXRvcnkxMDU4MDg3Njc=","name":"aws-cdk","full_name":"awslabs/aws-cdk","private":false,"owner":{"login":"awslabs","id":3299148,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyOTkxNDg=","avatar_url":"https://avatars0.githubusercontent.com/u/3299148?v=4","gravatar_id":"","url":"https://api.github.com/users/awslabs","html_url":"https://github.com/awslabs","followers_url":"https://api.github.com/users/awslabs/followers","following_url":"https://api.github.com/users/awslabs/following{/other_user}","gists_url":"https://api.github.com/users/awslabs/gists{/gist_id}","starred_url":"https://api.github.com/users/awslabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awslabs/subscriptions","organizations_url":"https://api.github.com/users/awslabs/orgs","repos_url":"https://api.github.com/users/awslabs/repos","events_url":"https://api.github.com/users/awslabs/events{/privacy}","received_events_url":"https://api.github.com/users/awslabs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/awslabs/aws-cdk","description":"The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code","fork":false,"url":"https://api.github.com/repos/awslabs/aws-cdk","forks_url":"https://api.github.com/repos/awslabs/aws-cdk/forks","keys_url":"https://api.github.com/repos/awslabs/aws-cdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/awslabs/aws-cdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/awslabs/aws-cdk/teams","hooks_url":"https://api.github.com/repos/awslabs/aws-cdk/hooks","issue_events_url":"https://api.github.com/repos/awslabs/aws-cdk/issues/events{/number}","events_url":"https://api.github.com/repos/awslabs/aws-cdk/events","assignees_url":"https://api.github.com/repos/awslabs/aws-cdk/assignees{/user}","branches_url":"https://api.github.com/repos/awslabs/aws-cdk/branches{/branch}","tags_url":"https://api.github.com/repos/awslabs/aws-cdk/tags","blobs_url":"https://api.github.com/repos/awslabs/aws-cdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/awslabs/aws-cdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/awslabs/aws-cdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/awslabs/aws-cdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/awslabs/aws-cdk/statuses/{sha}","languages_url":"https://api.github.com/repos/awslabs/aws-cdk/languages","stargazers_url":"https://api.github.com/repos/awslabs/aws-cdk/stargazers","contributors_url":"https://api.github.com/repos/awslabs/aws-cdk/contributors","subscribers_url":"https://api.github.com/repos/awslabs/aws-cdk/subscribers","subscription_url":"https://api.github.com/repos/awslabs/aws-cdk/subscription","commits_url":"https://api.github.com/repos/awslabs/aws-cdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/awslabs/aws-cdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/awslabs/aws-cdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/awslabs/aws-cdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/awslabs/aws-cdk/contents/{+path}","compare_url":"https://api.github.com/repos/awslabs/aws-cdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/awslabs/aws-cdk/merges","archive_url":"https://api.github.com/repos/awslabs/aws-cdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/awslabs/aws-cdk/downloads","issues_url":"https://api.github.com/repos/awslabs/aws-cdk/issues{/number}","pulls_url":"https://api.github.com/repos/awslabs/aws-cdk/pulls{/number}","milestones_url":"https://api.github.com/repos/awslabs/aws-cdk/milestones{/number}","notifications_url":"https://api.github.com/repos/awslabs/aws-cdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/awslabs/aws-cdk/labels{/name}","releases_url":"https://api.github.com/repos/awslabs/aws-cdk/releases{/id}","deployments_url":"https://api.github.com/repos/awslabs/aws-cdk/deployments","created_at":"2017-10-04T19:22:36Z","updated_at":"2018-09-27T10:11:06Z","pushed_at":"2018-09-27T11:37:41Z","git_url":"git://github.com/awslabs/aws-cdk.git","ssh_url":"git@github.com:awslabs/aws-cdk.git","clone_url":"https://github.com/awslabs/aws-cdk.git","svn_url":"https://github.com/awslabs/aws-cdk","homepage":"https://awslabs.github.io/aws-cdk","size":104079,"stargazers_count":909,"watchers_count":909,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":58,"mirror_url":null,"archived":false,"open_issues_count":224,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":58,"open_issues":224,"watchers":909,"default_branch":"master"}},"base":{"label":"awslabs:master","ref":"master","sha":"8f4cb26dc85cd274576617c4f44910a2df69da9f","user":{"login":"awslabs","id":3299148,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyOTkxNDg=","avatar_url":"https://avatars0.githubusercontent.com/u/3299148?v=4","gravatar_id":"","url":"https://api.github.com/users/awslabs","html_url":"https://github.com/awslabs","followers_url":"https://api.github.com/users/awslabs/followers","following_url":"https://api.github.com/users/awslabs/following{/other_user}","gists_url":"https://api.github.com/users/awslabs/gists{/gist_id}","starred_url":"https://api.github.com/users/awslabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awslabs/subscriptions","organizations_url":"https://api.github.com/users/awslabs/orgs","repos_url":"https://api.github.com/users/awslabs/repos","events_url":"https://api.github.com/users/awslabs/events{/privacy}","received_events_url":"https://api.github.com/users/awslabs/received_events","type":"Organization","site_admin":false},"repo":{"id":105808767,"node_id":"MDEwOlJlcG9zaXRvcnkxMDU4MDg3Njc=","name":"aws-cdk","full_name":"awslabs/aws-cdk","private":false,"owner":{"login":"awslabs","id":3299148,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyOTkxNDg=","avatar_url":"https://avatars0.githubusercontent.com/u/3299148?v=4","gravatar_id":"","url":"https://api.github.com/users/awslabs","html_url":"https://github.com/awslabs","followers_url":"https://api.github.com/users/awslabs/followers","following_url":"https://api.github.com/users/awslabs/following{/other_user}","gists_url":"https://api.github.com/users/awslabs/gists{/gist_id}","starred_url":"https://api.github.com/users/awslabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awslabs/subscriptions","organizations_url":"https://api.github.com/users/awslabs/orgs","repos_url":"https://api.github.com/users/awslabs/repos","events_url":"https://api.github.com/users/awslabs/events{/privacy}","received_events_url":"https://api.github.com/users/awslabs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/awslabs/aws-cdk","description":"The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code","fork":false,"url":"https://api.github.com/repos/awslabs/aws-cdk","forks_url":"https://api.github.com/repos/awslabs/aws-cdk/forks","keys_url":"https://api.github.com/repos/awslabs/aws-cdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/awslabs/aws-cdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/awslabs/aws-cdk/teams","hooks_url":"https://api.github.com/repos/awslabs/aws-cdk/hooks","issue_events_url":"https://api.github.com/repos/awslabs/aws-cdk/issues/events{/number}","events_url":"https://api.github.com/repos/awslabs/aws-cdk/events","assignees_url":"https://api.github.com/repos/awslabs/aws-cdk/assignees{/user}","branches_url":"https://api.github.com/repos/awslabs/aws-cdk/branches{/branch}","tags_url":"https://api.github.com/repos/awslabs/aws-cdk/tags","blobs_url":"https://api.github.com/repos/awslabs/aws-cdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/awslabs/aws-cdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/awslabs/aws-cdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/awslabs/aws-cdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/awslabs/aws-cdk/statuses/{sha}","languages_url":"https://api.github.com/repos/awslabs/aws-cdk/languages","stargazers_url":"https://api.github.com/repos/awslabs/aws-cdk/stargazers","contributors_url":"https://api.github.com/repos/awslabs/aws-cdk/contributors","subscribers_url":"https://api.github.com/repos/awslabs/aws-cdk/subscribers","subscription_url":"https://api.github.com/repos/awslabs/aws-cdk/subscription","commits_url":"https://api.github.com/repos/awslabs/aws-cdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/awslabs/aws-cdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/awslabs/aws-cdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/awslabs/aws-cdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/awslabs/aws-cdk/contents/{+path}","compare_url":"https://api.github.com/repos/awslabs/aws-cdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/awslabs/aws-cdk/merges","archive_url":"https://api.github.com/repos/awslabs/aws-cdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/awslabs/aws-cdk/downloads","issues_url":"https://api.github.com/repos/awslabs/aws-cdk/issues{/number}","pulls_url":"https://api.github.com/repos/awslabs/aws-cdk/pulls{/number}","milestones_url":"https://api.github.com/repos/awslabs/aws-cdk/milestones{/number}","notifications_url":"https://api.github.com/repos/awslabs/aws-cdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/awslabs/aws-cdk/labels{/name}","releases_url":"https://api.github.com/repos/awslabs/aws-cdk/releases{/id}","deployments_url":"https://api.github.com/repos/awslabs/aws-cdk/deployments","created_at":"2017-10-04T19:22:36Z","updated_at":"2018-09-27T10:11:06Z","pushed_at":"2018-09-27T11:37:41Z","git_url":"git://github.com/awslabs/aws-cdk.git","ssh_url":"git@github.com:awslabs/aws-cdk.git","clone_url":"https://github.com/awslabs/aws-cdk.git","svn_url":"https://github.com/awslabs/aws-cdk","homepage":"https://awslabs.github.io/aws-cdk","size":104079,"stargazers_count":909,"watchers_count":909,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":58,"mirror_url":null,"archived":false,"open_issues_count":224,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":58,"open_issues":224,"watchers":909,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/awslabs/aws-cdk/pulls/784"},"html":{"href":"https://github.com/awslabs/aws-cdk/pull/784"},"issue":{"href":"https://api.github.com/repos/awslabs/aws-cdk/issues/784"},"comments":{"href":"https://api.github.com/repos/awslabs/aws-cdk/issues/784/comments"},"review_comments":{"href":"https://api.github.com/repos/awslabs/aws-cdk/pulls/784/comments"},"review_comment":{"href":"https://api.github.com/repos/awslabs/aws-cdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/awslabs/aws-cdk/pulls/784/commits"},"statuses":{"href":"https://api.github.com/repos/awslabs/aws-cdk/statuses/6e48773430cafaf033caafd4692c6c77fa917dca"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"rix0rrr"}}