From 0689160fd4c4512adeef8c455b654914a7170300 Mon Sep 17 00:00:00 2001 From: Daniel Mil <84205762+mildaniel@users.noreply.github.com> Date: Tue, 3 Oct 2023 14:10:01 -0700 Subject: [PATCH] test: Refactor Terraform Build Tests (#6013) * test: Refactor Terraform build tests * test: Refactor Terraform build tests (#5993) * Change function identifier * Update terraform testing procedure (#5994) * test: Refactor Terraform build tests * Change function identifier * Fix S3 issues * Update terraform testing procedure (#5995) * test: Refactor Terraform build tests * Change function identifier * Fix S3 issues * Test Windows all Terraform tests * Update terraform testing procedure (#5996) * test: Refactor Terraform build tests * Change function identifier * Fix S3 issues * Test Windows all Terraform tests * Fix appveyor config * Install terraform * Test parallel build single thread * Refactor Terraform build integration tests * Update appveyor jobs * Fix linter error * Fix other tests issue * Run build during setup --- appveyor-linux-binary.yml | 79 +-- appveyor-ubuntu.yml | 79 +-- appveyor-windows-binary.yml | 59 +-- appveyor-windows.yml | 67 +-- .../test_build_terraform_applications.py | 401 +++++++++------- ...uild_terraform_applications_other_cases.py | 79 --- .../expected.template.yaml | 72 +++ .../expected.template.yaml | 72 +++ .../expected.template.yaml | 451 ++++++++++++++++++ .../expected.template.yaml | 319 +++++++++++++ .../expected.template.yaml | 319 +++++++++++++ .../expected.template.yaml | 451 ++++++++++++++++++ .../expected.template.yaml | 319 +++++++++++++ .../expected.template.yaml | 319 +++++++++++++ 14 files changed, 2560 insertions(+), 526 deletions(-) create mode 100644 tests/integration/testdata/buildcmd/terraform/image_based_lambda_functions_local_backend/expected.template.yaml create mode 100644 tests/integration/testdata/buildcmd/terraform/image_based_lambda_functions_s3_backend/expected.template.yaml create mode 100644 tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/expected.template.yaml create mode 100644 tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/expected.template.yaml create mode 100644 tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_windows/expected.template.yaml create mode 100644 tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend/expected.template.yaml create mode 100644 tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_container_windows/expected.template.yaml create mode 100644 tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_windows/expected.template.yaml diff --git a/appveyor-linux-binary.yml b/appveyor-linux-binary.yml index 6e89e53cd9..920b616f2f 100644 --- a/appveyor-linux-binary.yml +++ b/appveyor-linux-binary.yml @@ -4,11 +4,7 @@ image: configuration: - BuildIntegTesting - - LocalZipTerraformBuildIntegTesting - - LocalZipTerraformBuildInContainerIntegTesting - - S3ZipTerraformBuildIntegTesting - - S3ZipTerraformBuildInContainerIntegTesting - - OtherTerraformBuildIntegTesting + - AllTerraformBuildTesting - DeployIntegTesting - PackageIntegTesting - DeleteIntegTesting @@ -179,79 +175,11 @@ for: - sh: "JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64" - sh: "pytest -vv tests/integration/buildcmd/test_build_cmd.py -k test_building_java11_in_process --json-report --json-report-file=TEST_REPORT-integration-buildcmd-java11.json" - # Local ZIP Terraform Build integ testing + # Integ testing Terraform build - matrix: only: - - configuration: LocalZipTerraformBuildIntegTesting - - test_script: - # install Terraform - - sh: "sudo apt update --allow-releaseinfo-change" - - sh: "TER_VER=`curl -s https://api.github.com/repos/hashicorp/terraform/releases/latest | grep tag_name | cut -d: -f2 | tr -d \\\"\\,\\v | awk '{$1=$1};1'`" - - sh: "wget https://releases.hashicorp.com/terraform/${TER_VER}/terraform_${TER_VER}_linux_amd64.zip -P /tmp" - - sh: "sudo unzip -d /opt/terraform /tmp/terraform_${TER_VER}_linux_amd64.zip" - - sh: "sudo mv /opt/terraform/terraform /usr/local/bin/" - - sh: "terraform -version" - - - sh: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications.py::TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndLocalBackend_0 --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json" - - # Local ZIP Terraform Build In Container integ testing - - - matrix: - only: - - configuration: LocalZipTerraformBuildInContainerIntegTesting - - test_script: - # install Terraform - - sh: "sudo apt update --allow-releaseinfo-change" - - sh: "TER_VER=`curl -s https://api.github.com/repos/hashicorp/terraform/releases/latest | grep tag_name | cut -d: -f2 | tr -d \\\"\\,\\v | awk '{$1=$1};1'`" - - sh: "wget https://releases.hashicorp.com/terraform/${TER_VER}/terraform_${TER_VER}_linux_amd64.zip -P /tmp" - - sh: "sudo unzip -d /opt/terraform /tmp/terraform_${TER_VER}_linux_amd64.zip" - - sh: "sudo mv /opt/terraform/terraform /usr/local/bin/" - - sh: "terraform -version" - - - sh: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications.py::TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndLocalBackend_1 --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json" - - # S3 ZIP Terraform Build integ testing - - - matrix: - only: - - configuration: S3ZipTerraformBuildIntegTesting - - test_script: - # install Terraform - - sh: "sudo apt update --allow-releaseinfo-change" - - sh: "TER_VER=`curl -s https://api.github.com/repos/hashicorp/terraform/releases/latest | grep tag_name | cut -d: -f2 | tr -d \\\"\\,\\v | awk '{$1=$1};1'`" - - sh: "wget https://releases.hashicorp.com/terraform/${TER_VER}/terraform_${TER_VER}_linux_amd64.zip -P /tmp" - - sh: "sudo unzip -d /opt/terraform /tmp/terraform_${TER_VER}_linux_amd64.zip" - - sh: "sudo mv /opt/terraform/terraform /usr/local/bin/" - - sh: "terraform -version" - - - sh: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications.py::TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndS3Backend_0 --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json" - - # S3 ZIP Terraform Build In Container integ testing - - - matrix: - only: - - configuration: S3ZipTerraformBuildInContainerIntegTesting - - test_script: - # install Terraform - - sh: "sudo apt update --allow-releaseinfo-change" - - sh: "TER_VER=`curl -s https://api.github.com/repos/hashicorp/terraform/releases/latest | grep tag_name | cut -d: -f2 | tr -d \\\"\\,\\v | awk '{$1=$1};1'`" - - sh: "wget https://releases.hashicorp.com/terraform/${TER_VER}/terraform_${TER_VER}_linux_amd64.zip -P /tmp" - - sh: "sudo unzip -d /opt/terraform /tmp/terraform_${TER_VER}_linux_amd64.zip" - - sh: "sudo mv /opt/terraform/terraform /usr/local/bin/" - - sh: "terraform -version" - - - sh: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications.py::TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndS3Backend_1 --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json" - - # Other Terraform Build In Container integ testing - - - matrix: - only: - - configuration: OtherTerraformBuildIntegTesting + - configuration: AllTerraformBuildTesting test_script: # install Terraform @@ -262,6 +190,7 @@ for: - sh: "sudo mv /opt/terraform/terraform /usr/local/bin/" - sh: "terraform -version" + - sh: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications.py --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json" - sh: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications_other_cases.py --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json" # Integ testing deploy diff --git a/appveyor-ubuntu.yml b/appveyor-ubuntu.yml index 6778031a89..a07c179296 100644 --- a/appveyor-ubuntu.yml +++ b/appveyor-ubuntu.yml @@ -4,11 +4,7 @@ image: configuration: - BuildIntegTesting - - LocalZipTerraformBuildIntegTesting - - LocalZipTerraformBuildInContainerIntegTesting - - S3ZipTerraformBuildIntegTesting - - S3ZipTerraformBuildInContainerIntegTesting - - OtherTerraformBuildIntegTesting + - AllTerraformBuildTesting - DeployIntegTesting - PackageIntegTesting - DeleteIntegTesting @@ -167,79 +163,11 @@ for: - sh: "JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64" - sh: "pytest -vv tests/integration/buildcmd/test_build_cmd.py -k test_building_java11_in_process --json-report --json-report-file=TEST_REPORT-integration-buildcmd-java11.json" - # Local ZIP Terraform Build integ testing + # Integ testing Terraform build - matrix: only: - - configuration: LocalZipTerraformBuildIntegTesting - - test_script: - # install Terraform - - sh: "sudo apt update --allow-releaseinfo-change" - - sh: "TER_VER=`curl -s https://api.github.com/repos/hashicorp/terraform/releases/latest | grep tag_name | cut -d: -f2 | tr -d \\\"\\,\\v | awk '{$1=$1};1'`" - - sh: "wget https://releases.hashicorp.com/terraform/${TER_VER}/terraform_${TER_VER}_linux_amd64.zip -P /tmp" - - sh: "sudo unzip -d /opt/terraform /tmp/terraform_${TER_VER}_linux_amd64.zip" - - sh: "sudo mv /opt/terraform/terraform /usr/local/bin/" - - sh: "terraform -version" - - - sh: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications.py::TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndLocalBackend_0 --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json" - - # Local ZIP Terraform Build In Container integ testing - - - matrix: - only: - - configuration: LocalZipTerraformBuildInContainerIntegTesting - - test_script: - # install Terraform - - sh: "sudo apt update --allow-releaseinfo-change" - - sh: "TER_VER=`curl -s https://api.github.com/repos/hashicorp/terraform/releases/latest | grep tag_name | cut -d: -f2 | tr -d \\\"\\,\\v | awk '{$1=$1};1'`" - - sh: "wget https://releases.hashicorp.com/terraform/${TER_VER}/terraform_${TER_VER}_linux_amd64.zip -P /tmp" - - sh: "sudo unzip -d /opt/terraform /tmp/terraform_${TER_VER}_linux_amd64.zip" - - sh: "sudo mv /opt/terraform/terraform /usr/local/bin/" - - sh: "terraform -version" - - - sh: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications.py::TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndLocalBackend_1 --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json" - - # S3 ZIP Terraform Build integ testing - - - matrix: - only: - - configuration: S3ZipTerraformBuildIntegTesting - - test_script: - # install Terraform - - sh: "sudo apt update --allow-releaseinfo-change" - - sh: "TER_VER=`curl -s https://api.github.com/repos/hashicorp/terraform/releases/latest | grep tag_name | cut -d: -f2 | tr -d \\\"\\,\\v | awk '{$1=$1};1'`" - - sh: "wget https://releases.hashicorp.com/terraform/${TER_VER}/terraform_${TER_VER}_linux_amd64.zip -P /tmp" - - sh: "sudo unzip -d /opt/terraform /tmp/terraform_${TER_VER}_linux_amd64.zip" - - sh: "sudo mv /opt/terraform/terraform /usr/local/bin/" - - sh: "terraform -version" - - - sh: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications.py::TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndS3Backend_0 --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json" - - # S3 ZIP Terraform Build In Container integ testing - - - matrix: - only: - - configuration: S3ZipTerraformBuildInContainerIntegTesting - - test_script: - # install Terraform - - sh: "sudo apt update --allow-releaseinfo-change" - - sh: "TER_VER=`curl -s https://api.github.com/repos/hashicorp/terraform/releases/latest | grep tag_name | cut -d: -f2 | tr -d \\\"\\,\\v | awk '{$1=$1};1'`" - - sh: "wget https://releases.hashicorp.com/terraform/${TER_VER}/terraform_${TER_VER}_linux_amd64.zip -P /tmp" - - sh: "sudo unzip -d /opt/terraform /tmp/terraform_${TER_VER}_linux_amd64.zip" - - sh: "sudo mv /opt/terraform/terraform /usr/local/bin/" - - sh: "terraform -version" - - - sh: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications.py::TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndS3Backend_1 --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json" - - # Other Terraform Build In Container integ testing - - - matrix: - only: - - configuration: OtherTerraformBuildIntegTesting + - configuration: AllTerraformBuildTesting test_script: # install Terraform @@ -250,6 +178,7 @@ for: - sh: "sudo mv /opt/terraform/terraform /usr/local/bin/" - sh: "terraform -version" + - sh: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications.py --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json" - sh: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications_other_cases.py --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json" # Integ testing deploy diff --git a/appveyor-windows-binary.yml b/appveyor-windows-binary.yml index 151cd3550b..ee35362ae0 100644 --- a/appveyor-windows-binary.yml +++ b/appveyor-windows-binary.yml @@ -6,11 +6,7 @@ clone_folder: C:\source configuration: - BuildIntegTesting - - LocalZipTerraformBuildIntegTesting - - LocalZipTerraformBuildInContainerIntegTesting - - S3ZipTerraformBuildIntegTesting - - S3ZipTerraformBuildInContainerIntegTesting - - OtherTerraformBuildIntegTesting + - AllTerraformBuildTesting - DeployIntegTesting - PackageIntegTesting - DeleteIntegTesting @@ -203,64 +199,17 @@ for: test_script: - ps: "pytest -vv tests/integration/buildcmd --ignore tests/integration/buildcmd/test_build_terraform_applications.py --ignore=tests/integration/buildcmd/test_build_terraform_applications_other_cases.py --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json" - # Local ZIP Terraform Build integ testing + #Integ testing Terraform build - matrix: only: - - configuration: LocalZipTerraformBuildIntegTesting - - test_script: - # install Terraform CLI - - "choco install terraform" - - "terraform -version" - - - ps: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications.py::TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndLocalBackend_0 --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json" - - # Local ZIP Terraform Build In Container integ testing - - matrix: - only: - - configuration: LocalZipTerraformBuildInContainerIntegTesting - - test_script: - # install Terraform CLI - - "choco install terraform" - - "terraform -version" - - - ps: "pytest -vv tests/integration/buildcmd/test_build_terraform_applications.py::TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndLocalBackend_1 --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json" - - # S3 ZIP Terraform Build integ testing - - matrix: - only: - - configuration: S3ZipTerraformBuildIntegTesting - - test_script: - # install Terraform CLI - - "choco install terraform" - - "terraform -version" - - - ps: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications.py::TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndS3Backend_0 --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json" - - # S3 ZIP Terraform Build In Container integ testing - - matrix: - only: - - configuration: S3ZipTerraformBuildInContainerIntegTesting - - test_script: - # install Terraform CLI - - "choco install terraform" - - "terraform -version" - - - ps: "pytest -vv tests/integration/buildcmd/test_build_terraform_applications.py::TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndS3Backend_1 --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json" - - # Other Terraform Build integ testing - - matrix: - only: - - configuration: OtherTerraformBuildIntegTesting + - configuration: AllTerraformBuildTesting test_script: # install Terraform CLI - "choco install terraform" - "terraform -version" + - ps: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications.py --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json" - ps: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications_other_cases.py --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json" #Integ testing deploy diff --git a/appveyor-windows.yml b/appveyor-windows.yml index 2aae5baa39..f95f7f656b 100644 --- a/appveyor-windows.yml +++ b/appveyor-windows.yml @@ -6,11 +6,7 @@ clone_folder: C:\source configuration: - BuildIntegTesting - - LocalZipTerraformBuildIntegTesting - - LocalZipTerraformBuildInContainerIntegTesting - - S3ZipTerraformBuildIntegTesting - - S3ZipTerraformBuildInContainerIntegTesting - - OtherTerraformBuildIntegTesting + - AllTerraformBuildTesting - DeployIntegTesting - PackageIntegTesting - DeleteIntegTesting @@ -194,74 +190,19 @@ for: test_script: - ps: "pytest -vv tests/integration/buildcmd --ignore tests/integration/buildcmd/test_build_terraform_applications.py --ignore=tests/integration/buildcmd/test_build_terraform_applications_other_cases.py --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json" - # Local ZIP Terraform Build integ testing + #Integ testing Terraform build - matrix: only: - - configuration: LocalZipTerraformBuildIntegTesting - - test_script: - # install Terraform CLI - - "choco install terraform" - - "terraform -version" - - - ps: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications.py::TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndLocalBackend_0 --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json" - - # Local ZIP Terraform Build In Container integ testing - - matrix: - only: - - configuration: LocalZipTerraformBuildInContainerIntegTesting - - test_script: - # install Terraform CLI - - "choco install terraform" - - "terraform -version" - - - ps: "pytest -vv tests/integration/buildcmd/test_build_terraform_applications.py::TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndLocalBackend_1 --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json" - - # S3 ZIP Terraform Build integ testing - - matrix: - only: - - configuration: S3ZipTerraformBuildIntegTesting - - test_script: - # install Terraform CLI - - "choco install terraform" - - "terraform -version" - - - ps: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications.py::TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndS3Backend_0 --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json" - - # S3 ZIP Terraform Build In Container integ testing - - matrix: - only: - - configuration: S3ZipTerraformBuildInContainerIntegTesting - - test_script: - # install Terraform CLI - - "choco install terraform" - - "terraform -version" - - - ps: "pytest -vv tests/integration/buildcmd/test_build_terraform_applications.py::TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndS3Backend_1 --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json" - - # Other Terraform Build integ testing - - matrix: - only: - - configuration: OtherTerraformBuildIntegTesting + - configuration: AllTerraformBuildTesting test_script: # install Terraform CLI - "choco install terraform" - "terraform -version" + - ps: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications.py --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json" - ps: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications_other_cases.py --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json" - #Integ testing deploy - - matrix: - only: - - configuration: DeployIntegTesting - - test_script: - - ps: "pytest -vv tests/integration/deploy -n 4 --reruns 4 --dist=loadgroup --json-report --json-report-file=TEST_REPORT-integration-deploy.json" - # Integ testing package - matrix: only: diff --git a/tests/integration/buildcmd/test_build_terraform_applications.py b/tests/integration/buildcmd/test_build_terraform_applications.py index a0b1bbdcf0..22fd93c7f0 100644 --- a/tests/integration/buildcmd/test_build_terraform_applications.py +++ b/tests/integration/buildcmd/test_build_terraform_applications.py @@ -12,11 +12,14 @@ import boto3 import docker +import pytest -from parameterized import parameterized, parameterized_class +from parameterized import parameterized_class +from samcli.yamlhelper import yaml_parse from tests.integration.buildcmd.build_integ_base import BuildIntegBase from tests.testing_utils import CI_OVERRIDE, IS_WINDOWS, RUN_BY_CANARY +from tests.testing_utils import run_command as static_run_command LOG = logging.getLogger(__name__) S3_SLEEP = 3 @@ -26,6 +29,9 @@ class BuildTerraformApplicationIntegBase(BuildIntegBase): terraform_application: Optional[Path] = None template = None build_in_container = False + function_identifier: Optional[str] = None + override: bool = False + s3_backend = False @classmethod def setUpClass(cls): @@ -54,15 +60,80 @@ def setUp(self): super().setUp() shutil.rmtree(Path(self.working_dir)) shutil.copytree(Path(self.terraform_application_path), Path(self.working_dir)) + if not self.s3_backend: + self.build_with_prepare_hook() - def run_command(self, command_list, env=None, input=None, timeout=None): - process = Popen(command_list, stdout=PIPE, stderr=PIPE, stdin=PIPE, env=env, cwd=self.working_dir) + def tearDown(self): + super(BuildTerraformApplicationIntegBase, self).tearDown() + + def run_command(self, command_list, env=None, timeout=None): + command_result = static_run_command(command_list, env=env, cwd=self.working_dir, timeout=timeout) + return command_result.stdout, command_result.stderr, command_result.process.returncode + + def build_with_prepare_hook(self): + if not self.function_identifier: + # This doesn't make sense for all tests that inherit this base class, skip for those + return + + command_list_parameters = {"function_identifier": self.function_identifier, "hook_name": "terraform"} + if self.build_in_container: + command_list_parameters["use_container"] = True + command_list_parameters["build_image"] = self.docker_tag + if self.override: + command_list_parameters[ + "container_env_var" + ] = "TF_VAR_HELLO_FUNCTION_SRC_CODE=./artifacts/HelloWorldFunction2" + + environment_variables = os.environ.copy() + if self.override: + environment_variables["TF_VAR_HELLO_FUNCTION_SRC_CODE"] = "./artifacts/HelloWorldFunction2" + + build_cmd_list = self.get_command_list(**command_list_parameters) + _, stderr, return_code = self.run_command(build_cmd_list, env=environment_variables) + LOG.info(stderr.decode("utf-8")) + self.assertEqual(return_code, 0) + + def validate_metadata_file(self): + build_template_path = Path(self.working_dir) / ".aws-sam" / "build" / "template.yaml" + expected_template_path = Path(self.working_dir) / "expected.template.yaml" + build_template = self.read_template(build_template_path) + expected_template = self.read_template(expected_template_path) + self.clean_template(build_template) + self.clean_template(expected_template) + self.assertEqual(build_template, expected_template) + LOG.info("Successfully validated template produced is same as expected") + + @staticmethod + def clean_template(template: dict): + # Some fields contain absolute paths that will differ across environments + # We need to clean those fields up before we can compare the templates + resources = template.get("Resources", {}) + for _, resource in resources.items(): + properties = resource.get("Properties", {}) + metadata = resource.get("Metadata", {}) + if properties: + BuildTerraformApplicationIntegBase.remove_field(properties, "Code") + BuildTerraformApplicationIntegBase.remove_field(properties, "Content") + if metadata: + BuildTerraformApplicationIntegBase.remove_field(metadata, "ContextPath") + BuildTerraformApplicationIntegBase.remove_field(metadata, "WorkingDirectory") + BuildTerraformApplicationIntegBase.remove_field(metadata, "ProjectRootDirectory") + BuildTerraformApplicationIntegBase.remove_field(metadata, "DockerContext") + + @staticmethod + def remove_field(section: dict, field: str): + section_field = section.get(field) + if section_field: + section[field] = "" + + @staticmethod + def read_template(path: Path): try: - (stdout, stderr) = process.communicate(input=input, timeout=timeout) - return stdout, stderr, process.returncode - except TimeoutExpired: - process.kill() - raise + with open(path, "r") as f: + template_dict = yaml_parse(f.read()) + return template_dict + except OSError: + raise AssertionError(f"Failed to read generated metadata file in: {path}") def _verify_invoke_built_function(self, function_logical_id, overrides, expected_result): LOG.info("Invoking built function '{}'".format(function_logical_id)) @@ -111,7 +182,6 @@ def setUpClass(cls): if not cls.pre_created_bucket: cls.s3_bucket.create() time.sleep(S3_SLEEP) - super().setUpClass() @classmethod @@ -136,7 +206,8 @@ def setUp(self): ["terraform", "init", f"-backend-config={self.backendconfig_path}", "-reconfigure", "-input=false"] ) if stderr: - LOG.info(stderr) + LOG.info(stderr.decode("utf-8")) + self.build_with_prepare_hook() def tearDown(self): """Clean up the terraform state file on S3 and remove the backendconfg locally""" @@ -161,50 +232,55 @@ def tearDown(self): (True,), ], ) +@pytest.mark.xdist_group(name="zip_lambda_local_backend_override") +class TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndLocalBackendWithOverride( + BuildTerraformApplicationIntegBase +): + function_identifier = "function9" + override = True + terraform_application = ( + Path("terraform/zip_based_lambda_functions_local_backend") + if not IS_WINDOWS + else Path("terraform/zip_based_lambda_functions_local_backend_windows") + ) + + @classmethod + def setUpClass(cls): + if IS_WINDOWS and cls.build_in_container: + # we use this TF project to test sam build in container on windows as we need to run a linux bash script for + # build, and also we need to remove the Serverless TF functions from this project. + # that is why we need to use a new project and not one of the existing linux or windows projects + cls.terraform_application = "terraform/zip_based_lambda_functions_local_backend_container_windows" + super().setUpClass() + + def test_build_and_invoke_lambda_functions(self): + self.validate_metadata_file() + self._verify_invoke_built_function( + function_logical_id=self.function_identifier, + overrides=None, + expected_result={"statusCode": 200, "body": "hello world 9 - override version"}, + ) + + +@skipIf( + (not RUN_BY_CANARY and not CI_OVERRIDE), + "Skip Terraform test cases unless running in CI", +) +@parameterized_class( + ("build_in_container",), + [ + (False,), + (True,), + ], +) +@pytest.mark.xdist_group(name="zip_lambda_local_backend") class TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndLocalBackend(BuildTerraformApplicationIntegBase): + function_identifier = "function9" terraform_application = ( Path("terraform/zip_based_lambda_functions_local_backend") if not IS_WINDOWS else Path("terraform/zip_based_lambda_functions_local_backend_windows") ) - functions = [ - ("module.function9.aws_lambda_function.this[0]", "hello world 9 - override version", True), - ("function9", "hello world 9 - override version", True), - ("module.function9.aws_lambda_function.this[0]", "hello world 9", False), - ("function9", "hello world 9", False), - ("aws_lambda_function.function6", "hello world 6 - override version", True), - ("function6", "hello world 6 - override version", True), - ("aws_lambda_function.function6", "hello world 6", False), - ("function6", "hello world 6", False), - ("aws_lambda_function.function5", "hello world 5 - override version", True), - ("function5", "hello world 5 - override version", True), - ("aws_lambda_function.function5", "hello world 5", False), - ("function5", "hello world 5", False), - ("aws_lambda_function.function4", "hello world 4 - override version", True), - ("function4", "hello world 4 - override version", True), - ("aws_lambda_function.function4", "hello world 4", False), - ("function4", "hello world 4", False), - ("aws_lambda_function.function3", "hello world 3 - override version", True), - ("function3", "hello world 3 - override version", True), - ("aws_lambda_function.function3", "hello world 3", False), - ("function3", "hello world 3", False), - ("module.function2.aws_lambda_function.this", "hello world 2 - override version", True), - ("function2", "hello world 2 - override version", True), - ("aws_lambda_function.function1", "hello world 1 - override version", True), - ("function1", "hello world 1 - override version", True), - ("module.function2.aws_lambda_function.this", "hello world 2", False), - ("function2", "hello world 2", False), - ("aws_lambda_function.function1", "hello world 1", False), - ("function1", "hello world 1", False), - ("aws_lambda_function.from_localfile", "[]", False), - ("aws_lambda_function.from_s3", "[]", False), - ("module.level1_lambda.aws_lambda_function.this", "[]", False), - ("module.level1_lambda.module.level2_lambda.aws_lambda_function.this", "[]", False), - ("my_function_from_localfile", "[]", False), - ("my_function_from_s3", "[]", False), - ("my_level1_lambda", "[]", False), - ("my_level2_lambda", "[]", False), - ] @classmethod def setUpClass(cls): @@ -213,58 +289,56 @@ def setUpClass(cls): # build, and also we need to remove the Serverless TF functions from this project. # that is why we need to use a new project and not one of the existing linux or windows projects cls.terraform_application = "terraform/zip_based_lambda_functions_local_backend_container_windows" - if not IS_WINDOWS: - # The following functions are defined using serverless tf module, and since Serverless TF has some issue - # while executing `terraform plan` in windows, we removed these function from the TF projects we used in - # testing on Windows, and only test them on linux. - # check the Serverless TF issue https://github.com/terraform-aws-modules/terraform-aws-lambda/issues/142 - cls.functions += [ - ("module.function7.aws_lambda_function.this[0]", "hello world 7 - override version", True), - ("function7", "hello world 7 - override version", True), - ("module.function7.aws_lambda_function.this[0]", "hello world 7", False), - ("function7", "hello world 7", False), - ("module.function8.aws_lambda_function.this[0]", "hello world 8 - override version", True), - ("function8", "hello world 8 - override version", True), - ("module.function8.aws_lambda_function.this[0]", "hello world 8", False), - ("function8", "hello world 8", False), - ("module.function10.aws_lambda_function.this[0]", "hello world 10 - override version", True), - ("function10", "hello world 10 - override version", True), - ("module.function10.aws_lambda_function.this[0]", "hello world 10", False), - ("function10", "hello world 10", False), - ("module.function11.aws_lambda_function.this[0]", "hello world 11 - override version", True), - ("function11", "hello world 11 - override version", True), - ("module.function11.aws_lambda_function.this[0]", "hello world 11", False), - ("function11", "hello world 11", False), - ] super().setUpClass() - @parameterized.expand(functions) - def test_build_and_invoke_lambda_functions(self, function_identifier, expected_output, should_override_code): - command_list_parameters = { - "hook_name": "terraform", - "function_identifier": function_identifier, - } - if self.build_in_container: - command_list_parameters["use_container"] = True - command_list_parameters["build_image"] = self.docker_tag - if should_override_code: - command_list_parameters[ - "container_env_var" - ] = "TF_VAR_HELLO_FUNCTION_SRC_CODE=./artifacts/HelloWorldFunction2" - build_cmd_list = self.get_command_list(**command_list_parameters) - LOG.info("command list: %s", build_cmd_list) - environment_variables = os.environ.copy() - if should_override_code: - environment_variables["TF_VAR_HELLO_FUNCTION_SRC_CODE"] = "./artifacts/HelloWorldFunction2" - stdout, stderr, return_code = self.run_command(build_cmd_list, env=environment_variables) - LOG.info("sam build stdout: %s", stdout.decode("utf-8")) - LOG.info("sam build stderr: %s", stderr.decode("utf-8")) - self.assertEqual(return_code, 0) + def test_build_and_invoke_lambda_functions(self): + self.validate_metadata_file() + self._verify_invoke_built_function( + function_logical_id=self.function_identifier, + overrides=None, + expected_result={"statusCode": 200, "body": "hello world 9"}, + ) + + +@skipIf( + (not RUN_BY_CANARY and not CI_OVERRIDE), + "Skip Terraform test cases unless running in CI", +) +@parameterized_class( + ("build_in_container",), + [ + (False,), + (True,), + ], +) +@pytest.mark.xdist_group(name="zip_lambda_s3_backend") +class TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndS3BackendWithOverride( + BuildTerraformApplicationS3BackendIntegBase +): + function_identifier = "function9" + override = True + s3_backend = True + terraform_application = ( + Path("terraform/zip_based_lambda_functions_s3_backend") + if not IS_WINDOWS + else Path("terraform/zip_based_lambda_functions_s3_backend_windows") + ) + + @classmethod + def setUpClass(cls): + if IS_WINDOWS and cls.build_in_container: + # we use this TF project to test sam build in container on windows as we need to run a linux bash script for + # build, and also we need to remove the Serverless TF functions from this project. + # that is why we need to use a new project and not one of the existing linux or windows projects + cls.terraform_application = "terraform/zip_based_lambda_functions_s3_backend_container_windows" + super().setUpClass() + def test_build_and_invoke_lambda_functions(self): + self.validate_metadata_file() self._verify_invoke_built_function( - function_logical_id=function_identifier, + function_logical_id=self.function_identifier, overrides=None, - expected_result={"statusCode": 200, "body": expected_output}, + expected_result={"statusCode": 200, "body": "hello world 9 - override version"}, ) @@ -279,50 +353,15 @@ def test_build_and_invoke_lambda_functions(self, function_identifier, expected_o (True,), ], ) +@pytest.mark.xdist_group(name="zip_lambda_s3_backend_override") class TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndS3Backend(BuildTerraformApplicationS3BackendIntegBase): + function_identifier = "function9" + s3_backend = True terraform_application = ( Path("terraform/zip_based_lambda_functions_s3_backend") if not IS_WINDOWS else Path("terraform/zip_based_lambda_functions_s3_backend_windows") ) - functions = [ - ("module.function9.aws_lambda_function.this[0]", "hello world 9 - override version", True), - ("function9", "hello world 9 - override version", True), - ("module.function9.aws_lambda_function.this[0]", "hello world 9", False), - ("function9", "hello world 9", False), - ("aws_lambda_function.function5", "hello world 5 - override version", True), - ("function5", "hello world 5 - override version", True), - ("aws_lambda_function.function5", "hello world 5", False), - ("function5", "hello world 5", False), - ("aws_lambda_function.function6", "hello world 6 - override version", True), - ("function6", "hello world 6 - override version", True), - ("aws_lambda_function.function6", "hello world 6", False), - ("function6", "hello world 6", False), - ("aws_lambda_function.function4", "hello world 4 - override version", True), - ("function4", "hello world 4 - override version", True), - ("aws_lambda_function.function4", "hello world 4", False), - ("function4", "hello world 4", False), - ("aws_lambda_function.function3", "hello world 3 - override version", True), - ("function3", "hello world 3 - override version", True), - ("aws_lambda_function.function3", "hello world 3", False), - ("function3", "hello world 3", False), - ("module.function2.aws_lambda_function.this", "hello world 2 - override version", True), - ("function2", "hello world 2 - override version", True), - ("aws_lambda_function.function1", "hello world 1 - override version", True), - ("function1", "hello world 1 - override version", True), - ("module.function2.aws_lambda_function.this", "hello world 2", False), - ("function2", "hello world 2", False), - ("aws_lambda_function.function1", "hello world 1", False), - ("function1", "hello world 1", False), - ("aws_lambda_function.from_localfile", "[]", False), - ("aws_lambda_function.from_s3", "[]", False), - ("module.level1_lambda.aws_lambda_function.this", "[]", False), - ("module.level1_lambda.module.level2_lambda.aws_lambda_function.this", "[]", False), - ("my_function_from_localfile", "[]", False), - ("my_function_from_s3", "[]", False), - ("my_level1_lambda", "[]", False), - ("my_level2_lambda", "[]", False), - ] @classmethod def setUpClass(cls): @@ -331,55 +370,59 @@ def setUpClass(cls): # build, and also we need to remove the Serverless TF functions from this project. # that is why we need to use a new project and not one of the existing linux or windows projects cls.terraform_application = "terraform/zip_based_lambda_functions_s3_backend_container_windows" - if not IS_WINDOWS: - # The following functions are defined using serverless tf module, and since Serverless TF has some issue - # while executing `terraform plan` in windows, we removed these function from the TF projects we used in - # testing on Windows, and only test them on linux. - # check the Serverless TF issue https://github.com/terraform-aws-modules/terraform-aws-lambda/issues/142 - cls.functions += [ - ("module.function7.aws_lambda_function.this[0]", "hello world 7 - override version", True), - ("function7", "hello world 7 - override version", True), - ("module.function7.aws_lambda_function.this[0]", "hello world 7", False), - ("function7", "hello world 7", False), - ("module.function8.aws_lambda_function.this[0]", "hello world 8 - override version", True), - ("function8", "hello world 8 - override version", True), - ("module.function8.aws_lambda_function.this[0]", "hello world 8", False), - ("function8", "hello world 8", False), - ("module.function10.aws_lambda_function.this[0]", "hello world 10 - override version", True), - ("function10", "hello world 10 - override version", True), - ("module.function10.aws_lambda_function.this[0]", "hello world 10", False), - ("function10", "hello world 10", False), - ("module.function11.aws_lambda_function.this[0]", "hello world 11 - override version", True), - ("function11", "hello world 11 - override version", True), - ("module.function11.aws_lambda_function.this[0]", "hello world 11", False), - ("function11", "hello world 11", False), - ] super().setUpClass() - @parameterized.expand(functions) - def test_build_and_invoke_lambda_functions(self, function_identifier, expected_output, should_override_code): - command_list_parameters = { - "hook_name": "terraform", - "function_identifier": function_identifier, - } - if self.build_in_container: - command_list_parameters["use_container"] = True - command_list_parameters["build_image"] = self.docker_tag - if should_override_code: - command_list_parameters[ - "container_env_var" - ] = "TF_VAR_HELLO_FUNCTION_SRC_CODE=./artifacts/HelloWorldFunction2" - build_cmd_list = self.get_command_list(**command_list_parameters) - LOG.info("command list: %s", build_cmd_list) - environment_variables = os.environ.copy() - if should_override_code: - environment_variables["TF_VAR_HELLO_FUNCTION_SRC_CODE"] = "./artifacts/HelloWorldFunction2" - _, stderr, return_code = self.run_command(build_cmd_list, env=environment_variables) - LOG.info(stderr) - self.assertEqual(return_code, 0) + def test_build_and_invoke_lambda_functions(self): + self.validate_metadata_file() + self._verify_invoke_built_function( + function_logical_id=self.function_identifier, + overrides=None, + expected_result={"statusCode": 200, "body": "hello world 9"}, + ) + +@skipIf( + (not RUN_BY_CANARY and not CI_OVERRIDE), + "Skip Terraform test cases unless running in CI", +) +class TestBuildTerraformApplicationsWithImageBasedLambdaFunctionAndLocalBackend(BuildTerraformApplicationIntegBase): + function_identifier = "aws_lambda_function.function_with_non_image_uri" + terraform_application = Path("terraform/image_based_lambda_functions_local_backend") + + def test_build_and_invoke_lambda_functions(self): + self.validate_metadata_file() + self._verify_invoke_built_function( + function_logical_id=self.function_identifier, + overrides=None, + expected_result={ + "statusCode": 200, + "body": "Hello, My friend!", + "headers": None, + "multiValueHeaders": None, + }, + ) + + +@skipIf( + (not RUN_BY_CANARY and not CI_OVERRIDE), + "Skip Terraform test cases unless running in CI", +) +class TestBuildTerraformApplicationsWithImageBasedLambdaFunctionAndS3Backend( + BuildTerraformApplicationS3BackendIntegBase +): + function_identifier = "aws_lambda_function.function_with_non_image_uri" + s3_backend = True + terraform_application = Path("terraform/image_based_lambda_functions_s3_backend") + + def test_build_and_invoke_lambda_functions(self): + self.validate_metadata_file() self._verify_invoke_built_function( - function_logical_id=function_identifier, + function_logical_id=self.function_identifier, overrides=None, - expected_result={"statusCode": 200, "body": expected_output}, + expected_result={ + "statusCode": 200, + "body": "Hello, My friend!", + "headers": None, + "multiValueHeaders": None, + }, ) diff --git a/tests/integration/buildcmd/test_build_terraform_applications_other_cases.py b/tests/integration/buildcmd/test_build_terraform_applications_other_cases.py index cc6ca5b9fe..7bd5675c0a 100644 --- a/tests/integration/buildcmd/test_build_terraform_applications_other_cases.py +++ b/tests/integration/buildcmd/test_build_terraform_applications_other_cases.py @@ -8,7 +8,6 @@ from tests.integration.buildcmd.test_build_terraform_applications import ( BuildTerraformApplicationIntegBase, - BuildTerraformApplicationS3BackendIntegBase, ) from tests.testing_utils import CI_OVERRIDE, IS_WINDOWS, RUN_BY_CANARY @@ -135,84 +134,6 @@ def test_build_no_s3_config(self): self.assertNotEqual(return_code, 0) -@skipIf( - (not RUN_BY_CANARY and not CI_OVERRIDE), - "Skip Terraform test cases unless running in CI", -) -class TestBuildTerraformApplicationsWithImageBasedLambdaFunctionAndLocalBackend(BuildTerraformApplicationIntegBase): - terraform_application = Path("terraform/image_based_lambda_functions_local_backend") - functions = [ - "aws_lambda_function.function_with_non_image_uri", - "aws_lambda_function.my_image_function", - "module.l1_lambda.aws_lambda_function.this", - "module.l1_lambda.module.l2_lambda.aws_lambda_function.this", - "my_image_function", - "my_l1_lambda", - "my_l2_lambda", - "module.serverless_tf_image_function.aws_lambda_function.this[0]", - "serverless_tf_image_function", - ] - - @parameterized.expand(functions) - def test_build_and_invoke_lambda_functions(self, function_identifier): - build_cmd_list = self.get_command_list(hook_name="terraform", function_identifier=function_identifier) - LOG.info("command list: %s", build_cmd_list) - _, stderr, return_code = self.run_command(build_cmd_list) - LOG.info(stderr) - self.assertEqual(return_code, 0) - - self._verify_invoke_built_function( - function_logical_id=function_identifier, - overrides=None, - expected_result={ - "statusCode": 200, - "body": "Hello, My friend!", - "headers": None, - "multiValueHeaders": None, - }, - ) - - -@skipIf( - (not RUN_BY_CANARY and not CI_OVERRIDE), - "Skip Terraform test cases unless running in CI", -) -class TestBuildTerraformApplicationsWithImageBasedLambdaFunctionAndS3Backend( - BuildTerraformApplicationS3BackendIntegBase -): - terraform_application = Path("terraform/image_based_lambda_functions_s3_backend") - functions = [ - "aws_lambda_function.function_with_non_image_uri", - "aws_lambda_function.my_image_function", - "module.l1_lambda.aws_lambda_function.this", - "module.l1_lambda.module.l2_lambda.aws_lambda_function.this", - "my_image_function", - "my_l1_lambda", - "my_l2_lambda", - "module.serverless_tf_image_function.aws_lambda_function.this[0]", - "serverless_tf_image_function", - ] - - @parameterized.expand(functions) - def test_build_and_invoke_lambda_functions(self, function_identifier): - build_cmd_list = self.get_command_list(hook_name="terraform", function_identifier=function_identifier) - LOG.info("command list: %s", build_cmd_list) - _, stderr, return_code = self.run_command(build_cmd_list) - LOG.info(stderr) - self.assertEqual(return_code, 0) - - self._verify_invoke_built_function( - function_logical_id=function_identifier, - overrides=None, - expected_result={ - "statusCode": 200, - "body": "Hello, My friend!", - "headers": None, - "multiValueHeaders": None, - }, - ) - - @skipIf( (not RUN_BY_CANARY and not CI_OVERRIDE), "Skip Terraform test cases unless running in CI", diff --git a/tests/integration/testdata/buildcmd/terraform/image_based_lambda_functions_local_backend/expected.template.yaml b/tests/integration/testdata/buildcmd/terraform/image_based_lambda_functions_local_backend/expected.template.yaml new file mode 100644 index 0000000000..134d937000 --- /dev/null +++ b/tests/integration/testdata/buildcmd/terraform/image_based_lambda_functions_local_backend/expected.template.yaml @@ -0,0 +1,72 @@ +AWSTemplateFormatVersion: '2010-09-09' +Resources: + AwsLambdaFunctionFunctionWithNonImageUri52090958: + Type: AWS::Lambda::Function + Properties: + FunctionName: function_with_non_image_uri + PackageType: Image + Timeout: 300 + MemorySize: 128 + Code: + ImageUri: awslambdafunctionfunctionwithnonimageuri52090958:latest + Metadata: + DockerContext: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/image_based_lambda_functions_local_backend/hello_world + DockerTag: latest + Dockerfile: Dockerfile + SamResourceId: aws_lambda_function.function_with_non_image_uri + SkipBuild: false + AwsLambdaFunctionMyImageFunctionC5BA0B8A: + Type: AWS::Lambda::Function + Properties: + FunctionName: my_image_function + PackageType: Image + Timeout: 300 + MemorySize: 128 + Metadata: + SamResourceId: aws_lambda_function.my_image_function + SkipBuild: false + DockerContext: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/image_based_lambda_functions_local_backend/hello_world + Dockerfile: Dockerfile + DockerTag: latest + ModuleL1LambdaAwsLambdaFunctionThis2858F066: + Type: AWS::Lambda::Function + Properties: + FunctionName: my_l1_lambda + PackageType: Image + Timeout: 300 + MemorySize: 128 + Metadata: + SamResourceId: module.l1_lambda.aws_lambda_function.this + SkipBuild: false + DockerContext: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/image_based_lambda_functions_local_backend/hello_world + Dockerfile: Dockerfile + DockerTag: latest + ModuleServerlessTfImageFunctionAwsLambdaFunctionThis0273ECBC9: + Type: AWS::Lambda::Function + Properties: + FunctionName: serverless_tf_image_function + PackageType: Image + Timeout: 300 + MemorySize: 128 + Metadata: + SamResourceId: module.serverless_tf_image_function.aws_lambda_function.this[0] + SkipBuild: false + DockerContext: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/image_based_lambda_functions_local_backend/hello_world + Dockerfile: Dockerfile + DockerTag: latest + ModuleL1LambdaModuleL2LambdaAwsLambdaFunctionThisB0CE1210: + Type: AWS::Lambda::Function + Properties: + FunctionName: my_l2_lambda + PackageType: Image + Timeout: 300 + MemorySize: 128 + Metadata: + SamResourceId: module.l1_lambda.module.l2_lambda.aws_lambda_function.this + SkipBuild: false + DockerContext: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/image_based_lambda_functions_local_backend/hello_world + Dockerfile: Dockerfile + DockerTag: latest +Metadata: + AWS::SAM::Hook: + HookName: terraform diff --git a/tests/integration/testdata/buildcmd/terraform/image_based_lambda_functions_s3_backend/expected.template.yaml b/tests/integration/testdata/buildcmd/terraform/image_based_lambda_functions_s3_backend/expected.template.yaml new file mode 100644 index 0000000000..134d937000 --- /dev/null +++ b/tests/integration/testdata/buildcmd/terraform/image_based_lambda_functions_s3_backend/expected.template.yaml @@ -0,0 +1,72 @@ +AWSTemplateFormatVersion: '2010-09-09' +Resources: + AwsLambdaFunctionFunctionWithNonImageUri52090958: + Type: AWS::Lambda::Function + Properties: + FunctionName: function_with_non_image_uri + PackageType: Image + Timeout: 300 + MemorySize: 128 + Code: + ImageUri: awslambdafunctionfunctionwithnonimageuri52090958:latest + Metadata: + DockerContext: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/image_based_lambda_functions_local_backend/hello_world + DockerTag: latest + Dockerfile: Dockerfile + SamResourceId: aws_lambda_function.function_with_non_image_uri + SkipBuild: false + AwsLambdaFunctionMyImageFunctionC5BA0B8A: + Type: AWS::Lambda::Function + Properties: + FunctionName: my_image_function + PackageType: Image + Timeout: 300 + MemorySize: 128 + Metadata: + SamResourceId: aws_lambda_function.my_image_function + SkipBuild: false + DockerContext: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/image_based_lambda_functions_local_backend/hello_world + Dockerfile: Dockerfile + DockerTag: latest + ModuleL1LambdaAwsLambdaFunctionThis2858F066: + Type: AWS::Lambda::Function + Properties: + FunctionName: my_l1_lambda + PackageType: Image + Timeout: 300 + MemorySize: 128 + Metadata: + SamResourceId: module.l1_lambda.aws_lambda_function.this + SkipBuild: false + DockerContext: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/image_based_lambda_functions_local_backend/hello_world + Dockerfile: Dockerfile + DockerTag: latest + ModuleServerlessTfImageFunctionAwsLambdaFunctionThis0273ECBC9: + Type: AWS::Lambda::Function + Properties: + FunctionName: serverless_tf_image_function + PackageType: Image + Timeout: 300 + MemorySize: 128 + Metadata: + SamResourceId: module.serverless_tf_image_function.aws_lambda_function.this[0] + SkipBuild: false + DockerContext: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/image_based_lambda_functions_local_backend/hello_world + Dockerfile: Dockerfile + DockerTag: latest + ModuleL1LambdaModuleL2LambdaAwsLambdaFunctionThisB0CE1210: + Type: AWS::Lambda::Function + Properties: + FunctionName: my_l2_lambda + PackageType: Image + Timeout: 300 + MemorySize: 128 + Metadata: + SamResourceId: module.l1_lambda.module.l2_lambda.aws_lambda_function.this + SkipBuild: false + DockerContext: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/image_based_lambda_functions_local_backend/hello_world + Dockerfile: Dockerfile + DockerTag: latest +Metadata: + AWS::SAM::Hook: + HookName: terraform diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/expected.template.yaml b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/expected.template.yaml new file mode 100644 index 0000000000..47e7837224 --- /dev/null +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/expected.template.yaml @@ -0,0 +1,451 @@ +AWSTemplateFormatVersion: '2010-09-09' +Resources: + AwsLambdaFunctionFromLocalfileAB7B07CA: + Type: AWS::Lambda::Function + Properties: + FunctionName: my_function_from_localfile + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/src/list_books + Handler: index.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Metadata: + SamResourceId: aws_lambda_function.from_localfile + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + AwsLambdaFunctionFromS3FA64A4BC: + Type: AWS::Lambda::Function + Properties: + FunctionName: my_function_from_s3 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/src/list_books + Handler: index.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Metadata: + SamResourceId: aws_lambda_function.from_s3 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + AwsLambdaFunctionFunction1E896AC29: + Type: AWS::Lambda::Function + Properties: + FunctionName: function1 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: AwsLambdaLayerVersionLayer1059BA9722 + Metadata: + SamResourceId: aws_lambda_function.function1 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + AwsLambdaFunctionFunction30A54C7A0: + Type: AWS::Lambda::Function + Properties: + FunctionName: function3 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: AwsLambdaLayerVersionLayer3MyIdxA86F0303 + Metadata: + SamResourceId: aws_lambda_function.function3 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + AwsLambdaFunctionFunction4B3EC35D5: + Type: AWS::Lambda::Function + Properties: + FunctionName: function4 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: AwsLambdaLayerVersionLayer4F50CB057 + Metadata: + SamResourceId: aws_lambda_function.function4 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + AwsLambdaFunctionFunction567B02721: + Type: AWS::Lambda::Function + Properties: + FunctionName: function5 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: AwsLambdaLayerVersionLayer5FEFAD499 + Metadata: + SamResourceId: aws_lambda_function.function5 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + AwsLambdaFunctionFunction6D58009F0: + Type: AWS::Lambda::Function + Properties: + FunctionName: function6 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: AwsLambdaLayerVersionLayer61D0C6707 + Metadata: + SamResourceId: aws_lambda_function.function6 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + AwsLambdaLayerVersionFromLocal1020C27A: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: my_layer + CompatibleRuntimes: + - python3.8 + - python3.9 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/my_layer_code + Metadata: + SamResourceId: aws_lambda_layer_version.from_local + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + AwsLambdaLayerVersionLayer1059BA9722: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer1 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer1 + Metadata: + SamResourceId: aws_lambda_layer_version.layer1[0] + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + AwsLambdaLayerVersionLayer3MyIdxA86F0303: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer3 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer3 + Metadata: + SamResourceId: aws_lambda_layer_version.layer3["my_idx"] + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + AwsLambdaLayerVersionLayer4F50CB057: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer4 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer4 + Metadata: + SamResourceId: aws_lambda_layer_version.layer4 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + AwsLambdaLayerVersionLayer5FEFAD499: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer5 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer5 + Metadata: + SamResourceId: aws_lambda_layer_version.layer5 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + AwsLambdaLayerVersionLayer61D0C6707: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer6 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer6 + Metadata: + SamResourceId: aws_lambda_layer_version.layer6 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ModuleFunction10AwsLambdaFunctionThis06884738A: + Type: AWS::Lambda::Function + Properties: + FunctionName: function10 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: ModuleLayer10AwsLambdaLayerVersionThis05706CB7A + Metadata: + SamResourceId: module.function10.aws_lambda_function.this[0] + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ModuleFunction11AwsLambdaFunctionThis0A95A49E7: + Type: AWS::Lambda::Function + Properties: + FunctionName: function11 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: ModuleLayer11AwsLambdaLayerVersionThis093CB6A9C + Metadata: + SamResourceId: module.function11.aws_lambda_function.this[0] + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ModuleFunction2AwsLambdaFunctionThis6697C0C3: + Type: AWS::Lambda::Function + Properties: + FunctionName: function2 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: ModuleLayer2AwsLambdaLayerVersionLayer60C80792 + Metadata: + SamResourceId: module.function2.aws_lambda_function.this + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ModuleFunction7AwsLambdaFunctionThis06A5615D6: + Type: AWS::Lambda::Function + Properties: + FunctionName: function7 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: ModuleLayer7AwsLambdaLayerVersionThis03FB7F0FF + Metadata: + SamResourceId: module.function7.aws_lambda_function.this[0] + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ModuleFunction8AwsLambdaFunctionThis0980E1967: + Type: AWS::Lambda::Function + Properties: + FunctionName: function8 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: ModuleLayer8AwsLambdaLayerVersionThis0ECD759B5 + Metadata: + SamResourceId: module.function8.aws_lambda_function.this[0] + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ModuleFunction9AwsLambdaFunctionThis0B50511AC: + Type: AWS::Lambda::Function + Properties: + FunctionName: function9 + Code: ModuleFunction9AwsLambdaFunctionThis0B50511AC + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: ModuleLayer9AwsLambdaLayerVersionThis0DC055E13 + Metadata: + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + SamResourceId: module.function9.aws_lambda_function.this[0] + SkipBuild: false + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ModuleLayer10AwsLambdaLayerVersionThis05706CB7A: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer10 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer10 + Metadata: + SamResourceId: module.layer10.aws_lambda_layer_version.this[0] + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ModuleLayer11AwsLambdaLayerVersionThis093CB6A9C: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer11 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer11 + Metadata: + SamResourceId: module.layer11.aws_lambda_layer_version.this[0] + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ModuleLayer2AwsLambdaLayerVersionLayer60C80792: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer2 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer2 + Metadata: + SamResourceId: module.layer2.aws_lambda_layer_version.layer + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ModuleLayer7AwsLambdaLayerVersionThis03FB7F0FF: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer7 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer7 + Metadata: + SamResourceId: module.layer7.aws_lambda_layer_version.this[0] + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ModuleLayer8AwsLambdaLayerVersionThis0ECD759B5: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer8 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer8 + Metadata: + SamResourceId: module.layer8.aws_lambda_layer_version.this[0] + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ModuleLayer9AwsLambdaLayerVersionThis0DC055E13: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer9 + CompatibleRuntimes: + - python3.8 + Content: ModuleLayer9AwsLambdaLayerVersionThis0DC055E13 + Metadata: + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + SamResourceId: module.layer9.aws_lambda_layer_version.this[0] + SkipBuild: false + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ModuleLevel1LambdaAwsLambdaFunctionThis3C50012D: + Type: AWS::Lambda::Function + Properties: + FunctionName: my_level1_lambda + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/src/list_books + Handler: index.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Metadata: + SamResourceId: module.level1_lambda.aws_lambda_function.this + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ModuleLevel1LambdaModuleLevel2LambdaAwsLambdaFunctionThisE3D4D0C8: + Type: AWS::Lambda::Function + Properties: + FunctionName: my_level2_lambda + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/src/list_books + Handler: index.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Metadata: + SamResourceId: module.level1_lambda.module.level2_lambda.aws_lambda_function.this + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend +Metadata: + AWS::SAM::Hook: + HookName: terraform diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/expected.template.yaml b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/expected.template.yaml new file mode 100644 index 0000000000..74aeb28fb1 --- /dev/null +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/expected.template.yaml @@ -0,0 +1,319 @@ +AWSTemplateFormatVersion: '2010-09-09' +Resources: + AwsLambdaFunctionFromLocalfileAB7B07CA: + Type: AWS::Lambda::Function + Properties: + FunctionName: my_function_from_localfile + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/src/list_books + Handler: index.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Metadata: + SamResourceId: aws_lambda_function.from_localfile + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaFunctionFromS3FA64A4BC: + Type: AWS::Lambda::Function + Properties: + FunctionName: my_function_from_s3 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/src/list_books + Handler: index.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Metadata: + SamResourceId: aws_lambda_function.from_s3 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaFunctionFunction1E896AC29: + Type: AWS::Lambda::Function + Properties: + FunctionName: function1 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: AwsLambdaLayerVersionLayer1059BA9722 + Metadata: + SamResourceId: aws_lambda_function.function1 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaFunctionFunction30A54C7A0: + Type: AWS::Lambda::Function + Properties: + FunctionName: function3 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: AwsLambdaLayerVersionLayer3MyIdxA86F0303 + Metadata: + SamResourceId: aws_lambda_function.function3 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaFunctionFunction4B3EC35D5: + Type: AWS::Lambda::Function + Properties: + FunctionName: function4 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: AwsLambdaLayerVersionLayer4F50CB057 + Metadata: + SamResourceId: aws_lambda_function.function4 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaFunctionFunction567B02721: + Type: AWS::Lambda::Function + Properties: + FunctionName: function5 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: AwsLambdaLayerVersionLayer5FEFAD499 + Metadata: + SamResourceId: aws_lambda_function.function5 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaFunctionFunction6D58009F0: + Type: AWS::Lambda::Function + Properties: + FunctionName: function6 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: AwsLambdaLayerVersionLayer61D0C6707 + Metadata: + SamResourceId: aws_lambda_function.function6 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaLayerVersionFromLocal1020C27A: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: my_layer + CompatibleRuntimes: + - python3.8 + - python3.9 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/my_layer_code + Metadata: + SamResourceId: aws_lambda_layer_version.from_local + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaLayerVersionLayer1059BA9722: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer1 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer1 + Metadata: + SamResourceId: aws_lambda_layer_version.layer1[0] + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaLayerVersionLayer3MyIdxA86F0303: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer3 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer3 + Metadata: + SamResourceId: aws_lambda_layer_version.layer3["my_idx"] + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaLayerVersionLayer4F50CB057: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer4 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer4 + Metadata: + SamResourceId: aws_lambda_layer_version.layer4 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaLayerVersionLayer5FEFAD499: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer5 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer5 + Metadata: + SamResourceId: aws_lambda_layer_version.layer5 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaLayerVersionLayer61D0C6707: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer6 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer6 + Metadata: + SamResourceId: aws_lambda_layer_version.layer6 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ModuleFunction2AwsLambdaFunctionThis6697C0C3: + Type: AWS::Lambda::Function + Properties: + FunctionName: function2 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: ModuleLayer2AwsLambdaLayerVersionLayer60C80792 + Metadata: + SamResourceId: module.function2.aws_lambda_function.this + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ModuleFunction9AwsLambdaFunctionThis0B50511AC: + Type: AWS::Lambda::Function + Properties: + FunctionName: function9 + Code: ModuleFunction9AwsLambdaFunctionThis0B50511AC + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: ModuleLayer9AwsLambdaLayerVersionThis0DC055E13 + Metadata: + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + SamResourceId: module.function9.aws_lambda_function.this[0] + SkipBuild: false + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ModuleLayer2AwsLambdaLayerVersionLayer60C80792: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer2 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer2 + Metadata: + SamResourceId: module.layer2.aws_lambda_layer_version.layer + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ModuleLayer9AwsLambdaLayerVersionThis0DC055E13: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer9 + CompatibleRuntimes: + - python3.8 + Content: ModuleLayer9AwsLambdaLayerVersionThis0DC055E13 + Metadata: + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + SamResourceId: module.layer9.aws_lambda_layer_version.this[0] + SkipBuild: false + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ModuleLevel1LambdaAwsLambdaFunctionThis3C50012D: + Type: AWS::Lambda::Function + Properties: + FunctionName: my_level1_lambda + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/src/list_books + Handler: index.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Metadata: + SamResourceId: module.level1_lambda.aws_lambda_function.this + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ModuleLevel1LambdaModuleLevel2LambdaAwsLambdaFunctionThisE3D4D0C8: + Type: AWS::Lambda::Function + Properties: + FunctionName: my_level2_lambda + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/src/list_books + Handler: index.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Metadata: + SamResourceId: module.level1_lambda.module.level2_lambda.aws_lambda_function.this + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows +Metadata: + AWS::SAM::Hook: + HookName: terraform diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_windows/expected.template.yaml b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_windows/expected.template.yaml new file mode 100644 index 0000000000..74aeb28fb1 --- /dev/null +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_windows/expected.template.yaml @@ -0,0 +1,319 @@ +AWSTemplateFormatVersion: '2010-09-09' +Resources: + AwsLambdaFunctionFromLocalfileAB7B07CA: + Type: AWS::Lambda::Function + Properties: + FunctionName: my_function_from_localfile + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/src/list_books + Handler: index.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Metadata: + SamResourceId: aws_lambda_function.from_localfile + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaFunctionFromS3FA64A4BC: + Type: AWS::Lambda::Function + Properties: + FunctionName: my_function_from_s3 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/src/list_books + Handler: index.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Metadata: + SamResourceId: aws_lambda_function.from_s3 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaFunctionFunction1E896AC29: + Type: AWS::Lambda::Function + Properties: + FunctionName: function1 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: AwsLambdaLayerVersionLayer1059BA9722 + Metadata: + SamResourceId: aws_lambda_function.function1 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaFunctionFunction30A54C7A0: + Type: AWS::Lambda::Function + Properties: + FunctionName: function3 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: AwsLambdaLayerVersionLayer3MyIdxA86F0303 + Metadata: + SamResourceId: aws_lambda_function.function3 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaFunctionFunction4B3EC35D5: + Type: AWS::Lambda::Function + Properties: + FunctionName: function4 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: AwsLambdaLayerVersionLayer4F50CB057 + Metadata: + SamResourceId: aws_lambda_function.function4 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaFunctionFunction567B02721: + Type: AWS::Lambda::Function + Properties: + FunctionName: function5 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: AwsLambdaLayerVersionLayer5FEFAD499 + Metadata: + SamResourceId: aws_lambda_function.function5 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaFunctionFunction6D58009F0: + Type: AWS::Lambda::Function + Properties: + FunctionName: function6 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: AwsLambdaLayerVersionLayer61D0C6707 + Metadata: + SamResourceId: aws_lambda_function.function6 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaLayerVersionFromLocal1020C27A: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: my_layer + CompatibleRuntimes: + - python3.8 + - python3.9 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/my_layer_code + Metadata: + SamResourceId: aws_lambda_layer_version.from_local + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaLayerVersionLayer1059BA9722: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer1 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer1 + Metadata: + SamResourceId: aws_lambda_layer_version.layer1[0] + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaLayerVersionLayer3MyIdxA86F0303: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer3 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer3 + Metadata: + SamResourceId: aws_lambda_layer_version.layer3["my_idx"] + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaLayerVersionLayer4F50CB057: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer4 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer4 + Metadata: + SamResourceId: aws_lambda_layer_version.layer4 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaLayerVersionLayer5FEFAD499: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer5 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer5 + Metadata: + SamResourceId: aws_lambda_layer_version.layer5 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaLayerVersionLayer61D0C6707: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer6 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer6 + Metadata: + SamResourceId: aws_lambda_layer_version.layer6 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ModuleFunction2AwsLambdaFunctionThis6697C0C3: + Type: AWS::Lambda::Function + Properties: + FunctionName: function2 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: ModuleLayer2AwsLambdaLayerVersionLayer60C80792 + Metadata: + SamResourceId: module.function2.aws_lambda_function.this + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ModuleFunction9AwsLambdaFunctionThis0B50511AC: + Type: AWS::Lambda::Function + Properties: + FunctionName: function9 + Code: ModuleFunction9AwsLambdaFunctionThis0B50511AC + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: ModuleLayer9AwsLambdaLayerVersionThis0DC055E13 + Metadata: + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + SamResourceId: module.function9.aws_lambda_function.this[0] + SkipBuild: false + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ModuleLayer2AwsLambdaLayerVersionLayer60C80792: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer2 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer2 + Metadata: + SamResourceId: module.layer2.aws_lambda_layer_version.layer + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ModuleLayer9AwsLambdaLayerVersionThis0DC055E13: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer9 + CompatibleRuntimes: + - python3.8 + Content: ModuleLayer9AwsLambdaLayerVersionThis0DC055E13 + Metadata: + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + SamResourceId: module.layer9.aws_lambda_layer_version.this[0] + SkipBuild: false + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ModuleLevel1LambdaAwsLambdaFunctionThis3C50012D: + Type: AWS::Lambda::Function + Properties: + FunctionName: my_level1_lambda + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/src/list_books + Handler: index.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Metadata: + SamResourceId: module.level1_lambda.aws_lambda_function.this + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ModuleLevel1LambdaModuleLevel2LambdaAwsLambdaFunctionThisE3D4D0C8: + Type: AWS::Lambda::Function + Properties: + FunctionName: my_level2_lambda + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/src/list_books + Handler: index.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Metadata: + SamResourceId: module.level1_lambda.module.level2_lambda.aws_lambda_function.this + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows +Metadata: + AWS::SAM::Hook: + HookName: terraform diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend/expected.template.yaml b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend/expected.template.yaml new file mode 100644 index 0000000000..47e7837224 --- /dev/null +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend/expected.template.yaml @@ -0,0 +1,451 @@ +AWSTemplateFormatVersion: '2010-09-09' +Resources: + AwsLambdaFunctionFromLocalfileAB7B07CA: + Type: AWS::Lambda::Function + Properties: + FunctionName: my_function_from_localfile + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/src/list_books + Handler: index.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Metadata: + SamResourceId: aws_lambda_function.from_localfile + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + AwsLambdaFunctionFromS3FA64A4BC: + Type: AWS::Lambda::Function + Properties: + FunctionName: my_function_from_s3 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/src/list_books + Handler: index.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Metadata: + SamResourceId: aws_lambda_function.from_s3 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + AwsLambdaFunctionFunction1E896AC29: + Type: AWS::Lambda::Function + Properties: + FunctionName: function1 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: AwsLambdaLayerVersionLayer1059BA9722 + Metadata: + SamResourceId: aws_lambda_function.function1 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + AwsLambdaFunctionFunction30A54C7A0: + Type: AWS::Lambda::Function + Properties: + FunctionName: function3 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: AwsLambdaLayerVersionLayer3MyIdxA86F0303 + Metadata: + SamResourceId: aws_lambda_function.function3 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + AwsLambdaFunctionFunction4B3EC35D5: + Type: AWS::Lambda::Function + Properties: + FunctionName: function4 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: AwsLambdaLayerVersionLayer4F50CB057 + Metadata: + SamResourceId: aws_lambda_function.function4 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + AwsLambdaFunctionFunction567B02721: + Type: AWS::Lambda::Function + Properties: + FunctionName: function5 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: AwsLambdaLayerVersionLayer5FEFAD499 + Metadata: + SamResourceId: aws_lambda_function.function5 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + AwsLambdaFunctionFunction6D58009F0: + Type: AWS::Lambda::Function + Properties: + FunctionName: function6 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: AwsLambdaLayerVersionLayer61D0C6707 + Metadata: + SamResourceId: aws_lambda_function.function6 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + AwsLambdaLayerVersionFromLocal1020C27A: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: my_layer + CompatibleRuntimes: + - python3.8 + - python3.9 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/my_layer_code + Metadata: + SamResourceId: aws_lambda_layer_version.from_local + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + AwsLambdaLayerVersionLayer1059BA9722: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer1 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer1 + Metadata: + SamResourceId: aws_lambda_layer_version.layer1[0] + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + AwsLambdaLayerVersionLayer3MyIdxA86F0303: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer3 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer3 + Metadata: + SamResourceId: aws_lambda_layer_version.layer3["my_idx"] + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + AwsLambdaLayerVersionLayer4F50CB057: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer4 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer4 + Metadata: + SamResourceId: aws_lambda_layer_version.layer4 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + AwsLambdaLayerVersionLayer5FEFAD499: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer5 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer5 + Metadata: + SamResourceId: aws_lambda_layer_version.layer5 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + AwsLambdaLayerVersionLayer61D0C6707: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer6 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer6 + Metadata: + SamResourceId: aws_lambda_layer_version.layer6 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ModuleFunction10AwsLambdaFunctionThis06884738A: + Type: AWS::Lambda::Function + Properties: + FunctionName: function10 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: ModuleLayer10AwsLambdaLayerVersionThis05706CB7A + Metadata: + SamResourceId: module.function10.aws_lambda_function.this[0] + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ModuleFunction11AwsLambdaFunctionThis0A95A49E7: + Type: AWS::Lambda::Function + Properties: + FunctionName: function11 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: ModuleLayer11AwsLambdaLayerVersionThis093CB6A9C + Metadata: + SamResourceId: module.function11.aws_lambda_function.this[0] + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ModuleFunction2AwsLambdaFunctionThis6697C0C3: + Type: AWS::Lambda::Function + Properties: + FunctionName: function2 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: ModuleLayer2AwsLambdaLayerVersionLayer60C80792 + Metadata: + SamResourceId: module.function2.aws_lambda_function.this + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ModuleFunction7AwsLambdaFunctionThis06A5615D6: + Type: AWS::Lambda::Function + Properties: + FunctionName: function7 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: ModuleLayer7AwsLambdaLayerVersionThis03FB7F0FF + Metadata: + SamResourceId: module.function7.aws_lambda_function.this[0] + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ModuleFunction8AwsLambdaFunctionThis0980E1967: + Type: AWS::Lambda::Function + Properties: + FunctionName: function8 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: ModuleLayer8AwsLambdaLayerVersionThis0ECD759B5 + Metadata: + SamResourceId: module.function8.aws_lambda_function.this[0] + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ModuleFunction9AwsLambdaFunctionThis0B50511AC: + Type: AWS::Lambda::Function + Properties: + FunctionName: function9 + Code: ModuleFunction9AwsLambdaFunctionThis0B50511AC + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: ModuleLayer9AwsLambdaLayerVersionThis0DC055E13 + Metadata: + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + SamResourceId: module.function9.aws_lambda_function.this[0] + SkipBuild: false + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ModuleLayer10AwsLambdaLayerVersionThis05706CB7A: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer10 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer10 + Metadata: + SamResourceId: module.layer10.aws_lambda_layer_version.this[0] + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ModuleLayer11AwsLambdaLayerVersionThis093CB6A9C: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer11 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer11 + Metadata: + SamResourceId: module.layer11.aws_lambda_layer_version.this[0] + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ModuleLayer2AwsLambdaLayerVersionLayer60C80792: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer2 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer2 + Metadata: + SamResourceId: module.layer2.aws_lambda_layer_version.layer + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ModuleLayer7AwsLambdaLayerVersionThis03FB7F0FF: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer7 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer7 + Metadata: + SamResourceId: module.layer7.aws_lambda_layer_version.this[0] + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ModuleLayer8AwsLambdaLayerVersionThis0ECD759B5: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer8 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/artifacts/layer8 + Metadata: + SamResourceId: module.layer8.aws_lambda_layer_version.this[0] + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ModuleLayer9AwsLambdaLayerVersionThis0DC055E13: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer9 + CompatibleRuntimes: + - python3.8 + Content: ModuleLayer9AwsLambdaLayerVersionThis0DC055E13 + Metadata: + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + SamResourceId: module.layer9.aws_lambda_layer_version.this[0] + SkipBuild: false + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ModuleLevel1LambdaAwsLambdaFunctionThis3C50012D: + Type: AWS::Lambda::Function + Properties: + FunctionName: my_level1_lambda + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/src/list_books + Handler: index.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Metadata: + SamResourceId: module.level1_lambda.aws_lambda_function.this + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ModuleLevel1LambdaModuleLevel2LambdaAwsLambdaFunctionThisE3D4D0C8: + Type: AWS::Lambda::Function + Properties: + FunctionName: my_level2_lambda + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/src/list_books + Handler: index.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Metadata: + SamResourceId: module.level1_lambda.module.level2_lambda.aws_lambda_function.this + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend +Metadata: + AWS::SAM::Hook: + HookName: terraform diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_container_windows/expected.template.yaml b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_container_windows/expected.template.yaml new file mode 100644 index 0000000000..74aeb28fb1 --- /dev/null +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_container_windows/expected.template.yaml @@ -0,0 +1,319 @@ +AWSTemplateFormatVersion: '2010-09-09' +Resources: + AwsLambdaFunctionFromLocalfileAB7B07CA: + Type: AWS::Lambda::Function + Properties: + FunctionName: my_function_from_localfile + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/src/list_books + Handler: index.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Metadata: + SamResourceId: aws_lambda_function.from_localfile + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaFunctionFromS3FA64A4BC: + Type: AWS::Lambda::Function + Properties: + FunctionName: my_function_from_s3 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/src/list_books + Handler: index.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Metadata: + SamResourceId: aws_lambda_function.from_s3 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaFunctionFunction1E896AC29: + Type: AWS::Lambda::Function + Properties: + FunctionName: function1 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: AwsLambdaLayerVersionLayer1059BA9722 + Metadata: + SamResourceId: aws_lambda_function.function1 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaFunctionFunction30A54C7A0: + Type: AWS::Lambda::Function + Properties: + FunctionName: function3 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: AwsLambdaLayerVersionLayer3MyIdxA86F0303 + Metadata: + SamResourceId: aws_lambda_function.function3 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaFunctionFunction4B3EC35D5: + Type: AWS::Lambda::Function + Properties: + FunctionName: function4 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: AwsLambdaLayerVersionLayer4F50CB057 + Metadata: + SamResourceId: aws_lambda_function.function4 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaFunctionFunction567B02721: + Type: AWS::Lambda::Function + Properties: + FunctionName: function5 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: AwsLambdaLayerVersionLayer5FEFAD499 + Metadata: + SamResourceId: aws_lambda_function.function5 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaFunctionFunction6D58009F0: + Type: AWS::Lambda::Function + Properties: + FunctionName: function6 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: AwsLambdaLayerVersionLayer61D0C6707 + Metadata: + SamResourceId: aws_lambda_function.function6 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaLayerVersionFromLocal1020C27A: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: my_layer + CompatibleRuntimes: + - python3.8 + - python3.9 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/my_layer_code + Metadata: + SamResourceId: aws_lambda_layer_version.from_local + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaLayerVersionLayer1059BA9722: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer1 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer1 + Metadata: + SamResourceId: aws_lambda_layer_version.layer1[0] + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaLayerVersionLayer3MyIdxA86F0303: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer3 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer3 + Metadata: + SamResourceId: aws_lambda_layer_version.layer3["my_idx"] + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaLayerVersionLayer4F50CB057: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer4 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer4 + Metadata: + SamResourceId: aws_lambda_layer_version.layer4 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaLayerVersionLayer5FEFAD499: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer5 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer5 + Metadata: + SamResourceId: aws_lambda_layer_version.layer5 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaLayerVersionLayer61D0C6707: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer6 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer6 + Metadata: + SamResourceId: aws_lambda_layer_version.layer6 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ModuleFunction2AwsLambdaFunctionThis6697C0C3: + Type: AWS::Lambda::Function + Properties: + FunctionName: function2 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: ModuleLayer2AwsLambdaLayerVersionLayer60C80792 + Metadata: + SamResourceId: module.function2.aws_lambda_function.this + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ModuleFunction9AwsLambdaFunctionThis0B50511AC: + Type: AWS::Lambda::Function + Properties: + FunctionName: function9 + Code: ModuleFunction9AwsLambdaFunctionThis0B50511AC + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: ModuleLayer9AwsLambdaLayerVersionThis0DC055E13 + Metadata: + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + SamResourceId: module.function9.aws_lambda_function.this[0] + SkipBuild: false + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ModuleLayer2AwsLambdaLayerVersionLayer60C80792: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer2 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer2 + Metadata: + SamResourceId: module.layer2.aws_lambda_layer_version.layer + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ModuleLayer9AwsLambdaLayerVersionThis0DC055E13: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer9 + CompatibleRuntimes: + - python3.8 + Content: ModuleLayer9AwsLambdaLayerVersionThis0DC055E13 + Metadata: + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + SamResourceId: module.layer9.aws_lambda_layer_version.this[0] + SkipBuild: false + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ModuleLevel1LambdaAwsLambdaFunctionThis3C50012D: + Type: AWS::Lambda::Function + Properties: + FunctionName: my_level1_lambda + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/src/list_books + Handler: index.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Metadata: + SamResourceId: module.level1_lambda.aws_lambda_function.this + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ModuleLevel1LambdaModuleLevel2LambdaAwsLambdaFunctionThisE3D4D0C8: + Type: AWS::Lambda::Function + Properties: + FunctionName: my_level2_lambda + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/src/list_books + Handler: index.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Metadata: + SamResourceId: module.level1_lambda.module.level2_lambda.aws_lambda_function.this + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows +Metadata: + AWS::SAM::Hook: + HookName: terraform diff --git a/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_windows/expected.template.yaml b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_windows/expected.template.yaml new file mode 100644 index 0000000000..74aeb28fb1 --- /dev/null +++ b/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_s3_backend_windows/expected.template.yaml @@ -0,0 +1,319 @@ +AWSTemplateFormatVersion: '2010-09-09' +Resources: + AwsLambdaFunctionFromLocalfileAB7B07CA: + Type: AWS::Lambda::Function + Properties: + FunctionName: my_function_from_localfile + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/src/list_books + Handler: index.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Metadata: + SamResourceId: aws_lambda_function.from_localfile + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaFunctionFromS3FA64A4BC: + Type: AWS::Lambda::Function + Properties: + FunctionName: my_function_from_s3 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/src/list_books + Handler: index.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Metadata: + SamResourceId: aws_lambda_function.from_s3 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaFunctionFunction1E896AC29: + Type: AWS::Lambda::Function + Properties: + FunctionName: function1 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: AwsLambdaLayerVersionLayer1059BA9722 + Metadata: + SamResourceId: aws_lambda_function.function1 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaFunctionFunction30A54C7A0: + Type: AWS::Lambda::Function + Properties: + FunctionName: function3 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: AwsLambdaLayerVersionLayer3MyIdxA86F0303 + Metadata: + SamResourceId: aws_lambda_function.function3 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaFunctionFunction4B3EC35D5: + Type: AWS::Lambda::Function + Properties: + FunctionName: function4 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: AwsLambdaLayerVersionLayer4F50CB057 + Metadata: + SamResourceId: aws_lambda_function.function4 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaFunctionFunction567B02721: + Type: AWS::Lambda::Function + Properties: + FunctionName: function5 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: AwsLambdaLayerVersionLayer5FEFAD499 + Metadata: + SamResourceId: aws_lambda_function.function5 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaFunctionFunction6D58009F0: + Type: AWS::Lambda::Function + Properties: + FunctionName: function6 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: AwsLambdaLayerVersionLayer61D0C6707 + Metadata: + SamResourceId: aws_lambda_function.function6 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaLayerVersionFromLocal1020C27A: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: my_layer + CompatibleRuntimes: + - python3.8 + - python3.9 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/my_layer_code + Metadata: + SamResourceId: aws_lambda_layer_version.from_local + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaLayerVersionLayer1059BA9722: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer1 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer1 + Metadata: + SamResourceId: aws_lambda_layer_version.layer1[0] + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaLayerVersionLayer3MyIdxA86F0303: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer3 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer3 + Metadata: + SamResourceId: aws_lambda_layer_version.layer3["my_idx"] + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaLayerVersionLayer4F50CB057: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer4 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer4 + Metadata: + SamResourceId: aws_lambda_layer_version.layer4 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaLayerVersionLayer5FEFAD499: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer5 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer5 + Metadata: + SamResourceId: aws_lambda_layer_version.layer5 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + AwsLambdaLayerVersionLayer61D0C6707: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer6 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer6 + Metadata: + SamResourceId: aws_lambda_layer_version.layer6 + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ModuleFunction2AwsLambdaFunctionThis6697C0C3: + Type: AWS::Lambda::Function + Properties: + FunctionName: function2 + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/HelloWorldFunction + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: ModuleLayer2AwsLambdaLayerVersionLayer60C80792 + Metadata: + SamResourceId: module.function2.aws_lambda_function.this + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ModuleFunction9AwsLambdaFunctionThis0B50511AC: + Type: AWS::Lambda::Function + Properties: + FunctionName: function9 + Code: ModuleFunction9AwsLambdaFunctionThis0B50511AC + Handler: app.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Layers: + - Ref: ModuleLayer9AwsLambdaLayerVersionThis0DC055E13 + Metadata: + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + SamResourceId: module.function9.aws_lambda_function.this[0] + SkipBuild: false + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ModuleLayer2AwsLambdaLayerVersionLayer60C80792: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer2 + CompatibleRuntimes: + - python3.8 + Content: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/artifacts/layer2 + Metadata: + SamResourceId: module.layer2.aws_lambda_layer_version.layer + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ModuleLayer9AwsLambdaLayerVersionThis0DC055E13: + Type: AWS::Lambda::LayerVersion + Properties: + LayerName: lambda_layer9 + CompatibleRuntimes: + - python3.8 + Content: ModuleLayer9AwsLambdaLayerVersionThis0DC055E13 + Metadata: + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + SamResourceId: module.layer9.aws_lambda_layer_version.this[0] + SkipBuild: false + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ModuleLevel1LambdaAwsLambdaFunctionThis3C50012D: + Type: AWS::Lambda::Function + Properties: + FunctionName: my_level1_lambda + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/src/list_books + Handler: index.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Metadata: + SamResourceId: module.level1_lambda.aws_lambda_function.this + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ModuleLevel1LambdaModuleLevel2LambdaAwsLambdaFunctionThisE3D4D0C8: + Type: AWS::Lambda::Function + Properties: + FunctionName: my_level2_lambda + Code: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/src/list_books + Handler: index.lambda_handler + PackageType: Zip + Runtime: python3.8 + Timeout: 300 + MemorySize: 128 + Metadata: + SamResourceId: module.level1_lambda.module.level2_lambda.aws_lambda_function.this + SkipBuild: false + BuildMethod: makefile + ContextPath: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows/.aws-sam-iacs/iacs_metadata + WorkingDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows + ProjectRootDirectory: aws-sam-cli/tests/integration/testdata/buildcmd/terraform/zip_based_lambda_functions_local_backend_container_windows +Metadata: + AWS::SAM::Hook: + HookName: terraform