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) 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