Skip to main content

IAM User

πŸ“¦ Overview​

This Terraform module provisions a basic AWS IAM user with optional path and environment-based tagging.

It’s ideal for developers, service accounts, or automation pipelines that require secure identity provisioning with optional credential access.


βœ… Key Features​

  • Creates a unique IAM user identity
  • Supports optional IAM path and environment tagging
  • Configurable for use with programmatic access or login credentials
  • Extendable with policy or group attachment

πŸ’Ό Use Cases​

  • Provisioning users for internal developers or engineers
  • Creating service identities for CI/CD workflows
  • Lightweight identity setup for segregated permissions
  • Testing new IAM policies with non-admin users

πŸ“₯ Input Variables​

NameTypeDescription
regionstringAWS region for the IAM user deployment
user_namestringThe name to assign to the IAM user
pathstring(Optional) Path for organizing the user in IAM (e.g., /engineering/)
environmentstringTag to specify the deployment environment (e.g., dev, staging, prod)

πŸ“€ Outputs​

NameDescription
user_nameThe name of the created IAM user
user_arnThe ARN of the IAM user

πŸš€ Deployment Readiness​

  • βœ… Compatible with Terraform 1.0+
  • βœ… Tested with AWS provider 5.x
  • πŸ§ͺ Requires IAM permissions to create and manage IAM users

πŸ› οΈ Example Usage​

module "iam-user-deployment" {
source = "git::ssh://git@github.com/archiphire/aws-level-1-modules.git//identity/iam-user?ref=v1.0.0"

region = "us-east-1"
user_name = "developer1"
path = "/engineering/"
environment = "dev"
}
terraform init
terraform plan
terraform apply

or

tofu init
tofu plan
tofu apply

🧹 Cleanup Options​

Terraform Destroy (for test environments):

terraform destroy

or

tofu destroy

Manual Deletion (production):

aws iam delete-user --user-name developer1

Only recommended after removing any attached policies, keys, or login profiles.

πŸ›‘οΈ Notes​

This is a Level 1 identity module for lightweight user creation. To assign permissions, pair with:

iam-policy-inline iam-group iam-role-basic

πŸ”’ Deployment Package Notice​

This module is part of the Level 1 AWS License Tier. To access the full deployment package and source code, subscribe to Archiphire.