1
0

feat: added policy attachment to iam role module

This commit is contained in:
xpk
2026-03-31 08:13:10 +08:00
parent c8eba9a6f8
commit 36036bb6f5
4 changed files with 20 additions and 14 deletions
@@ -1,16 +1,13 @@
<!-- This readme file is generated with terraform-docs -->
## Requirements
| Name | Version |
|------|---------|
| terraform | >= 1.3.0 |
| aws | ~> 5.0 |
No requirements.
## Providers
| Name | Version |
|------|---------|
| aws | ~> 5.0 |
| aws | n/a |
## Modules
@@ -23,17 +20,19 @@ No modules.
| [aws_iam_instance_profile.ip](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_instance_profile) | resource |
| [aws_iam_policy.p](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |
| [aws_iam_role.r](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
| [aws_iam_role_policy_attachment.CsiPodIdentity](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
| [aws_iam_role_policy_attachment.pa](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| attach-managed-policies | List of managed policy arns to attach to the role | `list(string)` | `[]` | no |
| create-instance-profile | Determines whether instance profile will be created | `bool` | `false` | no |
| description | Description of IAM role | `string` | n/a | yes |
| max-session-duration | Max session duration in seconds | `number` | `3600` | no |
| path | Path of IAM role. Defaults to /Customer/ | `string` | `"/Customer/"` | no |
| policies | Map of policies to be created and attached | <pre>map(<br> object(<br> {<br> description = string<br> policy = string<br> }<br> )<br> )</pre> | `{}` | no |
| policies | Map of policies to be created and attached | <pre>map(<br/> object(<br/> {<br/> description = string<br/> policy = string<br/> }<br/> )<br/> )</pre> | `{}` | no |
| role-name | Name of IAM role | `string` | n/a | yes |
| tags | Tags additional to default tags | `map(string)` | `{}` | no |
| trusted-entity | AWS service allowed to assume this role or a full assume role policy | `string` | n/a | yes |