Skip to content

feat: Ignore last_modified on aws_lambda_function #624

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
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
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
Loading