Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error creating IAM User X: EntityAlreadyExists: User with name X already exists #19

Closed
eperdeme opened this issue Feb 13, 2018 · 4 comments
Labels

Comments

@eperdeme
Copy link

Hello,

I was reading the book and doing this example, but if you modify the list in anyway except append it breaks badly and tries to rename existing users. Is there a fix for this?

@brikis98 brikis98 added the bug label Feb 13, 2018
@brikis98
Copy link
Owner

Yes, unfortunately, it's a limitation in Terraform :(

See hashicorp/terraform#14275 and hashicorp/terraform#17179 for details.

@eperdeme
Copy link
Author

This is a real shame, it literally makes the tool unusable to manage large numbers of items such as subnets or firewall chains.

I guess this is why even the UK Gov terraform code just looks so copy and paste.
https://github.com/alphagov/govuk-terraform-provisioning/blob/master/projects/user_management/resources/integration/users.tf

Maybe I'l have to see about some sort of template to generate the TF files, but this means more wrappers :(

@brikis98
Copy link
Owner

Agreed, it's quite a painful limitation. Hopefully, there will be a solution in the next version of Terraform.

@CoSellCloud
Copy link

You can manage existing users using the import command now:

terraform import aws_iam_user.trinity trinity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants