272f8ddee1
* 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 |
||
---|---|---|
.. | ||
archive | ||
atlas | ||
aws | ||
azure | ||
azurerm | ||
chef | ||
clc | ||
cloudflare | ||
cloudstack | ||
cobbler | ||
consul | ||
datadog | ||
digitalocean | ||
dme | ||
dnsimple | ||
docker | ||
dyn | ||
fastly | ||
github | ||
grafana | ||
heroku | ||
influxdb | ||
librato | ||
logentries | ||
mailgun | ||
mysql | ||
null | ||
openstack | ||
packet | ||
postgresql | ||
powerdns | ||
random | ||
rundeck | ||
scaleway | ||
softlayer | ||
statuscake | ||
template | ||
terraform | ||
test | ||
tls | ||
triton | ||
ultradns | ||
vcd | ||
vsphere |