terraform/website
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
..
scripts Use Docker-based deploys 2016-10-31 18:37:52 -04:00
source provider/aws: Remove IAM user's MFA devices with `force_destroy` #5908 (#10262) 2016-11-21 10:17:27 +02:00
Gemfile Use Docker-based deploys 2016-10-31 18:37:52 -04:00
Gemfile.lock Use Docker-based deploys 2016-10-31 18:37:52 -04:00
LICENSE.md
Makefile Use Docker-based deploys 2016-10-31 18:37:52 -04:00
README.md Use Docker-based deploys 2016-10-31 18:37:52 -04:00
config.rb v0.7.9 2016-11-04 16:31:49 +00:00
config.ru
packer.json Use Docker-based deploys 2016-10-31 18:37:52 -04:00

README.md

Terraform Website

This subdirectory contains the entire source for the Terraform Website. This is a Middleman project, which builds a static site from these source files.

Contributions Welcome!

If you find a typo or you feel like you can improve the HTML, CSS, or JavaScript, we welcome contributions. Feel free to open issues or pull requests like any normal GitHub project, and we'll merge it in.

Running the Site Locally

To run the site locally, clone this repository and run:

$ make website

You must have Docker installed for this to work.

Alternatively, you can manually run the website like this:

$ bundle
$ bundle exec middleman server

Then open up http://localhost:4567.