terraform.aws-baseline-infra/modules/security_identity_compliance/iam-role/README.md

65 lines
1.9 KiB
Markdown
Raw Normal View History

2024-09-26 09:10:20 +08:00
<!-- This readme file is generated with terraform-docs -->
## Requirements
No requirements.
## Providers
| Name | Version |
|------|---------|
| aws | n/a |
## Modules
No modules.
## Example
```hcl
module "role1" {
source = ".../SecurityIdentityCompliance/iam-role"
role-name = "${local.resource_prefix}-${var.application}-role1"
description = "IAM role for ${var.application}"
trusted-entity = "ec2.amazonaws.com"
create-instance-profile = true
managed-policy-arns = [
"arn:aws:iam::aws:policy/ReadOnlyAccess"
]
}
```
## Resources
| Name | Type |
|------|------|
| [aws_iam_instance_profile.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_instance_profile) | resource |
| [aws_iam_role.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| create-instance-profile | Determines whether instance profile will be created | `bool` | `false` | no |
| description | Description of IAM role | `string` | n/a | yes |
| inline-policy | Inline policy content | `string` | `null` | no |
| inline-policy-name | Inline policy name | `string` | `null` | no |
| managed-policy-arns | List of managed policies to be attached to role | `list(string)` | `null` | no |
| path | Path of IAM role. Defaults to /Customer/ | `string` | `"/Customer/"` | no |
| role-name | Name of IAM role | `string` | n/a | yes |
| trusted-entity | AWS service allowed to assume this role | `string` | n/a | yes |
## Outputs
| Name | Description |
|------|-------------|
| instance-profile-arn | ARN of IAM instance profile |
| name | Name of IAM role |
| profile-name | Name of IAM instance profile |
| role-arn | IAM role ARN |
---
## Authorship
This module was developed by xpk.