Skip to content

plus3it/terraform-aws-tardigrade-iam-principals

Repository files navigation

terraform-aws-tardigrade-iam-principals

Terraform module to create IAM managed policies, roles, and users

Testing

Manual testing:

# Replace "xxx" with an actual AWS profile, then execute the integration tests.
export AWS_PROFILE=xxx 
make terraform/pytest PYTEST_ARGS="-v --nomock"

For automated testing, PYTEST_ARGS is optional and no profile is needed:

make mockstack/up
make terraform/pytest PYTEST_ARGS="-v"
make mockstack/clean

Requirements

Name Version
terraform >= 1.2
aws >= 3.35.0

Providers

No providers.

Resources

No resources.

Inputs

Name Description Type Default Required
groups Schema list of IAM groups
list(object({
name = string
path = string
user_names = list(string)
inline_policies = list(object({
name = string
policy = string
}))
managed_policies = list(object({
name = string
arn = optional(string)
}))
}))
[] no
policies Schema list of policy objects
list(object({
description = string
name = string
path = string
policy = string
tags = map(string)
}))
[] no
policy_documents Schema list of IAM policy documents any [] no
roles Schema list of IAM roles
list(object({
name = string
assume_role_policy = string
description = string
force_detach_policies = bool
instance_profile = object({
name = string
path = string
})
max_session_duration = number
path = string
permissions_boundary = string
tags = map(string)
inline_policies = list(object({
name = string
policy = string
}))
managed_policies = list(object({
name = string
arn = optional(string)
}))
}))
[] no
users Schema list of IAM users
list(object({
name = string
force_destroy = bool
path = string
permissions_boundary = string
tags = map(string)
inline_policies = list(object({
name = string
policy = string
}))
managed_policies = list(object({
name = string
arn = optional(string)
}))
access_keys = list(object({
name = string
status = string
pgp_key = string
}))
}))
[] no

Outputs

Name Description
groups IAM group resources
policies IAM managed policy resources
policy_documents IAM managed policy resources
roles IAM role resources
users IAM user resources