terraform/website/source
Richard Henning 2a5e1d400d provider/aws: Remove IAM user's MFA devices with `force_destroy` #5908 (#10262)
When `force_destroy` was specifed on an `aws_iam_user` resource, only IAM
access keys and the login profile were destroyed. If a multi-factor auth
device had been activated for that user, deletion would fail as follows:

```
* aws_iam_user.testuser1: Error deleting IAM User testuser1: DeleteConflict: Cannot delete entity, must delete MFA device first.
    status code: 409, request id: aa41b1b7-ac4d-11e6-bb3f-3b4c7a310c65
```

This commit iterates over any of the user's MFA devices and deactivates
them before deleting the user. It follows a pattern similar to that used
to remove users' IAM access keys before deletion.

```
$ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSUser_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/11/20 17:09:00 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSUser_ -timeout 120m
=== RUN   TestAccAWSUser_importBasic
--- PASS: TestAccAWSUser_importBasic (5.70s)
=== RUN   TestAccAWSUser_basic
--- PASS: TestAccAWSUser_basic (11.12s)
PASS
ok  	github.com/rhenning/terraform/builtin/providers/aws	20.840s
```
2016-11-21 10:17:27 +02:00
..
assets Merge pull request #9538 from hashicorp/f-nomad-provider 2016-11-09 18:34:55 -08:00
docs provider/aws: Remove IAM user's MFA devices with `force_destroy` #5908 (#10262) 2016-11-21 10:17:27 +02:00
intro Update the PowerShell example to set the PATH (#9771) 2016-11-01 14:56:18 +00:00
layouts provider/github: add GitHub labels resource (#10142) 2016-11-18 13:24:37 +02:00
upgrade-guides Fixed grammatical error. 2016-10-13 14:10:32 +11:00
.gitignore
404.html.erb
community.html.erb website: Adding gitter link to the community page 2016-10-07 01:09:50 +01:00
downloads.html.erb docs/website: Linking the downloads page to the upgrade guide for 0.7 (#7913) 2016-08-03 05:06:44 +10:00
feature-card-write.svg add and style feature-card graphics 2016-10-04 16:03:46 -07:00
index.html.erb final copy edits 2016-10-31 15:52:32 -07:00
robots.txt
security.html.erb Add security page (#9717) 2016-11-01 13:56:08 +00:00
sitemap.xml.builder