Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
.terraform
functions/*/src/vendor
*/node_modules
.idea
21 changes: 21 additions & 0 deletions .terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 7 additions & 10 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,10 @@ terraform {
version = ">= 4.17.1"
}
}

backend "s3" {
bucket = "fwd-remote-state"
key = "lambda-battle.tfstate"
region = "eu-central-1"
encrypt = true
dynamodb_table = "tf-remote-state-locks"
profile = "fwd-retro"
}
}

provider "aws" {
region = "eu-central-1"
profile = "fwd-retro"

default_tags {
tags = {
Expand Down Expand Up @@ -59,6 +49,12 @@ module "ruby-2_7-lambda" {
depends_on = [aws_dynamodb_table.data]
}

module "rust-1_65-lambda" {
source = "./rust-1.65"
data_table = aws_dynamodb_table.data
depends_on = [aws_dynamodb_table.data]
}

resource "aws_apigatewayv2_api" "gateway" {
name = "lambda-battle-api"
protocol_type = "HTTP"
Expand All @@ -67,6 +63,7 @@ resource "aws_apigatewayv2_api" "gateway" {
locals {
lambda_resources = {
"ruby-2_7-x86" = { "module" = module.ruby-2_7-lambda }
"rust-1_65-x86" = { "module" = module.rust-1_65-lambda }
}
}

Expand Down
2 changes: 2 additions & 0 deletions rust-1.65/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/target
/dist
Loading