mirror of
https://github.com/projecthorus/sondehub-infra.git
synced 2025-01-30 15:43:55 +00:00
Terraform fmt [skip ci]
This commit is contained in:
parent
9665ed0c8f
commit
ba2f6aaee3
@ -126,18 +126,18 @@ resource "aws_apigatewayv2_integration" "ham_predictions" {
|
|||||||
|
|
||||||
|
|
||||||
resource "aws_lambda_function" "ham_predictions" {
|
resource "aws_lambda_function" "ham_predictions" {
|
||||||
function_name = "ham_predictions"
|
function_name = "ham_predictions"
|
||||||
handler = "ham_predict.predict"
|
handler = "ham_predict.predict"
|
||||||
s3_bucket = aws_s3_bucket_object.lambda.bucket
|
s3_bucket = aws_s3_bucket_object.lambda.bucket
|
||||||
s3_key = aws_s3_bucket_object.lambda.key
|
s3_key = aws_s3_bucket_object.lambda.key
|
||||||
source_code_hash = data.archive_file.lambda.output_base64sha256
|
source_code_hash = data.archive_file.lambda.output_base64sha256
|
||||||
reserved_concurrent_executions = 10
|
reserved_concurrent_executions = 10
|
||||||
publish = true
|
publish = true
|
||||||
memory_size = 128
|
memory_size = 128
|
||||||
role = aws_iam_role.basic_lambda_role.arn
|
role = aws_iam_role.basic_lambda_role.arn
|
||||||
runtime = "python3.9"
|
runtime = "python3.9"
|
||||||
timeout = 30
|
timeout = 30
|
||||||
architectures = ["arm64"]
|
architectures = ["arm64"]
|
||||||
environment {
|
environment {
|
||||||
variables = {
|
variables = {
|
||||||
"ES" = "es.${local.domain_name}"
|
"ES" = "es.${local.domain_name}"
|
||||||
|
22
ham_query.tf
22
ham_query.tf
@ -27,18 +27,18 @@ resource "aws_lambda_function" "ham_get" {
|
|||||||
|
|
||||||
|
|
||||||
resource "aws_lambda_function" "ham_telem" {
|
resource "aws_lambda_function" "ham_telem" {
|
||||||
function_name = "ham_get_telem"
|
function_name = "ham_get_telem"
|
||||||
handler = "query_ham.get_telem"
|
handler = "query_ham.get_telem"
|
||||||
s3_bucket = aws_s3_bucket_object.lambda.bucket
|
s3_bucket = aws_s3_bucket_object.lambda.bucket
|
||||||
s3_key = aws_s3_bucket_object.lambda.key
|
s3_key = aws_s3_bucket_object.lambda.key
|
||||||
reserved_concurrent_executions = 10
|
reserved_concurrent_executions = 10
|
||||||
source_code_hash = data.archive_file.lambda.output_base64sha256
|
source_code_hash = data.archive_file.lambda.output_base64sha256
|
||||||
publish = true
|
publish = true
|
||||||
memory_size = 1024
|
memory_size = 1024
|
||||||
role = aws_iam_role.basic_lambda_role.arn
|
role = aws_iam_role.basic_lambda_role.arn
|
||||||
runtime = "python3.9"
|
runtime = "python3.9"
|
||||||
timeout = 30
|
timeout = 30
|
||||||
architectures = ["arm64"]
|
architectures = ["arm64"]
|
||||||
environment {
|
environment {
|
||||||
variables = {
|
variables = {
|
||||||
"ES" = "es.${local.domain_name}"
|
"ES" = "es.${local.domain_name}"
|
||||||
|
60
predictor.tf
60
predictor.tf
@ -141,18 +141,18 @@ resource "aws_apigatewayv2_integration" "reverse_predictions" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
resource "aws_lambda_function" "predictions" {
|
resource "aws_lambda_function" "predictions" {
|
||||||
function_name = "predictions"
|
function_name = "predictions"
|
||||||
handler = "predict.predict"
|
handler = "predict.predict"
|
||||||
s3_bucket = aws_s3_bucket_object.lambda.bucket
|
s3_bucket = aws_s3_bucket_object.lambda.bucket
|
||||||
s3_key = aws_s3_bucket_object.lambda.key
|
s3_key = aws_s3_bucket_object.lambda.key
|
||||||
reserved_concurrent_executions = 10
|
reserved_concurrent_executions = 10
|
||||||
source_code_hash = data.archive_file.lambda.output_base64sha256
|
source_code_hash = data.archive_file.lambda.output_base64sha256
|
||||||
publish = true
|
publish = true
|
||||||
memory_size = 128
|
memory_size = 128
|
||||||
role = aws_iam_role.basic_lambda_role.arn
|
role = aws_iam_role.basic_lambda_role.arn
|
||||||
runtime = "python3.9"
|
runtime = "python3.9"
|
||||||
timeout = 30
|
timeout = 30
|
||||||
architectures = ["arm64"]
|
architectures = ["arm64"]
|
||||||
environment {
|
environment {
|
||||||
variables = {
|
variables = {
|
||||||
"ES" = "es.${local.domain_name}"
|
"ES" = "es.${local.domain_name}"
|
||||||
@ -171,18 +171,18 @@ resource "aws_lambda_permission" "predictions" {
|
|||||||
|
|
||||||
|
|
||||||
resource "aws_lambda_function" "reverse_predictions" {
|
resource "aws_lambda_function" "reverse_predictions" {
|
||||||
function_name = "reverse-predictions"
|
function_name = "reverse-predictions"
|
||||||
handler = "reverse_predict.predict"
|
handler = "reverse_predict.predict"
|
||||||
s3_bucket = aws_s3_bucket_object.lambda.bucket
|
s3_bucket = aws_s3_bucket_object.lambda.bucket
|
||||||
s3_key = aws_s3_bucket_object.lambda.key
|
s3_key = aws_s3_bucket_object.lambda.key
|
||||||
source_code_hash = data.archive_file.lambda.output_base64sha256
|
source_code_hash = data.archive_file.lambda.output_base64sha256
|
||||||
publish = true
|
publish = true
|
||||||
memory_size = 128
|
memory_size = 128
|
||||||
reserved_concurrent_executions = 10
|
reserved_concurrent_executions = 10
|
||||||
role = aws_iam_role.basic_lambda_role.arn
|
role = aws_iam_role.basic_lambda_role.arn
|
||||||
runtime = "python3.9"
|
runtime = "python3.9"
|
||||||
timeout = 30
|
timeout = 30
|
||||||
architectures = ["arm64"]
|
architectures = ["arm64"]
|
||||||
environment {
|
environment {
|
||||||
variables = {
|
variables = {
|
||||||
"ES" = "es.${local.domain_name}"
|
"ES" = "es.${local.domain_name}"
|
||||||
@ -298,16 +298,16 @@ resource "aws_ecs_task_definition" "tawhiri" {
|
|||||||
volumesFrom = []
|
volumesFrom = []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
cpu = 0
|
cpu = 0
|
||||||
environment = []
|
environment = []
|
||||||
essential = false
|
essential = false
|
||||||
image = "amazon/aws-cli"
|
image = "amazon/aws-cli"
|
||||||
command = [
|
command = [
|
||||||
"s3",
|
"s3",
|
||||||
"cp",
|
"cp",
|
||||||
"s3://ruaumoko/ruaumoko-dataset",
|
"s3://ruaumoko/ruaumoko-dataset",
|
||||||
"/ruaumoko/ruaumoko-dataset"
|
"/ruaumoko/ruaumoko-dataset"
|
||||||
]
|
]
|
||||||
logConfiguration = {
|
logConfiguration = {
|
||||||
logDriver = "awslogs"
|
logDriver = "awslogs"
|
||||||
options = {
|
options = {
|
||||||
@ -401,7 +401,7 @@ resource "aws_ecs_service" "tawhiri" {
|
|||||||
platform_version = "LATEST"
|
platform_version = "LATEST"
|
||||||
desired_count = 1
|
desired_count = 1
|
||||||
enable_execute_command = true
|
enable_execute_command = true
|
||||||
deployment_maximum_percent = 400
|
deployment_maximum_percent = 400
|
||||||
load_balancer {
|
load_balancer {
|
||||||
container_name = "tawhiri"
|
container_name = "tawhiri"
|
||||||
container_port = 8000
|
container_port = 8000
|
||||||
|
22
query.tf
22
query.tf
@ -1,17 +1,17 @@
|
|||||||
|
|
||||||
resource "aws_lambda_function" "get_sondes" {
|
resource "aws_lambda_function" "get_sondes" {
|
||||||
function_name = "query"
|
function_name = "query"
|
||||||
handler = "query.get_sondes"
|
handler = "query.get_sondes"
|
||||||
s3_bucket = aws_s3_bucket_object.lambda.bucket
|
s3_bucket = aws_s3_bucket_object.lambda.bucket
|
||||||
s3_key = aws_s3_bucket_object.lambda.key
|
s3_key = aws_s3_bucket_object.lambda.key
|
||||||
source_code_hash = data.archive_file.lambda.output_base64sha256
|
source_code_hash = data.archive_file.lambda.output_base64sha256
|
||||||
publish = true
|
publish = true
|
||||||
memory_size = 256
|
memory_size = 256
|
||||||
reserved_concurrent_executions = 10
|
reserved_concurrent_executions = 10
|
||||||
role = aws_iam_role.basic_lambda_role.arn
|
role = aws_iam_role.basic_lambda_role.arn
|
||||||
runtime = "python3.9"
|
runtime = "python3.9"
|
||||||
timeout = 30
|
timeout = 30
|
||||||
architectures = ["arm64"]
|
architectures = ["arm64"]
|
||||||
environment {
|
environment {
|
||||||
variables = {
|
variables = {
|
||||||
"ES" = "es.${local.domain_name}"
|
"ES" = "es.${local.domain_name}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user