From 13c444905e18fa9eceffd07ee884251eb28a8fd5 Mon Sep 17 00:00:00 2001 From: Anton Babenko Date: Wed, 13 Apr 2022 22:18:33 +0200 Subject: [PATCH 1/2] fix: Fixed ephemeral_storage in AWS govcloud region (#305) --- main.tf | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/main.tf b/main.tf index fa201996..57f9a041 100644 --- a/main.tf +++ b/main.tf @@ -37,8 +37,13 @@ resource "aws_lambda_function" "this" { package_type = var.package_type architectures = var.architectures - ephemeral_storage { - size = var.ephemeral_storage_size + /* ephemeral_storage is not supported in gov-cloud region, so it should be set to `null` */ + dynamic "ephemeral_storage" { + for_each = var.ephemeral_storage_size == null ? [] : [true] + + content { + size = var.ephemeral_storage_size + } } filename = local.filename From 4bc9ef2349783ca912d5ac062cf4caa2a8923399 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 13 Apr 2022 20:19:06 +0000 Subject: [PATCH 2/2] chore(release): version 3.1.1 [skip ci] ### [3.1.1](https://github.com/terraform-aws-modules/terraform-aws-lambda/compare/v3.1.0...v3.1.1) (2022-04-13) ### Bug Fixes * Fixed ephemeral_storage in AWS govcloud region ([#305](https://github.com/terraform-aws-modules/terraform-aws-lambda/issues/305)) ([13c4449](https://github.com/terraform-aws-modules/terraform-aws-lambda/commit/13c444905e18fa9eceffd07ee884251eb28a8fd5)) --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c3c31bb8..de46e2fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. +### [3.1.1](https://github.com/terraform-aws-modules/terraform-aws-lambda/compare/v3.1.0...v3.1.1) (2022-04-13) + + +### Bug Fixes + +* Fixed ephemeral_storage in AWS govcloud region ([#305](https://github.com/terraform-aws-modules/terraform-aws-lambda/issues/305)) ([13c4449](https://github.com/terraform-aws-modules/terraform-aws-lambda/commit/13c444905e18fa9eceffd07ee884251eb28a8fd5)) + ## [3.1.0](https://github.com/terraform-aws-modules/terraform-aws-lambda/compare/v3.0.1...v3.1.0) (2022-03-28)