diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9cf5d549..8f883039 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,13 @@
All notable changes to this project will be documented in this file.
+### [2.35.1](https://github.com/terraform-aws-modules/terraform-aws-lambda/compare/v2.35.0...v2.35.1) (2022-03-18)
+
+
+### Bug Fixes
+
+* Added support for keep_remotely in docker-build submodule ([#284](https://github.com/terraform-aws-modules/terraform-aws-lambda/issues/284)) ([db34260](https://github.com/terraform-aws-modules/terraform-aws-lambda/commit/db34260a1685333fa1f491b77f4564033c29729b))
+
## [2.35.0](https://github.com/terraform-aws-modules/terraform-aws-lambda/compare/v2.34.1...v2.35.0) (2022-03-12)
diff --git a/README.md b/README.md
index 44050a22..1f89893f 100644
--- a/README.md
+++ b/README.md
@@ -804,9 +804,8 @@ Please reach out to [Betajob](https://www.betajob.com/) if you are looking for c
Apache 2 Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraform-aws-lambda/tree/master/LICENSE) for full details.
-## Additional terms of use for users from Russia and Belarus
+## Additional information for users from Russia and Belarus
-By using the code provided in this repository you agree with the following:
* Russia has [illegally annexed Crimea in 2014](https://en.wikipedia.org/wiki/Annexation_of_Crimea_by_the_Russian_Federation) and [brought the war in Donbas](https://en.wikipedia.org/wiki/War_in_Donbas) followed by [full-scale invasion of Ukraine in 2022](https://en.wikipedia.org/wiki/2022_Russian_invasion_of_Ukraine).
* Russia has brought sorrow and devastations to millions of Ukrainians, killed hundreds of innocent people, damaged thousands of buildings, and forced several million people to flee.
* [Putin khuylo!](https://en.wikipedia.org/wiki/Putin_khuylo!)
diff --git a/modules/docker-build/README.md b/modules/docker-build/README.md
index 018d4bf3..6ace9e78 100644
--- a/modules/docker-build/README.md
+++ b/modules/docker-build/README.md
@@ -44,14 +44,14 @@ module "docker_image" {
|------|---------|
| [terraform](#requirement\_terraform) | >= 0.13.1 |
| [aws](#requirement\_aws) | >= 3.35 |
-| [docker](#requirement\_docker) | >= 2.8.0 |
+| [docker](#requirement\_docker) | >= 2.12 |
## Providers
| Name | Version |
|------|---------|
| [aws](#provider\_aws) | >= 3.35 |
-| [docker](#provider\_docker) | >= 2.8.0 |
+| [docker](#provider\_docker) | >= 2.12 |
## Modules
@@ -81,6 +81,7 @@ No modules.
| [ecr\_repo\_tags](#input\_ecr\_repo\_tags) | A map of tags to assign to ECR repository | `map(string)` | `{}` | no |
| [image\_tag](#input\_image\_tag) | Image tag to use. If not specified current timestamp in format 'YYYYMMDDhhmmss' will be used. This can lead to unnecessary rebuilds. | `string` | `null` | no |
| [image\_tag\_mutability](#input\_image\_tag\_mutability) | The tag mutability setting for the repository. Must be one of: `MUTABLE` or `IMMUTABLE` | `string` | `"MUTABLE"` | no |
+| [keep\_remotely](#input\_keep\_remotely) | Whether to keep Docker image in the remote registry on destroy operation. | `bool` | `false` | no |
| [scan\_on\_push](#input\_scan\_on\_push) | Indicates whether images are scanned after being pushed to the repository | `bool` | `false` | no |
| [source\_path](#input\_source\_path) | Path to folder containing application code | `string` | `null` | no |
diff --git a/modules/docker-build/main.tf b/modules/docker-build/main.tf
index 920aa0e4..bfa2ae0e 100644
--- a/modules/docker-build/main.tf
+++ b/modules/docker-build/main.tf
@@ -27,6 +27,8 @@ resource "docker_registry_image" "this" {
dockerfile = var.docker_file_path
build_args = var.build_args
}
+
+ keep_remotely = var.keep_remotely
}
resource "aws_ecr_repository" "this" {
diff --git a/modules/docker-build/variables.tf b/modules/docker-build/variables.tf
index fdfe1c44..f029958a 100644
--- a/modules/docker-build/variables.tf
+++ b/modules/docker-build/variables.tf
@@ -64,3 +64,9 @@ variable "ecr_repo_lifecycle_policy" {
type = string
default = null
}
+
+variable "keep_remotely" {
+ description = "Whether to keep Docker image in the remote registry on destroy operation."
+ type = bool
+ default = false
+}
diff --git a/modules/docker-build/versions.tf b/modules/docker-build/versions.tf
index 001ad6f0..87ea2d45 100644
--- a/modules/docker-build/versions.tf
+++ b/modules/docker-build/versions.tf
@@ -2,10 +2,13 @@ terraform {
required_version = ">= 0.13.1"
required_providers {
- aws = ">= 3.35"
+ aws = {
+ source = "hashicorp/aws"
+ version = ">= 3.35"
+ }
docker = {
source = "kreuzwerker/docker"
- version = ">= 2.8.0"
+ version = ">= 2.12"
}
}
}