From 95361e022cac82135c2578f1ef4aa276f48f5aa2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 30 Sep 2024 12:02:02 +0000 Subject: [PATCH] docs(readme): update module usage --- README.md | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/README.md b/README.md index 5f4e616..7f65a7c 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,68 @@ Terraform module to create an ECS scheduled task that periodically generates an AWS energy label based on [awsenergylabelerlib](https://github.com/schubergphilis/awsenergylabelerlib). +## Requirements + +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | >= 1.9 | +| [aws](#requirement\_aws) | >= 5.20 | + +## Providers + +| Name | Version | +|------|---------| +| [aws](#provider\_aws) | >= 5.20 | + +## Modules + +| Name | Source | Version | +|------|--------|---------| +| [aws\_ecs\_container\_definition](#module\_aws\_ecs\_container\_definition) | terraform-aws-modules/ecs/aws//modules/container-definition | ~> 5.11.4 | +| [iam\_role](#module\_iam\_role) | schubergphilis/mcaf-role/aws | ~> 0.4.0 | +| [s3](#module\_s3) | schubergphilis/mcaf-s3/aws | ~> 0.14.1 | + +## Resources + +| Name | Type | +|------|------| +| [aws_cloudwatch_event_rule.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_event_rule) | resource | +| [aws_cloudwatch_event_target.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_event_target) | resource | +| [aws_ecs_cluster.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_cluster) | resource | +| [aws_ecs_task_definition.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_task_definition) | resource | +| [aws_security_group.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) | resource | +| [aws_vpc_security_group_egress_rule.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_security_group_egress_rule) | resource | +| [aws_ecs_cluster.selected](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ecs_cluster) | data source | +| [aws_iam_policy_document.ecs_task](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source | +| [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source | +| [aws_s3_bucket.selected](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/s3_bucket) | data source | +| [aws_subnet.selected](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/subnet) | data source | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [bucket\_name](#input\_bucket\_name) | The name of the bucket to store the exported findings (will be created if not specified) | `string` | `null` | no | +| [bucket\_prefix](#input\_bucket\_prefix) | The prefix to use for the bucket | `string` | `"/"` | no | +| [cluster\_arn](#input\_cluster\_arn) | ARN of an existing ECS cluster | `string` | `null` | no | +| [config](#input\_config) | Map containing labeler configuration options |
object({
account_thresholds = optional(string)
allowed_account_ids = optional(list(string), [])
allowed_regions = optional(list(string), [])
audit_zone_name = optional(string)
denied_account_ids = optional(list(string), [])
denied_regions = optional(list(string), [])
export_metrics_only = optional(bool, false)
frameworks = optional(list(string), [])
log_level = optional(string)
organizations_zone_name = optional(string)
region = optional(string)
report_closed_findings_days = optional(number)
report_suppressed_findings = optional(bool, false)
security_hub_query_filter = optional(string)
single_account_id = optional(string)
to_json = optional(bool, false)
validate_metadata_file = optional(string)
zone_thresholds = optional(string)
})
| `{}` | no | +| [iam\_permissions\_boundary](#input\_iam\_permissions\_boundary) | The permissions boundary to attach to the IAM role | `string` | `null` | no | +| [iam\_role\_path](#input\_iam\_role\_path) | The path for the IAM role | `string` | `"/"` | no | +| [image\_uri](#input\_image\_uri) | The URI of the container image to use | `string` | `"ghcr.io/schubergphilis/awsenergylabeler:main"` | no | +| [kms\_key\_arn](#input\_kms\_key\_arn) | The ARN of the KMS key to use for encryption | `string` | `null` | no | +| [memory](#input\_memory) | The memory size of the task | `number` | `512` | no | +| [name](#input\_name) | Name prefix of labeler resources | `string` | `"EnergyLabeler"` | no | +| [schedule\_expression](#input\_schedule\_expression) | The cron expression to be used for triggering the labeler | `string` | `"cron(0 13 ? * SUN *)"` | no | +| [security\_group\_egress\_rules](#input\_security\_group\_egress\_rules) | Security Group egress rules |
list(object({
cidr_ipv4 = optional(string)
cidr_ipv6 = optional(string)
description = string
from_port = optional(number, 0)
ip_protocol = optional(string, "-1")
prefix_list_id = optional(string)
referenced_security_group_id = optional(string)
to_port = optional(number, 0)
}))
|
[
{
"cidr_ipv4": "0.0.0.0/0",
"description": "Allow outgoing HTTPS traffic for the labeler to work",
"from_port": 443,
"ip_protocol": "tcp",
"to_port": 443
}
]
| no | +| [subnet\_ids](#input\_subnet\_ids) | VPC subnet ids this lambda runs from | `list(string)` | `null` | no | +| [tags](#input\_tags) | A mapping of tags to assign | `map(string)` | `{}` | no | + +## Outputs + +| Name | Description | +|------|-------------| +| [s3](#output\_s3) | n/a | +| [task\_role\_arn](#output\_task\_role\_arn) | value of the task role arn | ## License