https://github.com/trussworks/terraform-aws-trusted-advisor-refresh
Trusted Advisor Refresh
https://github.com/trussworks/terraform-aws-trusted-advisor-refresh
aws aws-trusted-advisor terraform terraform-modules
Last synced: about 1 year ago
JSON representation
Trusted Advisor Refresh
- Host: GitHub
- URL: https://github.com/trussworks/terraform-aws-trusted-advisor-refresh
- Owner: trussworks
- License: bsd-3-clause
- Created: 2019-10-24T23:26:48.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2023-06-08T20:50:09.000Z (about 3 years ago)
- Last Synced: 2025-03-30T01:11:18.807Z (over 1 year ago)
- Topics: aws, aws-trusted-advisor, terraform, terraform-modules
- Language: HCL
- Homepage: https://registry.terraform.io/modules/trussworks/trusted-advisor-refresh
- Size: 32.2 KB
- Stars: 5
- Watchers: 9
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Creates an AWS Lambda function to update Trusted Advisor
on a scheduled interval using [truss-aws-tools](https://github.com/trussworks/truss-aws-tools).
Creates the following resources:
* IAM role for Lambda function to access Trusted Advisor.
* CloudWatch Event to trigger function on a schedule.
* AWS Lambda function to actually call Trusted Advisor APIs.
## Usage
```hcl
module "trusted-advisor-refresh" {
source = "trussworks/trusted-advisor-refresh/aws"
version = "1.0.0"
environment = "prod"
interval_minutes = "5"
s3_bucket = "lambda-builds-us-east-1"
version_to_deploy = "1.0"
}
```
## Requirements
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.0 |
| [aws](#requirement\_aws) | >= 3.0 |
## Providers
| Name | Version |
|------|---------|
| [aws](#provider\_aws) | >= 3.0 |
## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| [aws_cloudwatch_event_rule.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_event_rule) | resource |
| [aws_cloudwatch_event_target.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_event_target) | resource |
| [aws_cloudwatch_log_group.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_group) | resource |
| [aws_iam_role.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
| [aws_iam_role_policy.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy) | resource |
| [aws_lambda_function.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_function) | resource |
| [aws_lambda_permission.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_permission) | resource |
| [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source |
| [aws_iam_policy_document.assume_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_iam_policy_document.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_partition.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/partition) | data source |
| [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source |
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [cloudwatch\_encryption\_key\_arn](#input\_cloudwatch\_encryption\_key\_arn) | The arn of the encryption key to be used for the cloudwatch logs | `string` | `""` | no |
| [cloudwatch\_logs\_retention\_days](#input\_cloudwatch\_logs\_retention\_days) | Number of days to keep logs in AWS CloudWatch. | `string` | `90` | no |
| [environment](#input\_environment) | Environment tag, e.g prod. | `any` | n/a | yes |
| [interval\_minutes](#input\_interval\_minutes) | How often to update Trusted Advisor. | `string` | `60` | no |
| [s3\_bucket](#input\_s3\_bucket) | The name of the S3 bucket used to store the Lambda builds. | `string` | n/a | yes |
| [version\_to\_deploy](#input\_version\_to\_deploy) | The version the Lambda function to deploy. | `string` | n/a | yes |
## Outputs
No outputs.