{"action":"created","issue":{"url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/issues/346","repository_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws","labels_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/issues/346/labels{/name}","comments_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/issues/346/comments","events_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/issues/346/events","html_url":"https://github.com/puppetlabs/puppetlabs-aws/issues/346","id":170682960,"number":346,"title":"ec2_vpc_routetable idempotence issue","user":{"login":"btrump","id":557776,"avatar_url":"https://avatars.githubusercontent.com/u/557776?v=3","gravatar_id":"","url":"https://api.github.com/users/btrump","html_url":"https://github.com/btrump","followers_url":"https://api.github.com/users/btrump/followers","following_url":"https://api.github.com/users/btrump/following{/other_user}","gists_url":"https://api.github.com/users/btrump/gists{/gist_id}","starred_url":"https://api.github.com/users/btrump/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btrump/subscriptions","organizations_url":"https://api.github.com/users/btrump/orgs","repos_url":"https://api.github.com/users/btrump/repos","events_url":"https://api.github.com/users/btrump/events{/privacy}","received_events_url":"https://api.github.com/users/btrump/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-08-11T16:03:32Z","updated_at":"2016-09-28T16:19:48Z","closed_at":null,"body":"I'm using the following simple manifest to create a VPC, internet gateway, and routetable:\r\n```puppet\r\n# test.pp\r\nec2_vpc { 'test-id-vpc':\r\n  ensure           => present,\r\n  region           => 'us-west-2',\r\n  cidr_block       => '10.0.0.0/24',\r\n  instance_tenancy => 'default',\r\n}\r\nec2_vpc_internet_gateway { 'test-id-vpc-igw':\r\n  ensure => 'present',\r\n  region => 'us-west-2',\r\n  vpc => 'test-id-vpc',\r\n  require => Ec2_vpc['test-id-vpc'],\r\n}\r\nec2_vpc_routetable { 'test-id-vpc-routetable':\r\n  ensure => 'present',\r\n  region => 'us-west-2',\r\n  routes => [\r\n    {'destination_cidr_block' => '10.0.0.0/24', 'gateway' => 'local'},\r\n    {'destination_cidr_block' => '0.0.0.0/0', 'gateway' => 'test-id-vpc-igw'},\r\n  ],\r\n  vpc    => 'test-id-vpc',\r\n  require => Ec2_vpc_internet_gateway['test-id-vpc-igw'],\r\n}\r\n```\r\n\r\nA one-time run works just fine:\r\n```puppet\r\n# puppet apply test.pp \r\nNotice: Compiled catalog for puppet in environment production in 0.31 seconds\r\nNotice: /Stage[main]/Main/Ec2_vpc[test-id-vpc]/ensure: created\r\nNotice: /Stage[main]/Main/Ec2_vpc_internet_gateway[test-id-vpc-igw]/ensure: created\r\nNotice: /Stage[main]/Main/Ec2_vpc_routetable[test-id-vpc-routetable]/ensure: created\r\nNotice: Applied catalog in 39.24 seconds`\r\n```\r\nHowever, subsequent runs produce an error stating that the routes property is read-only once ec2_vpc_routetable is created:\r\n```puppet\r\n# puppet apply test.pp \r\nNotice: Compiled catalog for puppet in environment production in 0.34 seconds\r\nError: routes property is read-only once ec2_vpc_routetable created.\r\nError: /Stage[main]/Main/Ec2_vpc_routetable[test-id-vpc-routetable]/routes: change from [{\"destination_cidr_block\"=>\"10.0.0.0/24\", \"gateway\"=>\"local\"}] to {\"destination_cidr_block\"=>\"10.0.0.0/24\", \"gateway\"=>\"local\"} {\"destination_cidr_block\"=>\"0.0.0.0/0\", \"gateway\"=>\"test-id-vpc-igw\"} failed: routes property is read-only once ec2_vpc_routetable created.\r\nNotice: Applied catalog in 36.66 seconds\r\n```\r\n\r\nI understand that the property is currently read-only, but should it not check that the values passed are identical to the current route property, thereby allowing the code to run multiple times without error?"},"comment":{"url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/issues/comments/250218173","html_url":"https://github.com/puppetlabs/puppetlabs-aws/issues/346#issuecomment-250218173","issue_url":"https://api.github.com/repos/puppetlabs/puppetlabs-aws/issues/346","id":250218173,"user":{"login":"zleswomp","id":16090312,"avatar_url":"https://avatars.githubusercontent.com/u/16090312?v=3","gravatar_id":"","url":"https://api.github.com/users/zleswomp","html_url":"https://github.com/zleswomp","followers_url":"https://api.github.com/users/zleswomp/followers","following_url":"https://api.github.com/users/zleswomp/following{/other_user}","gists_url":"https://api.github.com/users/zleswomp/gists{/gist_id}","starred_url":"https://api.github.com/users/zleswomp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zleswomp/subscriptions","organizations_url":"https://api.github.com/users/zleswomp/orgs","repos_url":"https://api.github.com/users/zleswomp/repos","events_url":"https://api.github.com/users/zleswomp/events{/privacy}","received_events_url":"https://api.github.com/users/zleswomp/received_events","type":"User","site_admin":false},"created_at":"2016-09-28T16:19:48Z","updated_at":"2016-09-28T16:19:48Z","body":"The PR to replace the error with a warning has been merged here.  https://github.com/puppetlabs/puppetlabs-aws/pull/334 \r\n\r\nThis will only throw a warning now, and only in the case where the desired state doesn't match actual state.  If no changes are made to the Puppet resource, and there is still a warning that is being thrown, than the provider is not correctly describing the actual state, and thats a bug in the provider."}}
{"actor":{"display_login":"zleswomp"}}