terraform/builtin/providers
Paul Stack 9d1ef78fc1 provider/aws: Refresh `aws_lambda_event_source_mapping` from state when (#8378)
NotFound

Fixes #8375

When a Lambda or an associated Event Source Mapping has been removed via
the AWS Console, Terraform throws an error similar to the following:

```
Error refreshing state: 1 error(s) occurred:

* aws_lambda_event_source_mapping.dmp_enrichment_event_source_mapping:
* ResourceNotFoundException: The resource you requested does not exist.
    status code: 404, request id: a17c641d-6868-11e6-accf-3d0ea71934fa

```

the resource should be refreshed from the state when this happens so
that subsequent plans show it needs to be recreated

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSLambdaEventSourceMapping_'
==> Checking that code complies with gofmt requirements...
/Users/stacko/Code/go/bin/stringer
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/08/22 16:15:54 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSLambdaEventSourceMapping_ -timeout 120m
=== RUN   TestAccAWSLambdaEventSourceMapping_basic
--- PASS: TestAccAWSLambdaEventSourceMapping_basic (120.81s)
=== RUN   TestAccAWSLambdaEventSourceMapping_disappears
--- PASS: TestAccAWSLambdaEventSourceMapping_disappears (104.08s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    224.914s
```
2016-08-22 17:05:48 +01:00
..
archive provider/archiver fix test output path breaking other tests (#8291) 2016-08-18 18:11:19 +01:00
atlas Add VersionString 2016-07-21 16:43:49 -04:00
aws provider/aws: Refresh `aws_lambda_event_source_mapping` from state when (#8378) 2016-08-22 17:05:48 +01:00
azure provider/azure: add custom_data argument for azure_instance resource (#8158) 2016-08-14 11:02:49 +01:00
azurerm provider/azurerm: Public IP - Setting idle timeout value caused panic. (#8283) 2016-08-18 14:05:14 +01:00
chef
clc
cloudflare
cloudstack Add project parameter to additional resources (#7828) 2016-07-27 17:30:18 +02:00
cobbler
consul Adds consul_prepared_query resource (#7474) 2016-08-18 08:46:30 +01:00
datadog Add Import support for provider-datadog (#8324) 2016-08-22 05:55:26 +02:00
digitalocean provider/digitalocean: Enforce Lowercase on IPV6 Addresses (#7652) 2016-08-15 15:52:48 +01:00
dme
dnsimple
docker provider/docker: Added docker_registry_image data source (#7000) 2016-07-26 16:18:38 +01:00
dyn
fastly Added tests. 2016-08-09 14:42:19 +02:00
github
google provider/google: changed the format of source_image in autoscaler tests 2016-08-19 14:05:28 -04:00
grafana
heroku
influxdb Improve influxdb provider (#7333) 2016-08-05 16:27:03 +10:00
librato
logentries
mailgun
mysql mysql_user pre-5.7.6 compat (GH-8230) 2016-08-17 14:38:33 +02:00
null
openstack Merge pull request #8181 from fatmcgav/openstack_add_valuespec_subnet_v2_provider 2016-08-16 13:25:59 -06:00
packet provider/packet: Restructure the Packet Volume test to no longer rely on environment variables 2016-08-15 08:38:43 +01:00
postgresql
powerdns provider/powerdns: Add support for PowerDNS 4 API (#7819) 2016-07-28 17:01:06 +01:00
random
rundeck
scaleway provider/scaleway: Expose IPv6 support, improve documentation (#7784) 2016-07-25 12:49:09 +01:00
softlayer
statuscake
template Fix improper wait group usage in test 2016-08-04 11:20:11 -04:00
terraform
test
tls
triton
ultradns
vcd
vsphere Standardizing datastore references to use builting Path func (#8075) 2016-08-16 08:58:22 +01:00