Skip to content

geekcell/terraform-aws-iam-role

Repository files navigation

Geek Cell GmbH

Code Quality

License GitHub release (latest tag) Release Validate Lint Test

Security

Infrastructure Tests

Cloud

Infrastructure Tests Infrastructure Tests Infrastructure Tests Infrastructure Tests Infrastructure Tests

Container

Infrastructure Tests Infrastructure Tests Infrastructure Tests Infrastructure Tests

Data protection

Infrastructure Tests Infrastructure Tests Infrastructure Tests Infrastructure Tests Infrastructure Tests Infrastructure Tests Infrastructure Tests

Terraform AWS IAM Role

Introducing the AWS IAM Role Terraform Module, a highly efficient solution for creating and managing your AWS Identity and Access Management (IAM) roles. This module has been expertly crafted to provide you with a simple and streamlined way to create and manage your IAM roles within AWS.

Our team of experts has years of experience working with AWS IAM and has a deep understanding of the best practices and configurations. By using this Terraform module, you can be sure that your IAM roles are created and managed in a secure, efficient, and scalable manner.

This module offers a preconfigured solution for creating IAM roles, saving you time and effort in the process. Whether you're looking to grant access to specific AWS services or to limit the actions that can be performed on your resources, this module has you covered.

So, if you're looking for a convenient and reliable solution for creating and managing your IAM roles within AWS, look no further than the AWS IAM Role Terraform Module. Give it a try and see the difference it can make in your AWS setup!

Inputs

Name Description Type Default Required
assume_role_json A rendered JSON string of the assume_roles variable. string null no
assume_roles A map of principals which can assume the role. The default action is: ["sts:AssumeRole"]
map(object({
actions = optional(list(string))
identifiers = list(string)

conditions = optional(list(object({
test = string
variable = string
values = list(string)
})))
}))
{} no
description Description of the Role. string null no
enable_iam_instance_profile If enabled, will create an IAM instance profile for this role. bool false no
force_detach_policies Whether to force detaching any policies the role has before destroying it. bool false no
max_session_duration Maximum session duration (in seconds) that you want to set for the specified role. number 3600 no
name Name or prefix of the Role. string n/a yes
path Path to the role. string "/" no
permissions_boundary ARN of the policy that is used to set the permissions boundary for the role. string null no
policy_arns A list of policy ARNs to attach to the role. list(string) [] no
tags Tags to add to the Role. map(any) {} no
use_name_prefix Use the name attribute as prefix for the role name. bool true no

Outputs

Name Description
arn IAM role arn
instance_profile_arn IAM instance profile arn
name IAM role name

Providers

Name Version
aws >= 4.36

Resources

  • resource.aws_iam_instance_profile.main (main.tf#77)
  • resource.aws_iam_role.main (main.tf#55)
  • resource.aws_iam_role_policy_attachment.main (main.tf#70)
  • data source.aws_iam_policy_document.assume (main.tf#20)
  • data source.aws_iam_policy_document.assume_combined (main.tf#47)

Examples

Minimal

module "basic-example" {
  source = "../../"

  name = var.name

  assume_roles = {
    AWS : {
      identifiers : [var.account]
    }
  }

  policy_arns = ["arn:aws:iam::aws:policy/ReadOnlyAccess"]
}