mirror of
https://github.com/FoggedLens/deflock.git
synced 2026-02-12 15:02:45 +00:00
remove server side clustering, increase frequency, cleanup tf
This commit is contained in:
@@ -12,7 +12,6 @@ module "alpr_counts" {
|
||||
module "alpr_clusters" {
|
||||
module_name = "alpr_clusters"
|
||||
source = "./modules/alpr_clusters"
|
||||
deflock_stats_bucket = var.deflock_stats_bucket
|
||||
deflock_cdn_bucket = var.deflock_cdn_bucket
|
||||
rate = "rate(1 day)"
|
||||
rate = "rate(1 hour)"
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ resource "aws_iam_role_policy_attachment" "lambda_basic_execution" {
|
||||
|
||||
resource "aws_iam_policy" "lambda_s3_write_policy" {
|
||||
name = "${var.module_name}_lambda_s3_write_policy"
|
||||
description = "Policy for Lambda to write to S3 bucket ${var.deflock_stats_bucket}"
|
||||
description = "Policy for Lambda to write to S3 bucket ${var.deflock_cdn_bucket}"
|
||||
|
||||
policy = jsonencode({
|
||||
Version = "2012-10-17"
|
||||
@@ -34,8 +34,7 @@ resource "aws_iam_policy" "lambda_s3_write_policy" {
|
||||
]
|
||||
Effect = "Allow"
|
||||
Resource = [
|
||||
"arn:aws:s3:::${var.deflock_cdn_bucket}/*",
|
||||
"arn:aws:s3:::${var.deflock_stats_bucket}/*"
|
||||
"arn:aws:s3:::${var.deflock_cdn_bucket}/*"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -57,6 +56,7 @@ resource "aws_lambda_function" "overpass_lambda" {
|
||||
environment {
|
||||
variables = {
|
||||
UPDATE_RATE_MINS = var.rate
|
||||
OUTPUT_BUCKET = var.deflock_cdn_bucket
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,15 +2,6 @@ variable "module_name" {
|
||||
description = "Name of the module"
|
||||
}
|
||||
|
||||
variable "output_filename" {
|
||||
description = "Filename for the ALPR clusters JSON file"
|
||||
default = "alpr_clusters.json"
|
||||
}
|
||||
|
||||
variable "deflock_stats_bucket" {
|
||||
description = "S3 bucket for the ALPR clusters JSON file"
|
||||
}
|
||||
|
||||
variable "deflock_cdn_bucket" {
|
||||
description = "S3 bucket for the CDN"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user