terraform/builtin/providers
Paul Stack 272f8ddee1 provider/aws: Refresh `aws_autoscaling_policy` from state on 404 (#8430)
* provider/aws: Refresh `aws_autoscaling_policy` from state on 404

Fixes #8386

When an Autoscaling Group Or an Autoscaling Group Policy has been
deleted manually, terraform was throwing an error as follows:

```
* aws_autoscaling_policy.increase: Error retrieving scaling policies: ValidationError: Group sandbox-logs-logstash-wxhsckky3ndpzd7b3kmyontngy not found
        status code: 400, request id: 56a89814-6884-11e6-b3a8-d364cf04223b
```

We now refresh from state on a ValidationError - this is a common 4xx error according to AWS documentation http://docs.aws.amazon.com/AutoScaling/latest/APIReference/CommonErrors.html

```
%make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSAutoscalingPolicy_disappears'
==> Checking that code complies with gofmt requirements...
/Users/stacko/Code/go/bin/stringer
go generate $(go list ./... | grep -v /terraform/vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSAutoscalingPolicy_disappears -timeout 120m
=== RUN   TestAccAWSAutoscalingPolicy_disappears
--- PASS: TestAccAWSAutoscalingPolicy_disappears (203.61s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	203.633s
```

* Update resource_aws_autoscaling_policy.go
2016-08-24 11:06:01 +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_autoscaling_policy` from state on 404 (#8430) 2016-08-24 11:06:01 +01:00
azure provider/azure: add custom_data argument for azure_instance resource (#8158) 2016-08-14 11:02:49 +01:00
azurerm Update CHANGELOG.md 2016-08-23 14:38:48 +02: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 email is variable, not string 2016-08-23 17:32:46 -04:00
grafana
heroku
influxdb Improve influxdb provider (#7333) 2016-08-05 16:27:03 +10:00
librato
logentries provider/logentries: Implementing logentries provider (#7067) 2016-07-12 14:14:39 +01:00
mailgun
mysql mysql_user pre-5.7.6 compat (GH-8230) 2016-08-17 14:38:33 +02:00
null
openstack provider/openstack: docs and tests for allowed_address_pairs 2016-08-23 02:13:37 +00: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 Merge branch 'b-triton-dot-in-tags' of https://github.com/zeroae/terraform into zeroae-b-triton-dot-in-tags 2016-07-12 15:06:47 -06:00
ultradns
vcd
vsphere Standardizing datastore references to use builting Path func (#8075) 2016-08-16 08:58:22 +01:00