Skip to content

Commit f05674b

Browse files
authored
feat: Add support for configurable logs role description (#71)
1 parent 6b81b2b commit f05674b

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ No modules.
202202
| <a name="input_log_exclude_verbose_content"></a> [log\_exclude\_verbose\_content](#input\_log\_exclude\_verbose\_content) | Set to TRUE to exclude sections that contain information such as headers, context, and evaluated mapping templates, regardless of logging level. | `bool` | `false` | no |
203203
| <a name="input_log_field_log_level"></a> [log\_field\_log\_level](#input\_log\_field\_log\_level) | Field logging level. Valid values: ALL, ERROR, NONE. | `string` | `null` | no |
204204
| <a name="input_logging_enabled"></a> [logging\_enabled](#input\_logging\_enabled) | Whether to enable Cloudwatch logging on GraphQL API | `bool` | `false` | no |
205+
| <a name="input_logs_role_description"></a> [logs\_role\_description](#input\_logs\_role\_description) | Description for the IAM role to create for Cloudwatch logs | `string` | `null` | no |
205206
| <a name="input_logs_role_name"></a> [logs\_role\_name](#input\_logs\_role\_name) | Name of IAM role to create for Cloudwatch logs | `string` | `null` | no |
206207
| <a name="input_logs_role_tags"></a> [logs\_role\_tags](#input\_logs\_role\_tags) | Map of tags to add to Cloudwatch logs IAM role | `map(string)` | `{}` | no |
207208
| <a name="input_name"></a> [name](#input\_name) | Name of GraphQL API | `string` | `""` | no |

iam.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ resource "aws_iam_role" "logs" {
109109
count = var.logging_enabled && var.create_logs_role ? 1 : 0
110110

111111
name = coalesce(var.logs_role_name, "${var.name}-logs")
112+
description = var.logs_role_description
112113
assume_role_policy = data.aws_iam_policy_document.assume_role.json
113114
permissions_boundary = var.iam_permissions_boundary
114115

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ variable "logs_role_name" {
6464
default = null
6565
}
6666

67+
variable "logs_role_description" {
68+
description = "Description for the IAM role to create for Cloudwatch logs"
69+
type = string
70+
default = null
71+
}
72+
6773
variable "log_cloudwatch_logs_role_arn" {
6874
description = "Amazon Resource Name of the service role that AWS AppSync will assume to publish to Amazon CloudWatch logs in your account."
6975
type = string

0 commit comments

Comments
 (0)