Skip to content

javilac/terraform-aws-iam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS Identity and Access Management (IAM) Terraform module

Terraform module which creates IAM resources on AWS.

These types of resources are supported:

Root module calls these modules which can also be used separately to create independent resources:

  • user - creates iam user
  • access_key - creates access key to user
  • policy - Creates a policy and attach it to user

Usage

module "user" {
  source = "github.com/javilac/terraform-aws-iam"
  user_name = "access-to-s3-examplebucket"
  policy_name = "access-to-s3-examplebucket-rw"
  policy = <<EOF
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:ListBucket"
            ],
            "Resource": [
                "arn:aws:s3:::examplebucket"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:List*",
                "s3:Get*",
                "s3:Put*",
                "s3:Delete*"
            ],
            "Resource": [
                "arn:aws:s3:::examplebucket/*"
            ]
        }
    ]
}
EOF
}

Authors

Module created by Javier Avila.

License

Apache 2 Licensed. See LICENSE for full details.

About

Module to create aws iam resources

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages