Ref Arch - Terraform import security account users
A customer asked: > I'm trying to import a user that was created manually in the AWS console into our Ref Arch's terraform configuration and state. How do I correctly import a single IAM user and terragrunt?
You can run `terragrunt import 'module.security_baseline.module.iam_users.aws_iam_user.user["USERNAME"]' <USERNAME>` **Finding the exact resource address** You will need the exact resource address of the resource, in this case the IAM user, that you want to import into your Terraform state. You can get the address either by running `terraform state list`, which will return the resource addresses of all the resources Terraform currently knows about. You could find the resource address of an IAM user that is already defined, and then use that same format but change the username to import the correct user. You could also find a similar resource address by adding a new user in your Terraform config and running `terragrunt plan`. **Reminder: terragrunt eventually passes all arguments and command on to terraform** Note that you can run `terragrunt...` and everything after `terragrunt` will be passed along to `terraform`. This means you can run your import command from the same directory where your relevant `terragrunt.hcl` file is.