Commit Graph

10 Commits

Author SHA1 Message Date
Jack Pearkes b0096abbe3 provider/aws: allow destroy of LB stickiness policy with missing LB (#11462)
Previously an attempt to destroy a LB stickiness policy would
result in an error like this:

```
* aws_lb_cookie_stickiness_policy.foo: Error removing LBCookieStickinessPolicy: LoadBalancerNotFound: There is no ACTIVE Load Balancer named 'tf-test-lb-tqatd'
    status code: 400, request id: 28af1167-e4a4-11e6-8ddd-57ba410cbbb6
```

This checks for a missing load balancer on the policy read and allows
the destroy.

```
$ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSLBCookieStickinessPolicy_missingLB'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/01/27 07:21:11 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSLBCookieStickinessPolicy_missingLB -timeout 120m
=== RUN   TestAccAWSLBCookieStickinessPolicy_missingLB
--- PASS: TestAccAWSLBCookieStickinessPolicy_missingLB (28.90s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    28.929s
```
2017-01-27 21:14:23 +02:00
James Bardin cfd8254db8 Check for existing but unassigned LB policies
If an AWS Cookie Stickiness Policy is removed from the listener in
the AWS console the policy isn't deleted. Cross reference the policy
name with those assigned to the listener to determine if the policy
is actually being used.
2016-06-16 10:10:52 -04:00
clint shryock 6f04c36a1a provider/aws: Ranomize LB names so tests can run at the same time 2016-05-26 03:37:54 -05:00
Paul Hinze 1d5c65fa86 provider/aws: fix cookie stickiness policy test destroys 2015-12-21 21:23:57 -06:00
Paul Hinze baeb790ed9 provider/aws: fix capitalization in acctest names 2015-12-08 17:49:17 -06:00
clint shryock b81f9a9c52 provider/aws: Fix issue with LB Cookie Stickiness and empty expiration period 2015-11-13 10:34:15 -06:00
Paul Hinze 84afeb73b1 acc tests: ensure each resource has a _basic test
Helpful for breadth first acc test sweeps `-run '_basic$'`
2015-06-07 18:18:14 -05:00
Paul Hinze b71fa3d0ae provider/aws: handle upstream aws-sdk-go repo move
`awslabs/aws-sdk-go => aws/aws-sdk-go`

Congrats to upstream on the promotion. :)
2015-06-03 13:36:57 -05:00
Christopher Tiwald 14ea3a33a4 aws: Fix LB cookie stickiness policy acceptance test.
This needs to run in us-west-2 and contained a few syntactical errors
that prevented it from working.
2015-05-04 11:34:34 -04:00
Christopher Tiwald 448fb4895f aws: Add acceptance test of aws_lb_cookie_stickiness_policy. 2015-04-26 18:05:40 -04:00