Skip to content

Commit

Permalink
feat: ignore last_modified on aws_lambda_function
Browse files Browse the repository at this point in the history
Signed-off-by: Edgar Castillo <[email protected]>
  • Loading branch information
edgar-castle committed Sep 30, 2024
1 parent 520c845 commit 0fdd0fc
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ repos:
hooks:
- id: terraform_fmt
- id: terraform_wrapper_module_for_each
args:
- "--args=--module-repo-org=gametimesf"
- "--args=--module-repo-shortname=tf-aws-lambda"
- id: terraform_docs
args:
- "--args=--lockfile=false"
Expand Down
5 changes: 4 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ resource "aws_lambda_function" "this" {
}

tags = merge(
{ terraform-aws-modules = "lambda" },
var.tags,
var.function_tags
)
Expand All @@ -164,6 +163,10 @@ resource "aws_lambda_function" "this" {
aws_iam_role_policy_attachment.vpc,
aws_iam_role_policy_attachment.tracing,
]

lifecycle {
ignore_changes = [last_modified]
}
}

resource "aws_lambda_layer_version" "this" {
Expand Down
6 changes: 3 additions & 3 deletions wrappers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ This wrapper does not implement any extra functionality.

```hcl
terraform {
source = "tfr:///terraform-aws-modules/lambda/aws//wrappers"
source = "tfr:///gametimesf/tf-aws-lambda/aws//wrappers"
# Alternative source:
# source = "git::[email protected]:terraform-aws-modules/terraform-aws-lambda.git//wrappers?ref=master"
# source = "git::[email protected]:gametimesf/terraform-aws-tf-aws-lambda.git//wrappers?ref=master"
}
inputs = {
Expand Down Expand Up @@ -42,7 +42,7 @@ inputs = {

```hcl
module "wrapper" {
source = "terraform-aws-modules/lambda/aws//wrappers"
source = "gametimesf/tf-aws-lambda/aws//wrappers"
defaults = { # Default values
create = true
Expand Down
6 changes: 3 additions & 3 deletions wrappers/alias/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ This wrapper does not implement any extra functionality.

```hcl
terraform {
source = "tfr:///terraform-aws-modules/lambda/aws//wrappers/alias"
source = "tfr:///gametimesf/tf-aws-lambda/aws//wrappers/alias"
# Alternative source:
# source = "git::[email protected]:terraform-aws-modules/terraform-aws-lambda.git//wrappers/alias?ref=master"
# source = "git::[email protected]:gametimesf/terraform-aws-tf-aws-lambda.git//wrappers/alias?ref=master"
}
inputs = {
Expand Down Expand Up @@ -42,7 +42,7 @@ inputs = {

```hcl
module "wrapper" {
source = "terraform-aws-modules/lambda/aws//wrappers/alias"
source = "gametimesf/tf-aws-lambda/aws//wrappers/alias"
defaults = { # Default values
create = true
Expand Down
6 changes: 3 additions & 3 deletions wrappers/deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ This wrapper does not implement any extra functionality.

```hcl
terraform {
source = "tfr:///terraform-aws-modules/lambda/aws//wrappers/deploy"
source = "tfr:///gametimesf/tf-aws-lambda/aws//wrappers/deploy"
# Alternative source:
# source = "git::[email protected]:terraform-aws-modules/terraform-aws-lambda.git//wrappers/deploy?ref=master"
# source = "git::[email protected]:gametimesf/terraform-aws-tf-aws-lambda.git//wrappers/deploy?ref=master"
}
inputs = {
Expand Down Expand Up @@ -42,7 +42,7 @@ inputs = {

```hcl
module "wrapper" {
source = "terraform-aws-modules/lambda/aws//wrappers/deploy"
source = "gametimesf/tf-aws-lambda/aws//wrappers/deploy"
defaults = { # Default values
create = true
Expand Down
6 changes: 3 additions & 3 deletions wrappers/docker-build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ This wrapper does not implement any extra functionality.

```hcl
terraform {
source = "tfr:///terraform-aws-modules/lambda/aws//wrappers/docker-build"
source = "tfr:///gametimesf/tf-aws-lambda/aws//wrappers/docker-build"
# Alternative source:
# source = "git::[email protected]:terraform-aws-modules/terraform-aws-lambda.git//wrappers/docker-build?ref=master"
# source = "git::[email protected]:gametimesf/terraform-aws-tf-aws-lambda.git//wrappers/docker-build?ref=master"
}
inputs = {
Expand Down Expand Up @@ -42,7 +42,7 @@ inputs = {

```hcl
module "wrapper" {
source = "terraform-aws-modules/lambda/aws//wrappers/docker-build"
source = "gametimesf/tf-aws-lambda/aws//wrappers/docker-build"
defaults = { # Default values
create = true
Expand Down

0 comments on commit 0fdd0fc

Please sign in to comment.