{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/27855","labels_url":"https://api.github.com/repos/saltstack/salt/issues/27855/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/27855/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/27855/events","html_url":"https://github.com/saltstack/salt/issues/27855","id":110875844,"number":27855,"title":"boto_vpc is not reading availability_zone","user":{"login":"dverbeek84","id":1167749,"avatar_url":"https://avatars.githubusercontent.com/u/1167749?v=3","gravatar_id":"","url":"https://api.github.com/users/dverbeek84","html_url":"https://github.com/dverbeek84","followers_url":"https://api.github.com/users/dverbeek84/followers","following_url":"https://api.github.com/users/dverbeek84/following{/other_user}","gists_url":"https://api.github.com/users/dverbeek84/gists{/gist_id}","starred_url":"https://api.github.com/users/dverbeek84/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dverbeek84/subscriptions","organizations_url":"https://api.github.com/users/dverbeek84/orgs","repos_url":"https://api.github.com/users/dverbeek84/repos","events_url":"https://api.github.com/users/dverbeek84/events{/privacy}","received_events_url":"https://api.github.com/users/dverbeek84/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/saltstack/salt/labels/Bug","name":"Bug","color":"e11d21"},{"url":"https://api.github.com/repos/saltstack/salt/labels/High%20Severity","name":"High Severity","color":"ff9143"},{"url":"https://api.github.com/repos/saltstack/salt/labels/P3","name":"P3","color":"0a3d77"},{"url":"https://api.github.com/repos/saltstack/salt/labels/RIoT","name":"RIoT","color":"fef2c0"},{"url":"https://api.github.com/repos/saltstack/salt/labels/State%20Module","name":"State Module","color":"006b75"}],"state":"open","locked":false,"assignee":{"login":"rallytime","id":6547906,"avatar_url":"https://avatars.githubusercontent.com/u/6547906?v=3","gravatar_id":"","url":"https://api.github.com/users/rallytime","html_url":"https://github.com/rallytime","followers_url":"https://api.github.com/users/rallytime/followers","following_url":"https://api.github.com/users/rallytime/following{/other_user}","gists_url":"https://api.github.com/users/rallytime/gists{/gist_id}","starred_url":"https://api.github.com/users/rallytime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rallytime/subscriptions","organizations_url":"https://api.github.com/users/rallytime/orgs","repos_url":"https://api.github.com/users/rallytime/repos","events_url":"https://api.github.com/users/rallytime/events{/privacy}","received_events_url":"https://api.github.com/users/rallytime/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/67","html_url":"https://github.com/saltstack/salt/milestones/B%2010","labels_url":"https://api.github.com/repos/saltstack/salt/milestones/67/labels","id":1332026,"number":67,"title":"B 10","description":"","creator":{"login":"meggiebot","id":12242451,"avatar_url":"https://avatars.githubusercontent.com/u/12242451?v=3","gravatar_id":"","url":"https://api.github.com/users/meggiebot","html_url":"https://github.com/meggiebot","followers_url":"https://api.github.com/users/meggiebot/followers","following_url":"https://api.github.com/users/meggiebot/following{/other_user}","gists_url":"https://api.github.com/users/meggiebot/gists{/gist_id}","starred_url":"https://api.github.com/users/meggiebot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meggiebot/subscriptions","organizations_url":"https://api.github.com/users/meggiebot/orgs","repos_url":"https://api.github.com/users/meggiebot/repos","events_url":"https://api.github.com/users/meggiebot/events{/privacy}","received_events_url":"https://api.github.com/users/meggiebot/received_events","type":"User","site_admin":false},"open_issues":36,"closed_issues":18,"state":"open","created_at":"2015-09-30T20:33:22Z","updated_at":"2015-10-20T21:46:56Z","due_on":"2015-10-27T06:00:00Z","closed_at":null},"comments":5,"created_at":"2015-10-11T18:35:47Z","updated_at":"2015-10-21T02:33:50Z","closed_at":null,"body":"Hi All,\r\n\r\nI think there is a bug in both_vpc state module.\r\nWhen i start to create two subnets in two different zones they are ignored.\r\n\r\nThis is in my state file:\r\n\r\n```\r\ntest:\r\n  boto_vpc.present:\r\n    - name: test.x.com\r\n    - cidr_block: 172.22.0.0/16\r\n    - dns_hostnames: True\r\n    - require:\r\n      - sls: boto\r\n\r\nsubnet_a:\r\n  boto_vpc.subnet_present:\r\n      - name: public-a\r\n      - vpc_name: test.x.com\r\n      - cidr_block: 172.22.0.0/24\r\n      - availability_zone: us-west-1a\r\n\r\nsubnet_b:\r\n  boto_vpc.subnet_present:\r\n      - name: public-b\r\n      - vpc_name: test.x.com\r\n      - cidr_block: 172.22.1.0/24\r\n      - availability_zone: us-west-1b\r\n```\r\n\r\nThis is the output: \r\n```\r\n          ID: subnet_a\r\n    Function: boto_vpc.subnet_present\r\n        Name: public-a\r\n      Result: True\r\n     Comment: Subnet public-a created.\r\n     Started: 20:26:47.446559\r\n    Duration: 1591.49 ms\r\n     Changes:\r\n              ----------\r\n              new:\r\n                  ----------\r\n                  subnet:\r\n                      ----------\r\n                      availability_zone:\r\n                          us-west-1a\r\n                      cidr_block:\r\n                          172.22.0.0/24\r\n                      id:\r\n                          subnet-4c32ea15\r\n                      tags:\r\n                          ----------\r\n                          Name:\r\n                              public-a\r\n              old:\r\n                  ----------\r\n                  subnet:\r\n                      None\r\n----------\r\n          ID: subnet_b\r\n    Function: boto_vpc.subnet_present\r\n        Name: public-b\r\n      Result: True\r\n     Comment: Subnet public-b created.\r\n     Started: 20:26:49.038209\r\n    Duration: 1567.235 ms\r\n     Changes:\r\n              ----------\r\n              new:\r\n                  ----------\r\n                  subnet:\r\n                      ----------\r\n                      availability_zone:\r\n                          us-west-1a\r\n                      cidr_block:\r\n                          172.22.1.0/24\r\n                      id:\r\n                          subnet-4f32ea16\r\n                      tags:\r\n                          ----------\r\n                          Name:\r\n                              public-b\r\n              old:\r\n                  ----------\r\n                  subnet:\r\n                      None\r\n```\r\n\r\nas you can see, they are both created in us-west-1a. Also if i set both to us-west-1b they are sill created in us-west-1a."},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/149764769","html_url":"https://github.com/saltstack/salt/issues/27855#issuecomment-149764769","issue_url":"https://api.github.com/repos/saltstack/salt/issues/27855","id":149764769,"user":{"login":"croomshine","id":850667,"avatar_url":"https://avatars.githubusercontent.com/u/850667?v=3","gravatar_id":"","url":"https://api.github.com/users/croomshine","html_url":"https://github.com/croomshine","followers_url":"https://api.github.com/users/croomshine/followers","following_url":"https://api.github.com/users/croomshine/following{/other_user}","gists_url":"https://api.github.com/users/croomshine/gists{/gist_id}","starred_url":"https://api.github.com/users/croomshine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/croomshine/subscriptions","organizations_url":"https://api.github.com/users/croomshine/orgs","repos_url":"https://api.github.com/users/croomshine/repos","events_url":"https://api.github.com/users/croomshine/events{/privacy}","received_events_url":"https://api.github.com/users/croomshine/received_events","type":"User","site_admin":false},"created_at":"2015-10-21T02:33:50Z","updated_at":"2015-10-21T02:33:50Z","body":"I just ran into this problem and luckily found this posted issue.  Adding availability_zone as a kwarg fixed it for me."}}