Skip to content

Commit

Permalink
Adding repo handler vars (#420)
Browse files Browse the repository at this point in the history
* adding repo handler vars

* adding missing fields to example
  • Loading branch information
mdfleury-wbd authored Feb 11, 2025
1 parent 65cc2af commit 686dd3d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
7 changes: 7 additions & 0 deletions backend/terraform/environments/example/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ module "analyzer" {
lambda_availability_zone = "${local.region}a"
lambda_architecture = local.lambda_architecture
domain_name = "ARTEMIS_ROUTE53_FQDN"
artemis_api_base_url = "https://artemis-ui.example.com/api/v1"
alternative_names = []
api_stage = "v1"
lambda_cidr = "10.0.32.0/20"
Expand Down Expand Up @@ -166,6 +167,12 @@ module "analyzer" {

# List of service integration names. These are referenced in the services.json config.
service-integrations = []

additional_response_headers = {
"gatewayresponse.header.X-Content-Type-Options" = "'nosniff'"
"gatewayresponse.header.X-Frame-Options" = "'SAMEORIGIN'"
"gatewayresponse.header.Referrer-Policy" = "'strict-origin-when-cross-origin'"
}
}

module "metric_alarms" {
Expand Down
4 changes: 3 additions & 1 deletion backend/terraform/modules/analyzer/lambdas.tf
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,9 @@ resource "aws_lambda_function" "repo-handler" {
DD_LAMBDA_HANDLER = "handlers.handler"
DD_SERVICE = "${var.app}-api"
}, var.datadog_environment_variables)
: {})
: {},
var.repo_handler_environment_variables
)
}

tags = merge(
Expand Down
6 changes: 6 additions & 0 deletions backend/terraform/modules/analyzer/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,12 @@ variable "extra_event_dispatch_queues" {
default = []
}

variable "repo_handler_environment_variables" {
description = "Environment variables to add to repo handler lambda"
type = map(any)
default = {}
}

################################################
# Engine Cluster Customization
################################################
Expand Down

0 comments on commit 686dd3d

Please sign in to comment.