Skip to content
Merged
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
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: CI

on:
pull_request:
push:
branches:
- main

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- uses: jdx/mise-action@dba19683ed58901619b14f395a24841710cb4925 # v4

- name: Lint
run: tflint --format compact
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 Transcend
Copyright (c) 2026 Transcend

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ resource "aws_iam_role_policy" "logs_role_policy" {
* of the CloudFront edge location handling the request.
*/
resource "aws_cloudwatch_log_group" "log_group" {
name = "/aws/lambda/${var.name}"
tags = var.tags
name = "/aws/lambda/${var.name}"
tags = var.tags
kms_key_id = var.cloudwatch_log_groups_kms_arn
}

Expand Down
3 changes: 3 additions & 0 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[tools]
terraform = "0.13"
tflint = "0.63.1"
10 changes: 8 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
variable name {
type = string
description = "Name of the Lambda@Edge Function"
}

variable description {
type = string
description = "Description of what the Lambda@Edge Function does"
}

variable s3_artifact_bucket {
type = string
description = "Name of the S3 bucket to upload versioned artifacts to"
}

Expand All @@ -17,6 +20,7 @@ variable tags {
}

variable lambda_code_source_dir {
type = string
description = "An absolute path to the directory containing the code to upload to lambda"
}

Expand All @@ -27,21 +31,24 @@ variable file_globs {
}

variable local_file_dir {
type = string
description = "A path to the directory to store plan time generated local files"
default = "."
}

variable runtime {
type = string
description = "The runtime of the lambda function"
default = "nodejs14.x"
}

variable handler {
type = string
description = "The path to the main method that should handle the incoming requests"
default = "index.handler"
}

variable config_file_name {
type = string
description = "The name of the file var.plaintext_params will be written to as json"
default = "config.json"
}
Expand Down Expand Up @@ -98,4 +105,3 @@ variable cloudwatch_log_groups_kms_arn {
description = "KMS ARN to encrypt the log group in cloudwatch"
default = null
}

6 changes: 4 additions & 2 deletions versions.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
terraform {
required_providers {
archive = {
source = "hashicorp/archive"
source = "hashicorp/archive"
version = ">= 2.0.0"
}
aws = {
source = "hashicorp/aws"
source = "hashicorp/aws"
version = ">= 3.11.0"
}
}
required_version = ">= 0.13"
Expand Down