Terraform provisioned IAM user created with IAM Console access disabled

时光毁灭记忆、已成空白 提交于 2020-01-15 11:36:27

问题


I'm generating credentials via keybase.io PGP in my Terraform config. I can confirm access via aws-cli is successful for the new user.

However, Console access remains disabled. Is there a way to create a user with Terraform with the console access enabled?

I appreciate that's a bit of an anti-pattern for Terraform, but I'd like my new user to be able to log in to the Console UI to validate/debug.

UPDATE 1

Terraform module:

https://registry.terraform.io/modules/terraform-aws-modules/iam/aws/0.0.4

https://github.com/terraform-aws-modules/terraform-aws-iam/tree/master/modules/iam-user

user.tf:

module "user" {
  source = "terraform-aws-modules/iam/aws//modules/iam-user"
  name = "user"
  pgp_key = "keybase:foo"
}

回答1:


You need to enable console login using aws_iam_user_login_profile. Terraform documentation for this can be found here. You can also refer this stackoverflow question.



来源:https://stackoverflow.com/questions/49353521/terraform-provisioned-iam-user-created-with-iam-console-access-disabled

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!