|
| 1 | +# Granule-invalidator Terraform Module |
| 2 | + |
| 3 | +This module creates the granule invalidator Lambda function used in Cumulus workflows. |
| 4 | + |
| 5 | +## Usage |
| 6 | + |
| 7 | +```hcl |
| 8 | +module "granule_invalidator" { |
| 9 | + source = "../lambdas/granule-invalidator/deploy" |
| 10 | +
|
| 11 | + prefix = var.prefix |
| 12 | + role = module.cumulus.lambda_processing_role_arn |
| 13 | + layers = [var.cumulus_message_adapter_lambda_layer_version_arn] |
| 14 | + subnet_ids = var.lambda_subnet_ids |
| 15 | + security_group_id = aws_security_group.no_ingress_all_egress.id |
| 16 | + default_log_retention_days = var.default_log_retention_days |
| 17 | + tags = local.tags |
| 18 | +} |
| 19 | +``` |
| 20 | + |
| 21 | +## Requirements |
| 22 | + |
| 23 | +- The Lambda deployment package must be built and available at `../dist/lambda.zip` relative to this module |
| 24 | +- Terraform >= 1.0 |
| 25 | +- AWS Provider >= 5.0 |
| 26 | + |
| 27 | +## Inputs |
| 28 | + |
| 29 | +| Name | Description | Type | Default | Required | |
| 30 | +| ------ | ------------- | ------ | --------- | :--------: | |
| 31 | +| prefix | The prefix for resource names | `string` | n/a | yes | |
| 32 | +| role | ARN of the IAM role for Lambda execution | `string` | n/a | yes | |
| 33 | +| layers | ARN of the Cumulus Message Adapter Lambda layer | `list(string)` | n/a | yes | |
| 34 | +| default_log_retention_days | The number of days to retain logs in CloudWatch | `number` | n/a | yes | |
| 35 | +| subnet_ids | List of subnet IDs for Lambda VPC configuration | `list(string)` | `[]` | no | |
| 36 | +| security_group_id | Security group ID for Lambda VPC configuration | `string` | `""` | no | |
| 37 | +| timeout | Timeout value for the Lambda function in seconds | `number` | `900` | no | |
| 38 | +| memory_size | Memory size for the Lambda function in MB | `number` | `4096` | no | |
| 39 | +| environment | Environment variables for the Lambda function. This is a map that's merged with a set of defaults. | `map(string)` | `{}` | no | |
| 40 | +| tags | Tags to be applied to resources | `map(string)` | `{}` | no | |
| 41 | + |
| 42 | +## Outputs |
| 43 | + |
| 44 | +| Name | Description | |
| 45 | +| ------ | ------------- | |
| 46 | +| lambda_function_arn | ARN of the Lambda function | |
| 47 | +| lambda_function_name | Name of the Lambda function | |
| 48 | +| lambda_function_invoke_arn | Invoke ARN of the Lambda function | |
0 commit comments