/terraform-aws-iam-instance-profile

Terraform module that creates an AWS IAM role, attaches a list of existing policies, and create an instance profile using the role.

Primary LanguageHCLMIT LicenseMIT

Requirements

No requirements.

Providers

Name Version
aws n/a

Modules

No modules.

Resources

Name Type
aws_iam_instance_profile.instance_profile resource
aws_iam_role.role resource
aws_iam_role_policy_attachment.policy_attachment resource
aws_iam_policy_document.assume_role_policy data source

Inputs

Name Description Type Default Required
assume_role_policy_json The JSON of an existing assume role policy, if a new assume role policy will not be created. string "" no
create_assume_role_policy Determines if a new assume role policy is created or if an existing one is passed in. bool false no
name The base name of instance profile resources. string n/a yes
policies A list of policy objects with policy name and ARN.
list(object({
name = string
arn = string
}))
[] no

Outputs

Name Description
instance_profile_name The name of the instance profile.
role_name The name of IAM role for the instance profile.