{"action":"created","issue":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/3310","repository_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws","labels_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/3310/labels{/name}","comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/3310/comments","events_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/3310/events","html_url":"https://github.com/terraform-providers/terraform-provider-aws/issues/3310","id":295926379,"number":3310,"title":"Error on aws_route_table with peering to different account","user":{"login":"hashibot[bot]","id":35615658,"avatar_url":"https://avatars2.githubusercontent.com/in/8332?v=4","gravatar_id":"","url":"https://api.github.com/users/hashibot%5Bbot%5D","html_url":"https://github.com/apps/hashibot","followers_url":"https://api.github.com/users/hashibot%5Bbot%5D/followers","following_url":"https://api.github.com/users/hashibot%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/hashibot%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/hashibot%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashibot%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/hashibot%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/hashibot%5Bbot%5D/repos","events_url":"https://api.github.com/users/hashibot%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/hashibot%5Bbot%5D/received_events","type":"Bot","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-09T16:20:08Z","updated_at":"2018-02-09T16:32:11Z","closed_at":null,"author_association":"NONE","body":"_This issue was originally opened by @bashoKa as hashicorp/terraform#17243. It was migrated here as a result of the [provider split](https://www.hashicorp.com/blog/upcoming-provider-changes-in-terraform-0-10/). The original body of the issue is below._\r\n\r\n<hr>\r\n\r\nHi,\r\n\r\n**Terraform Version**\r\nTerraform  0.11.2\r\n\r\n**Affected Resource(s)**\r\naws_vpc_peering_connection\r\naws_route_table\r\n\r\n**Terraform Configuration Files**\r\n\r\nTrying to create a peering between Account 11111111111 and 2222222222.\r\non the 111111111 (requester side):\r\n\r\n```\r\nresource \"aws_vpc_peering_connection\" \"peering_prod_wointernet\" {\r\n  peer_owner_id = \"2222222222\"\r\n  peer_vpc_id   = \"vpc-id2222222222\"\r\n  vpc_id        = \"${module.vpc.vpc_id}\"\r\n  peer_region   = \"eu-central-1\"\r\n  auto_accept   = false\r\n\r\n  tags {\r\n    Name = \"VPC Peering to Prod without Internet\"\r\n  }\r\n}\r\n\r\nresource \"aws_route_table\" \"peering_route\" {\r\n  vpc_id = \"${module.vpc.vpc_id}\"\r\n  propagating_vgws = [\r\n                      \"${aws_vpc_peering_connection.peering_prod_wointernet.id}\"\r\n                      ]\r\n\r\n  route {\r\n    cidr_block = \"${var.prod_wointernet_cidr}\"\r\n    vpc_peering_connection_id = \"${aws_vpc_peering_connection.peering_prod_wointernet.id}\"\r\n  }\r\n\r\n  tags {\r\n    Name = \"peering_route\"\r\n  }\r\n}\r\n```\r\n\r\nand on the 2222222222 side (accepter):\r\n```\r\nresource \"aws_vpc_peering_connection_accepter\" \"peering_prod_internet\" {\r\n  vpc_peering_connection_id = \"${var.prod_internet_peering_id}\"\r\n  auto_accept               = true\r\n\r\n  tags {\r\n    Side = \"Accepter\"\r\n    Name = \"VPC Peering to Prod with Internet\"\r\n  }\r\n}\r\n\r\nresource \"aws_route_table\" \"peering_route\" {\r\n  vpc_id = \"${module.vpc.vpc_id}\"\r\n  propagating_vgws = [\r\n                      \"${aws_vpc_peering_connection.peering_prod_internet.id}\"\r\n                      ]\r\n  route {\r\n    cidr_block = \"${var.prod_internet_cidr}\"\r\n    vpc_peering_connection_id = \"${aws_vpc_peering_connection.peering_prod_internet.id}\"\r\n  }\r\n  tags {\r\n    Name = \"peering_route\"\r\n  }\r\n}\r\n```\r\n**Debug Output**\r\n\r\nNone\r\n\r\n**Panic Output**\r\nNo panic output\r\n\r\n**Expected Behavior**\r\nExpected the VPC peering connection to be made, with route table with route propagation.\r\n\r\n**Actual Behavior**\r\nterrafform plan runs in both cases without any issue.\r\nterraform apply on 11111111 ends up with the following error:\r\n```\r\naws_route_table.peering_route: 1 error(s) occurred:\r\n\r\n* aws_route_table.peering_route: Gateway.NotAttached: resource pcx-xxxxxxx\r\nstatus code: 400, request id: \r\n\r\n```\r\nNevertheless the peering gets created and is visible in 22222222.\r\n\r\nLooks like the route table depends on the attachment status of the peering. \r\n\r\nBug or missing something or doing something wrong?\r\n\r\nThanks for your help.\r\n\r\n**Steps to Reproduce**\r\nterraform apply"},"comment":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/comments/364484700","html_url":"https://github.com/terraform-providers/terraform-provider-aws/issues/3310#issuecomment-364484700","issue_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/3310","id":364484700,"user":{"login":"bashoKa","id":35797360,"avatar_url":"https://avatars1.githubusercontent.com/u/35797360?v=4","gravatar_id":"","url":"https://api.github.com/users/bashoKa","html_url":"https://github.com/bashoKa","followers_url":"https://api.github.com/users/bashoKa/followers","following_url":"https://api.github.com/users/bashoKa/following{/other_user}","gists_url":"https://api.github.com/users/bashoKa/gists{/gist_id}","starred_url":"https://api.github.com/users/bashoKa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bashoKa/subscriptions","organizations_url":"https://api.github.com/users/bashoKa/orgs","repos_url":"https://api.github.com/users/bashoKa/repos","events_url":"https://api.github.com/users/bashoKa/events{/privacy}","received_events_url":"https://api.github.com/users/bashoKa/received_events","type":"User","site_admin":false},"created_at":"2018-02-09T16:32:11Z","updated_at":"2018-02-09T16:32:11Z","author_association":"NONE","body":"Fixed by using different providers."}}
{"actor":{"display_login":"bashoKa"}}