{"action":"created","comment":{"url":"https://api.github.com/repos/sourced/deploymentmanager-samples/pulls/comments/212748283","pull_request_review_id":149451887,"id":212748283,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMjc0ODI4Mw==","diff_hunk":"@@ -0,0 +1,122 @@\n+# Copyright 2018 Google Inc. All rights reserved.\n+#\n+# Licensed under the Apache License, Version 2.0 (the \"License\");\n+# you may not use this file except in compliance with the License.\n+# You may obtain a copy of the License at\n+#\n+#     http://www.apache.org/licenses/LICENSE-2.0\n+#\n+# Unless required by applicable law or agreed to in writing, software\n+# distributed under the License is distributed on an \"AS IS\" BASIS,\n+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+# See the License for the specific language governing permissions and\n+# limitations under the License.\n+\"\"\" Create a storage bucket resource \"\"\"\n+import string\n+import random\n+\n+\n+def generate_config(context):\n+    \"\"\" Entry point for the deployment resources \"\"\"\n+\n+    resources = []\n+\n+    project_id = context.env['project']\n+    # if autogeneratename is True then generate name\n+    # by appending provided name with a random_string\n+    bucket_name = context.properties['name']","path":"community/cloud-foundation/templates/gcs_bucket/gcs_bucket.py","position":27,"original_position":27,"commit_id":"c0f6c5e8b7dcd7d8d358e5c69b75d432e70789be","original_commit_id":"c0f6c5e8b7dcd7d8d358e5c69b75d432e70789be","user":{"login":"sourced-praveenc","id":42005789,"node_id":"MDQ6VXNlcjQyMDA1Nzg5","avatar_url":"https://avatars0.githubusercontent.com/u/42005789?v=4","gravatar_id":"","url":"https://api.github.com/users/sourced-praveenc","html_url":"https://github.com/sourced-praveenc","followers_url":"https://api.github.com/users/sourced-praveenc/followers","following_url":"https://api.github.com/users/sourced-praveenc/following{/other_user}","gists_url":"https://api.github.com/users/sourced-praveenc/gists{/gist_id}","starred_url":"https://api.github.com/users/sourced-praveenc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sourced-praveenc/subscriptions","organizations_url":"https://api.github.com/users/sourced-praveenc/orgs","repos_url":"https://api.github.com/users/sourced-praveenc/repos","events_url":"https://api.github.com/users/sourced-praveenc/events{/privacy}","received_events_url":"https://api.github.com/users/sourced-praveenc/received_events","type":"User","site_admin":false},"body":"Good idea. But I skipped that because `bucket` name is a required field in the schema. So from the users POV - the schema would force the deployment to error as a required field is missing.","created_at":"2018-08-24T20:35:34Z","updated_at":"2018-08-24T20:35:34Z","html_url":"https://github.com/sourced/deploymentmanager-samples/pull/33#discussion_r212748283","pull_request_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/pulls/33","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/sourced/deploymentmanager-samples/pulls/comments/212748283"},"html":{"href":"https://github.com/sourced/deploymentmanager-samples/pull/33#discussion_r212748283"},"pull_request":{"href":"https://api.github.com/repos/sourced/deploymentmanager-samples/pulls/33"}},"in_reply_to_id":212731367},"pull_request":{"url":"https://api.github.com/repos/sourced/deploymentmanager-samples/pulls/33","id":210800769,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwODAwNzY5","html_url":"https://github.com/sourced/deploymentmanager-samples/pull/33","diff_url":"https://github.com/sourced/deploymentmanager-samples/pull/33.diff","patch_url":"https://github.com/sourced/deploymentmanager-samples/pull/33.patch","issue_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/issues/33","number":33,"state":"open","locked":false,"title":"Cloud Storage Bucket template (Phase 3)","user":{"login":"sourced-praveenc","id":42005789,"node_id":"MDQ6VXNlcjQyMDA1Nzg5","avatar_url":"https://avatars0.githubusercontent.com/u/42005789?v=4","gravatar_id":"","url":"https://api.github.com/users/sourced-praveenc","html_url":"https://github.com/sourced-praveenc","followers_url":"https://api.github.com/users/sourced-praveenc/followers","following_url":"https://api.github.com/users/sourced-praveenc/following{/other_user}","gists_url":"https://api.github.com/users/sourced-praveenc/gists{/gist_id}","starred_url":"https://api.github.com/users/sourced-praveenc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sourced-praveenc/subscriptions","organizations_url":"https://api.github.com/users/sourced-praveenc/orgs","repos_url":"https://api.github.com/users/sourced-praveenc/repos","events_url":"https://api.github.com/users/sourced-praveenc/events{/privacy}","received_events_url":"https://api.github.com/users/sourced-praveenc/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-08-24T17:23:14Z","updated_at":"2018-08-24T20:35:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7ac156dfeb3a4b90d6a16c889884cfb313afa395","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/pulls/33/commits","review_comments_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/pulls/33/comments","review_comment_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/issues/33/comments","statuses_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/statuses/c0f6c5e8b7dcd7d8d358e5c69b75d432e70789be","head":{"label":"sourced:gcs_bucket","ref":"gcs_bucket","sha":"c0f6c5e8b7dcd7d8d358e5c69b75d432e70789be","user":{"login":"sourced","id":24400964,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0NDAwOTY0","avatar_url":"https://avatars1.githubusercontent.com/u/24400964?v=4","gravatar_id":"","url":"https://api.github.com/users/sourced","html_url":"https://github.com/sourced","followers_url":"https://api.github.com/users/sourced/followers","following_url":"https://api.github.com/users/sourced/following{/other_user}","gists_url":"https://api.github.com/users/sourced/gists{/gist_id}","starred_url":"https://api.github.com/users/sourced/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sourced/subscriptions","organizations_url":"https://api.github.com/users/sourced/orgs","repos_url":"https://api.github.com/users/sourced/repos","events_url":"https://api.github.com/users/sourced/events{/privacy}","received_events_url":"https://api.github.com/users/sourced/received_events","type":"Organization","site_admin":false},"repo":{"id":141518202,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE1MTgyMDI=","name":"deploymentmanager-samples","full_name":"sourced/deploymentmanager-samples","owner":{"login":"sourced","id":24400964,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0NDAwOTY0","avatar_url":"https://avatars1.githubusercontent.com/u/24400964?v=4","gravatar_id":"","url":"https://api.github.com/users/sourced","html_url":"https://github.com/sourced","followers_url":"https://api.github.com/users/sourced/followers","following_url":"https://api.github.com/users/sourced/following{/other_user}","gists_url":"https://api.github.com/users/sourced/gists{/gist_id}","starred_url":"https://api.github.com/users/sourced/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sourced/subscriptions","organizations_url":"https://api.github.com/users/sourced/orgs","repos_url":"https://api.github.com/users/sourced/repos","events_url":"https://api.github.com/users/sourced/events{/privacy}","received_events_url":"https://api.github.com/users/sourced/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sourced/deploymentmanager-samples","description":"Deployment Manager samples and templates.","fork":true,"url":"https://api.github.com/repos/sourced/deploymentmanager-samples","forks_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/forks","keys_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/teams","hooks_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/hooks","issue_events_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/issues/events{/number}","events_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/events","assignees_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/assignees{/user}","branches_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/branches{/branch}","tags_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/tags","blobs_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/git/refs{/sha}","trees_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/statuses/{sha}","languages_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/languages","stargazers_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/stargazers","contributors_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/contributors","subscribers_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/subscribers","subscription_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/subscription","commits_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/commits{/sha}","git_commits_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/git/commits{/sha}","comments_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/comments{/number}","issue_comment_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/issues/comments{/number}","contents_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/contents/{+path}","compare_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/merges","archive_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/downloads","issues_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/issues{/number}","pulls_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/pulls{/number}","milestones_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/milestones{/number}","notifications_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/labels{/name}","releases_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/releases{/id}","deployments_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/deployments","created_at":"2018-07-19T03:11:11Z","updated_at":"2018-08-13T19:29:00Z","pushed_at":"2018-08-24T20:28:13Z","git_url":"git://github.com/sourced/deploymentmanager-samples.git","ssh_url":"git@github.com:sourced/deploymentmanager-samples.git","clone_url":"https://github.com/sourced/deploymentmanager-samples.git","svn_url":"https://github.com/sourced/deploymentmanager-samples","homepage":null,"size":1385,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":6,"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":0,"open_issues":6,"watchers":1,"default_branch":"cloud-foundation"}},"base":{"label":"sourced:cloud-foundation","ref":"cloud-foundation","sha":"e0e2eea3658a8fb8041dcc32d23dd45262b1e296","user":{"login":"sourced","id":24400964,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0NDAwOTY0","avatar_url":"https://avatars1.githubusercontent.com/u/24400964?v=4","gravatar_id":"","url":"https://api.github.com/users/sourced","html_url":"https://github.com/sourced","followers_url":"https://api.github.com/users/sourced/followers","following_url":"https://api.github.com/users/sourced/following{/other_user}","gists_url":"https://api.github.com/users/sourced/gists{/gist_id}","starred_url":"https://api.github.com/users/sourced/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sourced/subscriptions","organizations_url":"https://api.github.com/users/sourced/orgs","repos_url":"https://api.github.com/users/sourced/repos","events_url":"https://api.github.com/users/sourced/events{/privacy}","received_events_url":"https://api.github.com/users/sourced/received_events","type":"Organization","site_admin":false},"repo":{"id":141518202,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE1MTgyMDI=","name":"deploymentmanager-samples","full_name":"sourced/deploymentmanager-samples","owner":{"login":"sourced","id":24400964,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0NDAwOTY0","avatar_url":"https://avatars1.githubusercontent.com/u/24400964?v=4","gravatar_id":"","url":"https://api.github.com/users/sourced","html_url":"https://github.com/sourced","followers_url":"https://api.github.com/users/sourced/followers","following_url":"https://api.github.com/users/sourced/following{/other_user}","gists_url":"https://api.github.com/users/sourced/gists{/gist_id}","starred_url":"https://api.github.com/users/sourced/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sourced/subscriptions","organizations_url":"https://api.github.com/users/sourced/orgs","repos_url":"https://api.github.com/users/sourced/repos","events_url":"https://api.github.com/users/sourced/events{/privacy}","received_events_url":"https://api.github.com/users/sourced/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sourced/deploymentmanager-samples","description":"Deployment Manager samples and templates.","fork":true,"url":"https://api.github.com/repos/sourced/deploymentmanager-samples","forks_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/forks","keys_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/teams","hooks_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/hooks","issue_events_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/issues/events{/number}","events_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/events","assignees_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/assignees{/user}","branches_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/branches{/branch}","tags_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/tags","blobs_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/git/refs{/sha}","trees_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/statuses/{sha}","languages_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/languages","stargazers_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/stargazers","contributors_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/contributors","subscribers_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/subscribers","subscription_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/subscription","commits_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/commits{/sha}","git_commits_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/git/commits{/sha}","comments_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/comments{/number}","issue_comment_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/issues/comments{/number}","contents_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/contents/{+path}","compare_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/merges","archive_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/downloads","issues_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/issues{/number}","pulls_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/pulls{/number}","milestones_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/milestones{/number}","notifications_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/labels{/name}","releases_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/releases{/id}","deployments_url":"https://api.github.com/repos/sourced/deploymentmanager-samples/deployments","created_at":"2018-07-19T03:11:11Z","updated_at":"2018-08-13T19:29:00Z","pushed_at":"2018-08-24T20:28:13Z","git_url":"git://github.com/sourced/deploymentmanager-samples.git","ssh_url":"git@github.com:sourced/deploymentmanager-samples.git","clone_url":"https://github.com/sourced/deploymentmanager-samples.git","svn_url":"https://github.com/sourced/deploymentmanager-samples","homepage":null,"size":1385,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":6,"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":0,"open_issues":6,"watchers":1,"default_branch":"cloud-foundation"}},"_links":{"self":{"href":"https://api.github.com/repos/sourced/deploymentmanager-samples/pulls/33"},"html":{"href":"https://github.com/sourced/deploymentmanager-samples/pull/33"},"issue":{"href":"https://api.github.com/repos/sourced/deploymentmanager-samples/issues/33"},"comments":{"href":"https://api.github.com/repos/sourced/deploymentmanager-samples/issues/33/comments"},"review_comments":{"href":"https://api.github.com/repos/sourced/deploymentmanager-samples/pulls/33/comments"},"review_comment":{"href":"https://api.github.com/repos/sourced/deploymentmanager-samples/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sourced/deploymentmanager-samples/pulls/33/commits"},"statuses":{"href":"https://api.github.com/repos/sourced/deploymentmanager-samples/statuses/c0f6c5e8b7dcd7d8d358e5c69b75d432e70789be"}},"author_association":"NONE"}}
{"actor":{"display_login":"sourced-praveenc"}}