Skip to content

Commit 13c4449

Browse files
authored
fix: Fixed ephemeral_storage in AWS govcloud region (#305)
1 parent de9052f commit 13c4449

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

main.tf

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,13 @@ resource "aws_lambda_function" "this" {
3737
package_type = var.package_type
3838
architectures = var.architectures
3939

40-
ephemeral_storage {
41-
size = var.ephemeral_storage_size
40+
/* ephemeral_storage is not supported in gov-cloud region, so it should be set to `null` */
41+
dynamic "ephemeral_storage" {
42+
for_each = var.ephemeral_storage_size == null ? [] : [true]
43+
44+
content {
45+
size = var.ephemeral_storage_size
46+
}
4247
}
4348

4449
filename = local.filename

0 commit comments

Comments
 (0)