{"id":21477493,"url":"https://github.com/spectralops/spectral-terraform-lambda-integration","last_synced_at":"2026-01-03T15:34:13.622Z","repository":{"id":61916931,"uuid":"533402408","full_name":"SpectralOps/spectral-terraform-lambda-integration","owner":"SpectralOps","description":"Terraform configuration used to create the required AWS resources for integrating between Spectral and external service providers.","archived":false,"fork":false,"pushed_at":"2024-12-31T14:27:33.000Z","size":75141,"stargazers_count":10,"open_issues_count":0,"forks_count":6,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-01-23T17:54:27.714Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SpectralOps.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-06T16:08:01.000Z","updated_at":"2024-12-31T13:15:27.000Z","dependencies_parsed_at":"2024-05-01T06:29:48.648Z","dependency_job_id":"61f02267-70be-467b-ad9b-ac35fabe22ea","html_url":"https://github.com/SpectralOps/spectral-terraform-lambda-integration","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpectralOps%2Fspectral-terraform-lambda-integration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpectralOps%2Fspectral-terraform-lambda-integration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpectralOps%2Fspectral-terraform-lambda-integration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpectralOps%2Fspectral-terraform-lambda-integration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SpectralOps","download_url":"https://codeload.github.com/SpectralOps/spectral-terraform-lambda-integration/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243997127,"owners_count":20380981,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-23T11:13:59.713Z","updated_at":"2026-01-03T15:34:13.580Z","avatar_url":"https://github.com/SpectralOps.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://user-images.githubusercontent.com/44297242/188002580-ba0a6d59-8b1c-475e-bd61-192dd952194f.png\" alt=\"drawing\" style=\"width:400px;\"/\u003e\n\n# spectral-lambda-integration\n\nTerraform configuration used to create the required AWS resources for integrating between Spectral and external service providers.\n\n## Requirements\n\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"requirement_terraform\"\u003e\u003c/a\u003e [terraform](#requirement\\_terraform) | \u003e= 1.3.0 |\n| \u003ca name=\"requirement_aws\"\u003e\u003c/a\u003e [aws](#requirement\\_aws) | \u003e= 5.26.0 |\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_aws\"\u003e\u003c/a\u003e [aws](#provider\\_aws) | \u003e= 5.26.0 |\n| \u003ca name=\"provider_random\"\u003e\u003c/a\u003e [random](#provider\\_random) | n/a |\n\n## Modules\n\n| Name | Source | Version |\n|------|--------|---------|\n| \u003ca name=\"module_api_gateway\"\u003e\u003c/a\u003e [api\\_gateway](#module\\_api\\_gateway) | ./modules/api_gateway | n/a |\n| \u003ca name=\"module_backend_lambda_function\"\u003e\u003c/a\u003e [backend\\_lambda\\_function](#module\\_backend\\_lambda\\_function) | ./modules/lambda | n/a |\n| \u003ca name=\"module_frontend_lambda_function\"\u003e\u003c/a\u003e [frontend\\_lambda\\_function](#module\\_frontend\\_lambda\\_function) | ./modules/lambda | n/a |\n| \u003ca name=\"module_lambda_function\"\u003e\u003c/a\u003e [lambda\\_function](#module\\_lambda\\_function) | ./modules/lambda | n/a |\n| \u003ca name=\"module_lambda_role\"\u003e\u003c/a\u003e [lambda\\_role](#module\\_lambda\\_role) | ./modules/role | n/a |\n| \u003ca name=\"module_secrets_manager\"\u003e\u003c/a\u003e [secrets\\_manager](#module\\_secrets\\_manager) | ./modules/secrets_manager | n/a |\n\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_backend_lambda_source_code_path\"\u003e\u003c/a\u003e [backend\\_lambda\\_source\\_code\\_path](#input\\_backend\\_lambda\\_source\\_code\\_path) | Path to the lambda source code zip file of the backend lambda | `string` | `null` | no |\n| \u003ca name=\"input_env_vars\"\u003e\u003c/a\u003e [env\\_vars](#input\\_env\\_vars) | Extendable object contains all required environment variables required for the integration. | `map(string)` | \u003cpre\u003e{\u003cbr\u003e  \"CHECK_POLICY\": \"Fail on errors only\",\u003cbr\u003e  \"SPECTRAL_DSN\": \"\"\u003cbr\u003e}\u003c/pre\u003e | no |\n| \u003ca name=\"input_environment\"\u003e\u003c/a\u003e [environment](#input\\_environment) | The target environment name for deployment. | `string` | `\"prod\"` | no |\n| \u003ca name=\"input_frontend_lambda_source_code_path\"\u003e\u003c/a\u003e [frontend\\_lambda\\_source\\_code\\_path](#input\\_frontend\\_lambda\\_source\\_code\\_path) | Path to the lambda source code zip file of the frontend lambda | `string` | `null` | no |\n| \u003ca name=\"input_gateway_api_integration_timeout_milliseconds\"\u003e\u003c/a\u003e [gateway\\_api\\_integration\\_timeout\\_milliseconds](#input\\_gateway\\_api\\_integration\\_timeout\\_milliseconds) | Timeout for the API Gateway to wait for lambda response | `number` | `29000` | no |\n| \u003ca name=\"input_global_tags\"\u003e\u003c/a\u003e [global\\_tags](#input\\_global\\_tags) | A list of tags to apply on all newly created resources. | `map(string)` | \u003cpre\u003e{\u003cbr\u003e  \"BusinessUnit\": \"Spectral\"\u003cbr\u003e}\u003c/pre\u003e | no |\n| \u003ca name=\"input_integration_type\"\u003e\u003c/a\u003e [integration\\_type](#input\\_integration\\_type) | Spectral integration type (A unique phrase describing the integration) - Available values: `github`, `terraform`, `jira` and `gitlab` | `string` | n/a | yes |\n| \u003ca name=\"input_lambda_enable_logs\"\u003e\u003c/a\u003e [lambda\\_enable\\_logs](#input\\_lambda\\_enable\\_logs) | Specifies if Lambda should have CloudWatch a dedicated logs group. | `bool` | `false` | no |\n| \u003ca name=\"input_lambda_function_memory_size\"\u003e\u003c/a\u003e [lambda\\_function\\_memory\\_size](#input\\_lambda\\_function\\_memory\\_size) | Amount of memory in MB your Lambda Function can use at runtime. Defaults to 1024. | `number` | `1024` | no |\n| \u003ca name=\"input_lambda_function_timeout\"\u003e\u003c/a\u003e [lambda\\_function\\_timeout](#input\\_lambda\\_function\\_timeout) | Amount of time your Lambda Function has to run in seconds. | `number` | `300` | no |\n| \u003ca name=\"input_lambda_logs_retention_in_days\"\u003e\u003c/a\u003e [lambda\\_logs\\_retention\\_in\\_days](#input\\_lambda\\_logs\\_retention\\_in\\_days) | Specifies the number of days you want to retain log events in the specified log group. | `number` | `30` | no |\n| \u003ca name=\"input_lambda_publish\"\u003e\u003c/a\u003e [lambda\\_publish](#input\\_lambda\\_publish) | Whether to publish creation/change as new Lambda Function Version. | `bool` | `false` | no |\n| \u003ca name=\"input_lambda_source_code_path\"\u003e\u003c/a\u003e [lambda\\_source\\_code\\_path](#input\\_lambda\\_source\\_code\\_path) | Path to the lambda source code zip file | `string` | `null` | no |\n| \u003ca name=\"input_resource_name_common_part\"\u003e\u003c/a\u003e [resource\\_name\\_common\\_part](#input\\_resource\\_name\\_common\\_part) | A common part for all resources created under the stack | `string` | `null` | no |\n| \u003ca name=\"input_secrets_names\"\u003e\u003c/a\u003e [secrets\\_names](#input\\_secrets\\_names) | Names of secrets to create | `list(string)` | `null` | no |\n| \u003ca name=\"input_store_secret_in_secrets_manager\"\u003e\u003c/a\u003e [store\\_secret\\_in\\_secrets\\_manager](#input\\_store\\_secret\\_in\\_secrets\\_manager) | Whether to store your secrets in secrets manager, default is false | `bool` | `false` | no |\n| \u003ca name=\"input_tags\"\u003e\u003c/a\u003e [tags](#input\\_tags) | A collection of tags grouped by key representing it's target resource. | `map(map(string))` | \u003cpre\u003e{\u003cbr\u003e  \"api_gateway\": {},\u003cbr\u003e  \"iam\": {},\u003cbr\u003e  \"lambda\": {}\u003cbr\u003e}\u003c/pre\u003e | no |\n| \u003ca name=\"input_vpc_config\"\u003e\u003c/a\u003e [vpc\\_config](#input\\_vpc\\_config) | Configuration block for VPC settings for the Lambda function, including subnet IDs and security group IDs. | \u003cpre\u003eobject({\u003cbr\u003e  subnet_ids         = list(string)\u003cbr\u003e  security_group_ids = list(string)\u003cbr\u003e})\u003c/pre\u003e | `null` | no |\n\n### env_vars\n\nIn some integrations, Spectral requires some environment variables besides the default ones.\nThose variables should be added to the `env_vars`.\n\nPlease refer to our [docs](https://guides.spectralops.io/docs/welcome-to-checkpoint-cloudguard-guides) / source pages to view the extra environment variables needed for the integration.\n\n\n### global_tags\n\nThis variable holds a list of tags be applied on all newly created resources:\n\n```tcl\n{\n  BusinessUnit = \"Spectral\"\n  ...\n}\n```\n\n### tags\n\nThis variable holds a collection of tags grouped by key representing its target resource:\n\n1. IAM role resource - using the `iam` key\n2. Lambda resource - using the `lambda` key\n3. ApiGateway resource - using the `api_gateway` key\n\n```tcl\n{\n  iam = {\n    ...\n  }\n  lambda = {\n    ...\n  }\n  api_gateway = {\n    ...\n  }\n}\n```\n\n## Usage\n\n```tcl\nmodule \"spectral_lambda_integration\" {\n  source                        = \"github.com/SpectralOps/spectral-terraform-lambda-integration\"\n\n  environment                   = \"prod\"\n  integration_type              = \"terraform\"\n  lambda_enable_logs            = true\n  lambda_logs_retention_in_days = 30\n  lambda_publish                = false\n  lambda_function_timeout       = 300\n  lambda_function_memory_size   = 1024\n\n  # Environment variables used by the integration\n  env_vars = {\n    # Mandatory (unless you are using vault) - Your spectral DSN retrieved from SpectralOps\n    SPECTRAL_DSN       = \"\"\n    # Additional env-vars should go here\n  }\n\n  # Global tags - Tags to be applied on every newly created resource\n  global_tags = {\n    # Tags to apply to all newly created resources\n    BusinessUnit = \"Spectral\"\n  }\n\n  # Tags to be applied on concrete resources\n  tags = {\n    # Tags to apply on iam related resources\n    iam = {\n      Resource = \"role\"\n    }\n    # Tags to apply on lambda related resources\n    lambda = {\n      Resource = \"lambda\"\n    }\n    # Tags to apply on api_gateway related resources\n    api_gateway = {\n      Resource = \"api_gateway\"\n    }\n  }\n}\n```\n\n## Resources\n\n| Name      | Type |\n| ----------- | ----------- |\n| [aws_api_gateway_rest_api](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/api_gateway_rest_api) | resource |\n| [aws_api_gateway_method](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/api_gateway_method) | resource |\n| [aws_api_gateway_method_response](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/api_gateway_method_response) | resource |\n| [aws_api_gateway_integration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/api_gateway_integration) | resource |\n| [aws_api_gateway_deployment](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/api_gateway_deployment) | resource |\n| [aws_api_gateway_stage](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/api_gateway_stage) | resource |\n| [aws_lambda_permission](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_permission) | resource |\n| [aws_lambda_function](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_function) | resource |\n| [aws_cloudwatch_log_group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_group) | resource |\n| [aws_iam_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |\n| [aws_iam_role_policy_attachment](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |\n| [aws_iam_policy_document](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data |\n\n## Outputs\n\n### This module has the following outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_lambda_function_arn\"\u003e\u003c/a\u003e [lambda\\_function\\_arn](#output\\_lambda\\_function\\_arn) | Amazon Resource Name (ARN) identifying your Lambda Function |\n| \u003ca name=\"output_lambda_function_name\"\u003e\u003c/a\u003e [lambda\\_function\\_name](#output\\_lambda\\_function\\_name) | The name of the lambda function |\n| \u003ca name=\"output_lambda_iam_role_arn\"\u003e\u003c/a\u003e [lambda\\_iam\\_role\\_arn](#output\\_lambda\\_iam\\_role\\_arn) | Amazon Resource Name (ARN) specifying the role |\n| \u003ca name=\"output_lambda_iam_role_name\"\u003e\u003c/a\u003e [lambda\\_iam\\_role\\_name](#output\\_lambda\\_iam\\_role\\_name) | Name of the role |\n| \u003ca name=\"output_rest_api_arn\"\u003e\u003c/a\u003e [rest\\_api\\_arn](#output\\_rest\\_api\\_arn) | Amazon Resource Name (ARN) identifying your Rest API |\n| \u003ca name=\"output_rest_api_execution_arn\"\u003e\u003c/a\u003e [rest\\_api\\_execution\\_arn](#output\\_rest\\_api\\_execution\\_arn) | The execution ARN part to be used in lambda\\_permission's source\\_arn, not concatenated to other allowed API resources |\n| \u003ca name=\"output_rest_api_id\"\u003e\u003c/a\u003e [rest\\_api\\_id](#output\\_rest\\_api\\_id) | The ID of the REST API |\n| \u003ca name=\"output_rest_api_lambda_execution_arn\"\u003e\u003c/a\u003e [rest\\_api\\_lambda\\_execution\\_arn](#output\\_rest\\_api\\_lambda\\_execution\\_arn) | The execution ARN part to be used in lambda\\_permission's source\\_arn, concatenated with allowed API resources (method \u0026 path) |\n| \u003ca name=\"output_rest_api_url\"\u003e\u003c/a\u003e [rest\\_api\\_url](#output\\_rest\\_api\\_url) | The URL for accessing the lambda through the ApiGateway |\n| \u003ca name=\"output_secrets_arns\"\u003e\u003c/a\u003e [secrets\\_arns](#output\\_secrets\\_arns) | Arns of created secrets in secrets manager |\n\n## Support\n\nFor GitHub deployment - only bot version 2.x is supported.\nThe default GitHub bot version that this module deploys is 2.0.4, if you wish to use other versions please set local paths to the relevant ZIP files.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspectralops%2Fspectral-terraform-lambda-integration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspectralops%2Fspectral-terraform-lambda-integration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspectralops%2Fspectral-terraform-lambda-integration/lists"}