问题
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