This commit is contained in:
xss 2022-03-19 16:01:15 +11:00
parent e89a0532cb
commit 4ac1e91aa8
5 changed files with 24 additions and 24 deletions

View File

@ -236,8 +236,8 @@ resource "aws_lambda_function" "ham_sns_to_mqtt" {
vpc_config {
security_group_ids = [
"sg-05f795128b295c504",
]
subnet_ids = [
]
subnet_ids = [
aws_subnet.private["us-east-1b"].id
]
}

View File

@ -121,9 +121,9 @@ resource "aws_sqs_queue" "historic_to_s3" {
}
resource "aws_sqs_queue" "historic_to_s3_dlq" {
name = "update-history-dlq"
receive_wait_time_seconds = 1
message_retention_seconds = 1209600 # 14 days
name = "update-history-dlq"
receive_wait_time_seconds = 1
message_retention_seconds = 1209600 # 14 days
visibility_timeout_seconds = 10
}

View File

@ -134,8 +134,8 @@ resource "aws_lambda_function" "sns_to_mqtt" {
vpc_config {
security_group_ids = [
"sg-05f795128b295c504",
]
subnet_ids = [
]
subnet_ids = [
aws_subnet.private["us-east-1b"].id
]
}

View File

@ -212,8 +212,8 @@ resource "aws_ecs_task_definition" "tawhiri" {
"-c",
"import urllib.request; import json; import datetime; import sys; sys.exit(0) if len(json.loads(urllib.request.urlopen(f'http://localhost:8000/api/v1/?launch_latitude=51.77542999852449&launch_longitude=15.553199937567115&launch_datetime={datetime.datetime.now().strftime(\"%Y-%m-%dT%H:%M:%SZ\")}&launch_altitude=0&ascent_rate=5.00&burst_altitude=14030.77&descent_rate=5.28').read())['prediction'][0]['trajectory']) > 0 else sys.exit(1)"
]
timeout = 20
interval = 60
timeout = 20
interval = 60
startPeriod = 30
}
command = [
@ -449,7 +449,7 @@ resource "aws_ecs_service" "tawhiri" {
platform_version = "LATEST"
desired_count = 1
enable_execute_command = true
load_balancer {
container_name = "tawhiri"
container_port = 8000

View File

@ -725,21 +725,21 @@ resource "aws_iam_role_policy" "ssm" {
role = aws_iam_role.ecs_execution.id
policy = jsonencode(
{
Statement = [
{
Action = [
"ssmmessages:CreateControlChannel",
"ssmmessages:CreateDataChannel",
"ssmmessages:OpenControlChannel",
"ssmmessages:OpenDataChannel",
]
Effect = "Allow"
Resource = "*"
}
{
Statement = [
{
Action = [
"ssmmessages:CreateControlChannel",
"ssmmessages:CreateDataChannel",
"ssmmessages:OpenControlChannel",
"ssmmessages:OpenDataChannel",
]
Version = "2012-10-17"
}
Effect = "Allow"
Resource = "*"
}
]
Version = "2012-10-17"
}
)
}