opentofu/website/source/docs
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
..
commands Fixed formatting 2016-11-17 05:33:02 -05:00
configuration website: update docs for precedence rules 2016-11-15 15:29:38 -08:00
import command/import: allow the -config flag to specify a config location 2016-11-09 15:09:13 -08:00
internals Update the docs to indicate that TF_LOG_PLAN is append now. 2016-10-18 13:10:15 -07:00
modules Added s3 and unarchiving docs (#9677) 2016-10-28 03:36:22 +02:00
plugins Updated Plugins section. (#8235) 2016-08-16 14:21:33 -05:00
providers provider/aws: Remove IAM user's MFA devices with force_destroy #5908 (#10262) 2016-11-21 10:17:27 +02:00
provisioners website: Quick pass over some docs pages (#9705) 2016-10-31 08:52:27 +00:00
state state/azure: support passing of lease ID when writing storage blob (#10115) 2016-11-18 17:26:25 +02:00
index.html.markdown Add meta descriptions to all pages 2014-10-21 23:21:56 -04:00