5
votes

I'm working with via .
I'm trying to create an IAM user with Access type of "Programmatic access".

With the AWS management console this is quite simple:

AWS console management


When trying with Terraform (reference to docs) it seems that only the following arguments are supported:

name
path
permissions_boundary
force_destroy
tags

Maybe this should be configured via a policy?
Any help will be appreciated.


(*) Related question with different scenario.

2

2 Answers

5
votes

You can use aws_iam_access_key (https://www.terraform.io/docs/providers/aws/r/iam_access_key.html) terraform resource to create Access keys for the user and that should imply that user has Programmatic Access.

Hope this helps.

3
votes

The aws_iam_user resource needs to also have an aws_iam_access_key resource created for it.

The iam-user module has a comprehensive example of using it.

You could also use that module straight from the registry and let that do everything for you.