terraform-aws-lambda
terraform-aws-lambda copied to clipboard
Adding platform option in docker-build module
Is your request related to a new offering from AWS?
Is this functionality available in the AWS provider for Terraform? See CHANGELOG.md, too.
- No π: This feature request is related to the docker provider version 2.22.0.
Is your request related to a problem? Please describe.
When building on M1 Mac, the option to build docker images in other platforms would be a nice feature. Currently when using the docker-build module, the default platform on M1 Mac will be arm but I would like to build x86_64 architecture.
Describe the solution you'd like.
Change the docker_registry_image block in docker-build module to include platform
argument:
resource "docker_registry_image" "this" {
name = local.ecr_image_name
build {
context = var.source_path
dockerfile = var.docker_file_path
build_args = var.build_args
platform = var.platform
}
keep_remotely = var.keep_remotely
}
Describe alternatives you've considered.
Setting the AWS Lambda architecture to arm64.