{"action":"created","comment":{"url":"https://api.github.com/repos/GovTechSG/terraform-modules/pulls/comments/184292534","pull_request_review_id":115455739,"id":184292534,"diff_hunk":"@@ -0,0 +1,105 @@\n+#!/usr/bin/bash\n+set -euo pipefail\n+\n+read -p 'AWS_PROFILE: ' awsProfile\n+read -p 'NOMAD_ADDR: ' nomadAddr\n+read -p 'NOMAD_TOKEN: ' nomadToken\n+read -p 'ASGName: ' ASGName\n+\n+export AWS_PROFILE=$awsProfile\n+export NOMAD_ADDR=$nomadAddr\n+export NOMAD_TOKEN=$nomadToken\n+\n+echo 'Getting old instance ID'\n+aws autoscaling describe-auto-scaling-groups \\\n+    --auto-scaling-group-name $ASGName \\\n+    | jq --raw-output '.AutoScalingGroups[0].Instances[].InstanceId' \\\n+    | tee instance-ids.txt\n+\n+echo 'Getting AutoScalingGroups max-size and desired-capacity'\n+maxSize=$( aws autoscaling describe-auto-scaling-groups \\\n+    --auto-scaling-group-name $ASGName \\\n+    | jq --raw-output '.AutoScalingGroups[0].MaxSize' )\n+\n+desiredCapacity=$( aws autoscaling describe-auto-scaling-groups \\\n+    --auto-scaling-group-name $ASGName \\\n+    | jq --raw-output '.AutoScalingGroups[0].DesiredCapacity' )\n+\n+echo 'Increasing AutoScalingGroups max-size and desired-capacity by 2'","path":"modules/core/utils/upgrade_nomad_clients.sh","position":28,"original_position":28,"commit_id":"dfd38ef8b9f1ec0c648184af7517bfa7079931fe","original_commit_id":"dfd38ef8b9f1ec0c648184af7517bfa7079931fe","user":{"login":"lawliet89","id":983101,"avatar_url":"https://avatars2.githubusercontent.com/u/983101?v=4","gravatar_id":"","url":"https://api.github.com/users/lawliet89","html_url":"https://github.com/lawliet89","followers_url":"https://api.github.com/users/lawliet89/followers","following_url":"https://api.github.com/users/lawliet89/following{/other_user}","gists_url":"https://api.github.com/users/lawliet89/gists{/gist_id}","starred_url":"https://api.github.com/users/lawliet89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lawliet89/subscriptions","organizations_url":"https://api.github.com/users/lawliet89/orgs","repos_url":"https://api.github.com/users/lawliet89/repos","events_url":"https://api.github.com/users/lawliet89/events{/privacy}","received_events_url":"https://api.github.com/users/lawliet89/received_events","type":"User","site_admin":false},"body":"You mean increase by \"two-fold\" instead of \"2\"?","created_at":"2018-04-26T07:26:19Z","updated_at":"2018-04-26T07:40:24Z","html_url":"https://github.com/GovTechSG/terraform-modules/pull/45#discussion_r184292534","pull_request_url":"https://api.github.com/repos/GovTechSG/terraform-modules/pulls/45","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/GovTechSG/terraform-modules/pulls/comments/184292534"},"html":{"href":"https://github.com/GovTechSG/terraform-modules/pull/45#discussion_r184292534"},"pull_request":{"href":"https://api.github.com/repos/GovTechSG/terraform-modules/pulls/45"}}},"pull_request":{"url":"https://api.github.com/repos/GovTechSG/terraform-modules/pulls/45","id":184228687,"html_url":"https://github.com/GovTechSG/terraform-modules/pull/45","diff_url":"https://github.com/GovTechSG/terraform-modules/pull/45.diff","patch_url":"https://github.com/GovTechSG/terraform-modules/pull/45.patch","issue_url":"https://api.github.com/repos/GovTechSG/terraform-modules/issues/45","number":45,"state":"open","locked":false,"title":"Upgrade script nomad client","user":{"login":"sturdek","id":17931297,"avatar_url":"https://avatars0.githubusercontent.com/u/17931297?v=4","gravatar_id":"","url":"https://api.github.com/users/sturdek","html_url":"https://github.com/sturdek","followers_url":"https://api.github.com/users/sturdek/followers","following_url":"https://api.github.com/users/sturdek/following{/other_user}","gists_url":"https://api.github.com/users/sturdek/gists{/gist_id}","starred_url":"https://api.github.com/users/sturdek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sturdek/subscriptions","organizations_url":"https://api.github.com/users/sturdek/orgs","repos_url":"https://api.github.com/users/sturdek/repos","events_url":"https://api.github.com/users/sturdek/events{/privacy}","received_events_url":"https://api.github.com/users/sturdek/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-04-26T05:17:39Z","updated_at":"2018-04-26T07:40:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c06c392daed7a0525f78d0036c539143ece6fdb9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/GovTechSG/terraform-modules/pulls/45/commits","review_comments_url":"https://api.github.com/repos/GovTechSG/terraform-modules/pulls/45/comments","review_comment_url":"https://api.github.com/repos/GovTechSG/terraform-modules/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GovTechSG/terraform-modules/issues/45/comments","statuses_url":"https://api.github.com/repos/GovTechSG/terraform-modules/statuses/dfd38ef8b9f1ec0c648184af7517bfa7079931fe","head":{"label":"GovTechSG:upgrade_script_nomad_client","ref":"upgrade_script_nomad_client","sha":"dfd38ef8b9f1ec0c648184af7517bfa7079931fe","user":{"login":"GovTechSG","id":12439141,"avatar_url":"https://avatars0.githubusercontent.com/u/12439141?v=4","gravatar_id":"","url":"https://api.github.com/users/GovTechSG","html_url":"https://github.com/GovTechSG","followers_url":"https://api.github.com/users/GovTechSG/followers","following_url":"https://api.github.com/users/GovTechSG/following{/other_user}","gists_url":"https://api.github.com/users/GovTechSG/gists{/gist_id}","starred_url":"https://api.github.com/users/GovTechSG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GovTechSG/subscriptions","organizations_url":"https://api.github.com/users/GovTechSG/orgs","repos_url":"https://api.github.com/users/GovTechSG/repos","events_url":"https://api.github.com/users/GovTechSG/events{/privacy}","received_events_url":"https://api.github.com/users/GovTechSG/received_events","type":"Organization","site_admin":false},"repo":{"id":122424272,"name":"terraform-modules","full_name":"GovTechSG/terraform-modules","owner":{"login":"GovTechSG","id":12439141,"avatar_url":"https://avatars0.githubusercontent.com/u/12439141?v=4","gravatar_id":"","url":"https://api.github.com/users/GovTechSG","html_url":"https://github.com/GovTechSG","followers_url":"https://api.github.com/users/GovTechSG/followers","following_url":"https://api.github.com/users/GovTechSG/following{/other_user}","gists_url":"https://api.github.com/users/GovTechSG/gists{/gist_id}","starred_url":"https://api.github.com/users/GovTechSG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GovTechSG/subscriptions","organizations_url":"https://api.github.com/users/GovTechSG/orgs","repos_url":"https://api.github.com/users/GovTechSG/repos","events_url":"https://api.github.com/users/GovTechSG/events{/privacy}","received_events_url":"https://api.github.com/users/GovTechSG/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GovTechSG/terraform-modules","description":"Reusable Terraform modules","fork":false,"url":"https://api.github.com/repos/GovTechSG/terraform-modules","forks_url":"https://api.github.com/repos/GovTechSG/terraform-modules/forks","keys_url":"https://api.github.com/repos/GovTechSG/terraform-modules/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GovTechSG/terraform-modules/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GovTechSG/terraform-modules/teams","hooks_url":"https://api.github.com/repos/GovTechSG/terraform-modules/hooks","issue_events_url":"https://api.github.com/repos/GovTechSG/terraform-modules/issues/events{/number}","events_url":"https://api.github.com/repos/GovTechSG/terraform-modules/events","assignees_url":"https://api.github.com/repos/GovTechSG/terraform-modules/assignees{/user}","branches_url":"https://api.github.com/repos/GovTechSG/terraform-modules/branches{/branch}","tags_url":"https://api.github.com/repos/GovTechSG/terraform-modules/tags","blobs_url":"https://api.github.com/repos/GovTechSG/terraform-modules/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GovTechSG/terraform-modules/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GovTechSG/terraform-modules/git/refs{/sha}","trees_url":"https://api.github.com/repos/GovTechSG/terraform-modules/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GovTechSG/terraform-modules/statuses/{sha}","languages_url":"https://api.github.com/repos/GovTechSG/terraform-modules/languages","stargazers_url":"https://api.github.com/repos/GovTechSG/terraform-modules/stargazers","contributors_url":"https://api.github.com/repos/GovTechSG/terraform-modules/contributors","subscribers_url":"https://api.github.com/repos/GovTechSG/terraform-modules/subscribers","subscription_url":"https://api.github.com/repos/GovTechSG/terraform-modules/subscription","commits_url":"https://api.github.com/repos/GovTechSG/terraform-modules/commits{/sha}","git_commits_url":"https://api.github.com/repos/GovTechSG/terraform-modules/git/commits{/sha}","comments_url":"https://api.github.com/repos/GovTechSG/terraform-modules/comments{/number}","issue_comment_url":"https://api.github.com/repos/GovTechSG/terraform-modules/issues/comments{/number}","contents_url":"https://api.github.com/repos/GovTechSG/terraform-modules/contents/{+path}","compare_url":"https://api.github.com/repos/GovTechSG/terraform-modules/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GovTechSG/terraform-modules/merges","archive_url":"https://api.github.com/repos/GovTechSG/terraform-modules/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GovTechSG/terraform-modules/downloads","issues_url":"https://api.github.com/repos/GovTechSG/terraform-modules/issues{/number}","pulls_url":"https://api.github.com/repos/GovTechSG/terraform-modules/pulls{/number}","milestones_url":"https://api.github.com/repos/GovTechSG/terraform-modules/milestones{/number}","notifications_url":"https://api.github.com/repos/GovTechSG/terraform-modules/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GovTechSG/terraform-modules/labels{/name}","releases_url":"https://api.github.com/repos/GovTechSG/terraform-modules/releases{/id}","deployments_url":"https://api.github.com/repos/GovTechSG/terraform-modules/deployments","created_at":"2018-02-22T03:08:06Z","updated_at":"2018-04-25T04:24:55Z","pushed_at":"2018-04-26T06:04:41Z","git_url":"git://github.com/GovTechSG/terraform-modules.git","ssh_url":"git@github.com:GovTechSG/terraform-modules.git","clone_url":"https://github.com/GovTechSG/terraform-modules.git","svn_url":"https://github.com/GovTechSG/terraform-modules","homepage":null,"size":108,"stargazers_count":1,"watchers_count":1,"language":"HCL","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":11,"watchers":1,"default_branch":"master"}},"base":{"label":"GovTechSG:master","ref":"master","sha":"8b7363fd20319c21a2cc14072b749d41152a42fd","user":{"login":"GovTechSG","id":12439141,"avatar_url":"https://avatars0.githubusercontent.com/u/12439141?v=4","gravatar_id":"","url":"https://api.github.com/users/GovTechSG","html_url":"https://github.com/GovTechSG","followers_url":"https://api.github.com/users/GovTechSG/followers","following_url":"https://api.github.com/users/GovTechSG/following{/other_user}","gists_url":"https://api.github.com/users/GovTechSG/gists{/gist_id}","starred_url":"https://api.github.com/users/GovTechSG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GovTechSG/subscriptions","organizations_url":"https://api.github.com/users/GovTechSG/orgs","repos_url":"https://api.github.com/users/GovTechSG/repos","events_url":"https://api.github.com/users/GovTechSG/events{/privacy}","received_events_url":"https://api.github.com/users/GovTechSG/received_events","type":"Organization","site_admin":false},"repo":{"id":122424272,"name":"terraform-modules","full_name":"GovTechSG/terraform-modules","owner":{"login":"GovTechSG","id":12439141,"avatar_url":"https://avatars0.githubusercontent.com/u/12439141?v=4","gravatar_id":"","url":"https://api.github.com/users/GovTechSG","html_url":"https://github.com/GovTechSG","followers_url":"https://api.github.com/users/GovTechSG/followers","following_url":"https://api.github.com/users/GovTechSG/following{/other_user}","gists_url":"https://api.github.com/users/GovTechSG/gists{/gist_id}","starred_url":"https://api.github.com/users/GovTechSG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GovTechSG/subscriptions","organizations_url":"https://api.github.com/users/GovTechSG/orgs","repos_url":"https://api.github.com/users/GovTechSG/repos","events_url":"https://api.github.com/users/GovTechSG/events{/privacy}","received_events_url":"https://api.github.com/users/GovTechSG/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GovTechSG/terraform-modules","description":"Reusable Terraform modules","fork":false,"url":"https://api.github.com/repos/GovTechSG/terraform-modules","forks_url":"https://api.github.com/repos/GovTechSG/terraform-modules/forks","keys_url":"https://api.github.com/repos/GovTechSG/terraform-modules/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GovTechSG/terraform-modules/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GovTechSG/terraform-modules/teams","hooks_url":"https://api.github.com/repos/GovTechSG/terraform-modules/hooks","issue_events_url":"https://api.github.com/repos/GovTechSG/terraform-modules/issues/events{/number}","events_url":"https://api.github.com/repos/GovTechSG/terraform-modules/events","assignees_url":"https://api.github.com/repos/GovTechSG/terraform-modules/assignees{/user}","branches_url":"https://api.github.com/repos/GovTechSG/terraform-modules/branches{/branch}","tags_url":"https://api.github.com/repos/GovTechSG/terraform-modules/tags","blobs_url":"https://api.github.com/repos/GovTechSG/terraform-modules/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GovTechSG/terraform-modules/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GovTechSG/terraform-modules/git/refs{/sha}","trees_url":"https://api.github.com/repos/GovTechSG/terraform-modules/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GovTechSG/terraform-modules/statuses/{sha}","languages_url":"https://api.github.com/repos/GovTechSG/terraform-modules/languages","stargazers_url":"https://api.github.com/repos/GovTechSG/terraform-modules/stargazers","contributors_url":"https://api.github.com/repos/GovTechSG/terraform-modules/contributors","subscribers_url":"https://api.github.com/repos/GovTechSG/terraform-modules/subscribers","subscription_url":"https://api.github.com/repos/GovTechSG/terraform-modules/subscription","commits_url":"https://api.github.com/repos/GovTechSG/terraform-modules/commits{/sha}","git_commits_url":"https://api.github.com/repos/GovTechSG/terraform-modules/git/commits{/sha}","comments_url":"https://api.github.com/repos/GovTechSG/terraform-modules/comments{/number}","issue_comment_url":"https://api.github.com/repos/GovTechSG/terraform-modules/issues/comments{/number}","contents_url":"https://api.github.com/repos/GovTechSG/terraform-modules/contents/{+path}","compare_url":"https://api.github.com/repos/GovTechSG/terraform-modules/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GovTechSG/terraform-modules/merges","archive_url":"https://api.github.com/repos/GovTechSG/terraform-modules/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GovTechSG/terraform-modules/downloads","issues_url":"https://api.github.com/repos/GovTechSG/terraform-modules/issues{/number}","pulls_url":"https://api.github.com/repos/GovTechSG/terraform-modules/pulls{/number}","milestones_url":"https://api.github.com/repos/GovTechSG/terraform-modules/milestones{/number}","notifications_url":"https://api.github.com/repos/GovTechSG/terraform-modules/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GovTechSG/terraform-modules/labels{/name}","releases_url":"https://api.github.com/repos/GovTechSG/terraform-modules/releases{/id}","deployments_url":"https://api.github.com/repos/GovTechSG/terraform-modules/deployments","created_at":"2018-02-22T03:08:06Z","updated_at":"2018-04-25T04:24:55Z","pushed_at":"2018-04-26T06:04:41Z","git_url":"git://github.com/GovTechSG/terraform-modules.git","ssh_url":"git@github.com:GovTechSG/terraform-modules.git","clone_url":"https://github.com/GovTechSG/terraform-modules.git","svn_url":"https://github.com/GovTechSG/terraform-modules","homepage":null,"size":108,"stargazers_count":1,"watchers_count":1,"language":"HCL","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":11,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GovTechSG/terraform-modules/pulls/45"},"html":{"href":"https://github.com/GovTechSG/terraform-modules/pull/45"},"issue":{"href":"https://api.github.com/repos/GovTechSG/terraform-modules/issues/45"},"comments":{"href":"https://api.github.com/repos/GovTechSG/terraform-modules/issues/45/comments"},"review_comments":{"href":"https://api.github.com/repos/GovTechSG/terraform-modules/pulls/45/comments"},"review_comment":{"href":"https://api.github.com/repos/GovTechSG/terraform-modules/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GovTechSG/terraform-modules/pulls/45/commits"},"statuses":{"href":"https://api.github.com/repos/GovTechSG/terraform-modules/statuses/dfd38ef8b9f1ec0c648184af7517bfa7079931fe"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"lawliet89"}}