{"action":"created","comment":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/pulls/comments/216183285","pull_request_review_id":153607622,"id":216183285,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNjE4MzI4NQ==","diff_hunk":"@@ -566,19 +636,68 @@ func resourceAlicloudCSKubernetesDelete(d *schema.ResourceData, meta interface{}\n \t})\n }\n \n-func buildKunernetesArgs(d *schema.ResourceData, meta interface{}) (*cs.KubernetesCreationArgs, error) {\n+func isMultiAZClusterAndCheck(d *schema.ResourceData) (bool, error) {\n+\tmasterInstanceTypes := expandStringList(d.Get(\"master_instance_types\").([]interface{}))\n+\tworkerInstanceTypes := expandStringList(d.Get(\"worker_instance_types\").([]interface{}))\n+\tvswitchIDs := expandStringList(d.Get(\"vswitch_ids\").([]interface{}))\n+\tworkerNumbers := expandIntList(d.Get(\"worker_numbers\").([]interface{}))\n+\n+\tif len(masterInstanceTypes) != len(workerInstanceTypes) {","path":"alicloud/resource_alicloud_cs_kubernetes.go","position":321,"original_position":321,"commit_id":"79dc548778d3ccbea1871baa8aadd97a0aeb9971","original_commit_id":"79dc548778d3ccbea1871baa8aadd97a0aeb9971","user":{"login":"xh4n3","id":4469022,"node_id":"MDQ6VXNlcjQ0NjkwMjI=","avatar_url":"https://avatars1.githubusercontent.com/u/4469022?v=4","gravatar_id":"","url":"https://api.github.com/users/xh4n3","html_url":"https://github.com/xh4n3","followers_url":"https://api.github.com/users/xh4n3/followers","following_url":"https://api.github.com/users/xh4n3/following{/other_user}","gists_url":"https://api.github.com/users/xh4n3/gists{/gist_id}","starred_url":"https://api.github.com/users/xh4n3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xh4n3/subscriptions","organizations_url":"https://api.github.com/users/xh4n3/orgs","repos_url":"https://api.github.com/users/xh4n3/repos","events_url":"https://api.github.com/users/xh4n3/events{/privacy}","received_events_url":"https://api.github.com/users/xh4n3/received_events","type":"User","site_admin":false},"body":"@xiaozhu36 If lengths of masterInstanceTypes and workerInstanceTypes are both 3, length of vswitch_ids should be three as well.\r\nOtherwise, the cluster is a singleaz cluster, length of vswitch_ids can be 0 or 1.","created_at":"2018-09-10T02:07:30Z","updated_at":"2018-09-10T02:07:30Z","html_url":"https://github.com/terraform-providers/terraform-provider-alicloud/pull/222#discussion_r216183285","pull_request_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/pulls/222","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/pulls/comments/216183285"},"html":{"href":"https://github.com/terraform-providers/terraform-provider-alicloud/pull/222#discussion_r216183285"},"pull_request":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/pulls/222"}},"in_reply_to_id":216120336},"pull_request":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/pulls/222","id":203417717,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzNDE3NzE3","html_url":"https://github.com/terraform-providers/terraform-provider-alicloud/pull/222","diff_url":"https://github.com/terraform-providers/terraform-provider-alicloud/pull/222.diff","patch_url":"https://github.com/terraform-providers/terraform-provider-alicloud/pull/222.patch","issue_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/issues/222","number":222,"state":"open","locked":false,"title":"support multiaz kubernetes cluster","user":{"login":"xh4n3","id":4469022,"node_id":"MDQ6VXNlcjQ0NjkwMjI=","avatar_url":"https://avatars1.githubusercontent.com/u/4469022?v=4","gravatar_id":"","url":"https://api.github.com/users/xh4n3","html_url":"https://github.com/xh4n3","followers_url":"https://api.github.com/users/xh4n3/followers","following_url":"https://api.github.com/users/xh4n3/following{/other_user}","gists_url":"https://api.github.com/users/xh4n3/gists{/gist_id}","starred_url":"https://api.github.com/users/xh4n3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xh4n3/subscriptions","organizations_url":"https://api.github.com/users/xh4n3/orgs","repos_url":"https://api.github.com/users/xh4n3/repos","events_url":"https://api.github.com/users/xh4n3/events{/privacy}","received_events_url":"https://api.github.com/users/xh4n3/received_events","type":"User","site_admin":false},"body":"I marked master_instance_type, worker_instance_type, worker_number, vswitch_id as deprecated, and added master_instance_types, worker_instance_types, worker_numbers, vswitch_ids.\r\n\r\nWhen three values are specified in master_instance_types and in other three new arguments, it will create a MultiAZ cluster. If one value is specified, it will create normal single AZ cluster.\r\n\r\nNot sure if it is good to make these two types in one terraform resource, any suggestions are welcomed.\r\n","created_at":"2018-07-24T05:59:15Z","updated_at":"2018-09-10T02:07:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"62420a5787b5c053188c770336d32486f48ac519","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":737911983,"node_id":"MDU6TGFiZWw3Mzc5MTE5ODM=","url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/labels/size/XL","name":"size/XL","color":"ffffff","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/pulls/222/commits","review_comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/pulls/222/comments","review_comment_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/pulls/comments{/number}","comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/issues/222/comments","statuses_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/statuses/79dc548778d3ccbea1871baa8aadd97a0aeb9971","head":{"label":"xh4n3:master","ref":"master","sha":"79dc548778d3ccbea1871baa8aadd97a0aeb9971","user":{"login":"xh4n3","id":4469022,"node_id":"MDQ6VXNlcjQ0NjkwMjI=","avatar_url":"https://avatars1.githubusercontent.com/u/4469022?v=4","gravatar_id":"","url":"https://api.github.com/users/xh4n3","html_url":"https://github.com/xh4n3","followers_url":"https://api.github.com/users/xh4n3/followers","following_url":"https://api.github.com/users/xh4n3/following{/other_user}","gists_url":"https://api.github.com/users/xh4n3/gists{/gist_id}","starred_url":"https://api.github.com/users/xh4n3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xh4n3/subscriptions","organizations_url":"https://api.github.com/users/xh4n3/orgs","repos_url":"https://api.github.com/users/xh4n3/repos","events_url":"https://api.github.com/users/xh4n3/events{/privacy}","received_events_url":"https://api.github.com/users/xh4n3/received_events","type":"User","site_admin":false},"repo":{"id":142098383,"node_id":"MDEwOlJlcG9zaXRvcnkxNDIwOTgzODM=","name":"terraform-provider-alicloud","full_name":"xh4n3/terraform-provider-alicloud","owner":{"login":"xh4n3","id":4469022,"node_id":"MDQ6VXNlcjQ0NjkwMjI=","avatar_url":"https://avatars1.githubusercontent.com/u/4469022?v=4","gravatar_id":"","url":"https://api.github.com/users/xh4n3","html_url":"https://github.com/xh4n3","followers_url":"https://api.github.com/users/xh4n3/followers","following_url":"https://api.github.com/users/xh4n3/following{/other_user}","gists_url":"https://api.github.com/users/xh4n3/gists{/gist_id}","starred_url":"https://api.github.com/users/xh4n3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xh4n3/subscriptions","organizations_url":"https://api.github.com/users/xh4n3/orgs","repos_url":"https://api.github.com/users/xh4n3/repos","events_url":"https://api.github.com/users/xh4n3/events{/privacy}","received_events_url":"https://api.github.com/users/xh4n3/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/xh4n3/terraform-provider-alicloud","description":"Terraform AliCloud provider","fork":true,"url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud","forks_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/forks","keys_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/teams","hooks_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/hooks","issue_events_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/issues/events{/number}","events_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/events","assignees_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/assignees{/user}","branches_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/branches{/branch}","tags_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/tags","blobs_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/git/refs{/sha}","trees_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/statuses/{sha}","languages_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/languages","stargazers_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/stargazers","contributors_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/contributors","subscribers_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/subscribers","subscription_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/subscription","commits_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/commits{/sha}","git_commits_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/git/commits{/sha}","comments_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/comments{/number}","issue_comment_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/issues/comments{/number}","contents_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/contents/{+path}","compare_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/merges","archive_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/downloads","issues_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/issues{/number}","pulls_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/pulls{/number}","milestones_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/milestones{/number}","notifications_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/labels{/name}","releases_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/releases{/id}","deployments_url":"https://api.github.com/repos/xh4n3/terraform-provider-alicloud/deployments","created_at":"2018-07-24T03:16:54Z","updated_at":"2018-09-05T12:00:00Z","pushed_at":"2018-09-05T11:59:37Z","git_url":"git://github.com/xh4n3/terraform-provider-alicloud.git","ssh_url":"git@github.com:xh4n3/terraform-provider-alicloud.git","clone_url":"https://github.com/xh4n3/terraform-provider-alicloud.git","svn_url":"https://github.com/xh4n3/terraform-provider-alicloud","homepage":"https://www.terraform.io/docs/providers/alicloud/","size":7200,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"terraform-providers:master","ref":"master","sha":"8e189174affc02d6eb04fcc8adb46b06574a6bfd","user":{"login":"terraform-providers","id":29154831,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5MTU0ODMx","avatar_url":"https://avatars0.githubusercontent.com/u/29154831?v=4","gravatar_id":"","url":"https://api.github.com/users/terraform-providers","html_url":"https://github.com/terraform-providers","followers_url":"https://api.github.com/users/terraform-providers/followers","following_url":"https://api.github.com/users/terraform-providers/following{/other_user}","gists_url":"https://api.github.com/users/terraform-providers/gists{/gist_id}","starred_url":"https://api.github.com/users/terraform-providers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terraform-providers/subscriptions","organizations_url":"https://api.github.com/users/terraform-providers/orgs","repos_url":"https://api.github.com/users/terraform-providers/repos","events_url":"https://api.github.com/users/terraform-providers/events{/privacy}","received_events_url":"https://api.github.com/users/terraform-providers/received_events","type":"Organization","site_admin":false},"repo":{"id":93446083,"node_id":"MDEwOlJlcG9zaXRvcnk5MzQ0NjA4Mw==","name":"terraform-provider-alicloud","full_name":"terraform-providers/terraform-provider-alicloud","owner":{"login":"terraform-providers","id":29154831,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5MTU0ODMx","avatar_url":"https://avatars0.githubusercontent.com/u/29154831?v=4","gravatar_id":"","url":"https://api.github.com/users/terraform-providers","html_url":"https://github.com/terraform-providers","followers_url":"https://api.github.com/users/terraform-providers/followers","following_url":"https://api.github.com/users/terraform-providers/following{/other_user}","gists_url":"https://api.github.com/users/terraform-providers/gists{/gist_id}","starred_url":"https://api.github.com/users/terraform-providers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terraform-providers/subscriptions","organizations_url":"https://api.github.com/users/terraform-providers/orgs","repos_url":"https://api.github.com/users/terraform-providers/repos","events_url":"https://api.github.com/users/terraform-providers/events{/privacy}","received_events_url":"https://api.github.com/users/terraform-providers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/terraform-providers/terraform-provider-alicloud","description":"Terraform AliCloud provider","fork":false,"url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud","forks_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/forks","keys_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/keys{/key_id}","collaborators_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/teams","hooks_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/hooks","issue_events_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/issues/events{/number}","events_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/events","assignees_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/assignees{/user}","branches_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/branches{/branch}","tags_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/tags","blobs_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/git/refs{/sha}","trees_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/git/trees{/sha}","statuses_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/statuses/{sha}","languages_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/languages","stargazers_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/stargazers","contributors_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/contributors","subscribers_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/subscribers","subscription_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/subscription","commits_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/commits{/sha}","git_commits_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/git/commits{/sha}","comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/comments{/number}","issue_comment_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/issues/comments{/number}","contents_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/contents/{+path}","compare_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/compare/{base}...{head}","merges_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/merges","archive_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/downloads","issues_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/issues{/number}","pulls_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/pulls{/number}","milestones_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/milestones{/number}","notifications_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/labels{/name}","releases_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/releases{/id}","deployments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/deployments","created_at":"2017-06-05T20:54:04Z","updated_at":"2018-09-07T15:55:59Z","pushed_at":"2018-09-10T01:59:22Z","git_url":"git://github.com/terraform-providers/terraform-provider-alicloud.git","ssh_url":"git@github.com:terraform-providers/terraform-provider-alicloud.git","clone_url":"https://github.com/terraform-providers/terraform-provider-alicloud.git","svn_url":"https://github.com/terraform-providers/terraform-provider-alicloud","homepage":"https://www.terraform.io/docs/providers/alicloud/","size":7494,"stargazers_count":31,"watchers_count":31,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":27,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":27,"open_issues":8,"watchers":31,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/pulls/222"},"html":{"href":"https://github.com/terraform-providers/terraform-provider-alicloud/pull/222"},"issue":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/issues/222"},"comments":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/issues/222/comments"},"review_comments":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/pulls/222/comments"},"review_comment":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/pulls/222/commits"},"statuses":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-alicloud/statuses/79dc548778d3ccbea1871baa8aadd97a0aeb9971"}},"author_association":"NONE"}}
{"actor":{"display_login":"xh4n3"}}