-
-
Notifications
You must be signed in to change notification settings - Fork 740
Description
Description
Almost every time our lambda module requires a change, Terraform fails with Error: Provider produced inconsistent final plan.
A reapply of the module fails with Error: unable to load "builds/<hash>.zip": open builds/<hash>.zip: no such file or directory
This happens in both our CI environment where we run plan and apply as separate steps, as well as when we run plan and apply locally.
Versions
- Terraform:
terraform -version
Terraform v1.1.4
on darwin_amd64
- Provider(s):
+ provider registry.terraform.io/hashicorp/aws v3.73.0
+ provider registry.terraform.io/hashicorp/external v2.2.0
+ provider registry.terraform.io/hashicorp/local v2.1.0
+ provider registry.terraform.io/hashicorp/null v3.1.0
+ provider registry.terraform.io/hashicorp/random v3.1.0
- Module:
2.32.0
Reproduction
terraform init
terraform plan -out=tfplan
terraform apply tfplanCode Snippet to Reproduce
module "lambda_authorizer" {
source = "terraform-aws-modules/lambda/aws"
version = "2.32.0"
function_name = "${var.name}LambdaAuthorizer"
tags = var.tags
handler = "authorizer.handler"
runtime = "python3.8"
memory_size = 256
timeout = 20
vpc_subnet_ids = var.vpc_subnet_ids
vpc_security_group_ids = var.vpc_security_group_ids
kms_key_arn = var.kms_key_arn
lambda_role = var.lambda_role
create_role = false
cloudwatch_logs_retention_in_days = 14
source_path = [
{
path = "${path.module}/src/authorizer.py"
pip_requirements = "${path.module}/src/requirements.txt"
}
]
recreate_missing_package = true
# random string to make hash unique
hash_extra = "Rivendell"
environment_variables = {
MOCK_AUTHORIZATION = var.mock_authorization
}
}Expected behavior
Terraform plan applies
Actual behavior
Terraform plan fails twice with different errors.
Terminal Output Screenshot(s)
Terraform plan:
Note: Objects have changed outside of Terraform
Terraform detected the following changes made outside of Terraform since the
last "terraform apply":
# module.nsapi.module.lambda_authorizer.module.lambda_authorizer.local_file.archive_plan[0] has been deleted
- resource "local_file" "archive_plan" {
- content = jsonencode(
{
- artifacts_dir = "builds"
- build_plan = [
- [
- "pip",
- "python3.8",
- ".terraform/modules/nsapi.lambda_authorizer/src/requirements.txt",
- null,
- null,
],
- [
- "zip",
- ".terraform/modules/nsapi.lambda_authorizer/src/authorizer.py",
- null,
],
]
- filename = "builds/419fd6312e3c6d73876d36399d2d92a23930db92d0de55997aafc32dcadc16b4.zip"
- runtime = "python3.8"
}
) -> null
- directory_permission = "0755" -> null
- file_permission = "0644" -> null
- filename = "builds/419fd6312e3c6d73876d36399d2d92a23930db92d0de55997aafc32dcadc16b4.plan.json" -> null
- id = "387cef430989abc22432470ea0fc4637aa3d03f4" -> null
}
Unless you have made equivalent changes to your configuration, or ignored the
relevant attributes using ignore_changes, the following plan may include
actions to undo or respond to these changes.
─────────────────────────────────────────────────────────────────────────────
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create
~ update in-place
+/- create replacement and then destroy
Terraform will perform the following actions:
# module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] must be replaced
+/- resource "null_resource" "archive" {
~ id = "8781539734473332190" -> (known after apply)
~ triggers = { # forces replacement
~ "timestamp" = "1643159445355351000" -> "1643159679626854800"
# (1 unchanged element hidden)
}
}
# module.nsapi.module.lambda_authorizer.module.lambda_authorizer.aws_lambda_function.this[0] will be updated in-place
~ resource "aws_lambda_function" "this" {
~ filename = "builds/419fd6312e3c6d73876d36399d2d92a23930db92d0de55997aafc32dcadc16b4.zip" -> "builds/8bfa86eac2edda64741e9d27172b6fd2b2c54eb6dbf27fc5bfc8e000c3c4050c.zip"
id = "C1NetworkLambdaAuthorizer"
~ last_modified = "2022-01-26T01:06:39.000+0000" -> (known after apply)
tags = {}
# (20 unchanged attributes hidden)
# (2 unchanged blocks hidden)
}
# module.nsapi.module.lambda_authorizer.module.lambda_authorizer.local_file.archive_plan[0] will be created
+ resource "local_file" "archive_plan" {
+ content = jsonencode(
{
+ artifacts_dir = "builds"
+ build_plan = [
+ [
+ "zip",
+ ".terraform/modules/nsapi.lambda_authorizer/src/authorizer.py",
+ null,
],
+ [
+ "pip",
+ "python3.8",
+ ".terraform/modules/nsapi.lambda_authorizer/src/requirements.txt",
+ null,
+ null,
],
]
+ filename = "builds/8bfa86eac2edda64741e9d27172b6fd2b2c54eb6dbf27fc5bfc8e000c3c4050c.zip"
+ runtime = "python3.8"
}
)
+ directory_permission = "0755"
+ file_permission = "0644"
+ filename = "builds/8bfa86eac2edda64741e9d27172b6fd2b2c54eb6dbf27fc5bfc8e000c3c4050c.plan.json"
+ id = (known after apply)
}
# module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] must be replaced
+/- resource "null_resource" "archive" {
~ id = "9065890149777409639" -> (known after apply)
~ triggers = { # forces replacement
~ "filename" = "builds/419fd6312e3c6d73876d36399d2d92a23930db92d0de55997aafc32dcadc16b4.zip" -> "builds/8bfa86eac2edda64741e9d27172b6fd2b2c54eb6dbf27fc5bfc8e000c3c4050c.zip"
~ "timestamp" = "1643159445299181000" -> "<WARNING: Missing lambda zip artifacts wouldn't be restored>"
}
}
Plan: 3 to add, 1 to change, 2 to destroy.
─────────────────────────────────────────────────────────────────────────────
Saved the plan to: tfplan
Terraform apply:
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.local_file.archive_plan[0]: Creating...
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0]: Creating...
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.local_file.archive_plan[0]: Creation complete after 0s [id=91742976f17937bc8063b456935af97bd7c3f333]
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0]: Provisioning with 'local-exec'...
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): Executing: ["python3" ".terraform/modules/xdr_authorizer.lambda_xdr_authorizer/package.py" "build" "--timestamp" "1643159679626854800" "builds/5c9a351244db182790cd4bfdc1d80c316600be6ee11c14440c83ab5cca8a46c4.plan.json"]
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0]: Creating...
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0]: Provisioning with 'local-exec'...
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): Executing: ["python3" ".terraform/modules/nsapi.lambda_authorizer.lambda_authorizer/package.py" "build" "--timestamp" "<WARNING: Missing lambda zip artifacts wouldn't be restored>" "builds/8bfa86eac2edda64741e9d27172b6fd2b2c54eb6dbf27fc5bfc8e000c3c4050c.plan.json"]
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: creating 'builds/5c9a351244db182790cd4bfdc1d80c316600be6ee11c14440c83ab5cca8a46c4.zip' archive
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: adding content of directory: .terraform/modules/xdr_authorizer/authorizer
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: adding: authorizer/requirements.txt
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: adding: authorizer/jwt_authorizer.py
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: adding: authorizer/cmk_decoder.py
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: adding: authorizer/__init__.py
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: adding: authorizer/layer.zip
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: creating 'builds/8bfa86eac2edda64741e9d27172b6fd2b2c54eb6dbf27fc5bfc8e000c3c4050c.zip' archive
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: authorizer.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): Installing python requirements: .terraform/modules/nsapi.lambda_authorizer/src/requirements.txt
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): > mktemp -d terraform-aws-lambda-XXXXXXXX # /var/folders/bs/53nm9pr15zg4g0wbvk39q_t40000gn/T/terraform-aws-lambda-6nd96sy_
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): > cd /var/folders/bs/53nm9pr15zg4g0wbvk39q_t40000gn/T/terraform-aws-lambda-6nd96sy_
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): > python3.8 -m pip install --no-compile --prefix= --target=. --requirement=requirements.txt
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: adding: authorizer/policy_generator.py
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: adding content of directory: .terraform/modules/xdr_authorizer/util
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: adding: util/logger_factory.py
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: adding: util/athena_query_exception.py
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: adding: util/__init__.py
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: adding: util/inconsistency_account_exception.py
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: adding: util/xdr_exception.py
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: adding: util/key_extractor.py
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: adding: util/dynamo_query_exception.py
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: adding: util/validator_exception.py
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: adding: util/secrets_downloader.py
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): Created: builds/5c9a351244db182790cd4bfdc1d80c316600be6ee11c14440c83ab5cca8a46c4.zip
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0]: Creation complete after 1s [id=8623599317617130170]
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (deposed object cc004dc7): Destroying... [id=8781539734473332190]
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0]: Destruction complete after 0s
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): Looking in indexes: https://pypi.org/simple, https://dsnexus.trendmicro.com/nexus/repository/c1-network/simple
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): Collecting pyjwt==2.1.0
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): Using cached PyJWT-2.1.0-py3-none-any.whl (16 kB)
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): Collecting requests==2.25.1
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): Using cached requests-2.25.1-py2.py3-none-any.whl (61 kB)
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): Collecting urllib3<1.27,>=1.21.1
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): Using cached urllib3-1.26.8-py2.py3-none-any.whl (138 kB)
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): Collecting idna<3,>=2.5
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): Using cached idna-2.10-py2.py3-none-any.whl (58 kB)
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): Collecting certifi>=2017.4.17
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): Using cached certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): Collecting chardet<5,>=3.0.2
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): Using cached chardet-4.0.0-py2.py3-none-any.whl (178 kB)
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): Installing collected packages: pyjwt, urllib3, idna, certifi, chardet, requests
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): Successfully installed certifi-2021.10.8 chardet-4.0.0 idna-2.10 pyjwt-2.1.0 requests-2.25.1 urllib3-1.26.8
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): WARNING: You are using pip version 20.2.3; however, version 21.3.1 is available.
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): You should consider upgrading via the '/Library/Developer/CommandLineTools/usr/bin/python3.8 -m pip install --upgrade pip' command.
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding content of directory: /var/folders/bs/53nm9pr15zg4g0wbvk39q_t40000gn/T/terraform-aws-lambda-6nd96sy_
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: PyJWT-2.1.0.dist-info/
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: PyJWT-2.1.0.dist-info/AUTHORS.rst
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: PyJWT-2.1.0.dist-info/INSTALLER
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: PyJWT-2.1.0.dist-info/LICENSE
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: PyJWT-2.1.0.dist-info/METADATA
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: PyJWT-2.1.0.dist-info/RECORD
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: PyJWT-2.1.0.dist-info/REQUESTED
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: PyJWT-2.1.0.dist-info/WHEEL
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: PyJWT-2.1.0.dist-info/top_level.txt
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: bin/
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: bin/chardetect
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: certifi/
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: certifi/__init__.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: certifi/__main__.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: certifi/cacert.pem
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: certifi/core.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: certifi-2021.10.8.dist-info/
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: certifi-2021.10.8.dist-info/INSTALLER
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: certifi-2021.10.8.dist-info/LICENSE
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: certifi-2021.10.8.dist-info/METADATA
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: certifi-2021.10.8.dist-info/RECORD
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: certifi-2021.10.8.dist-info/WHEEL
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: certifi-2021.10.8.dist-info/top_level.txt
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/__init__.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/big5freq.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/big5prober.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/chardistribution.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/charsetgroupprober.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/charsetprober.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/codingstatemachine.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/compat.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/cp949prober.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/enums.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/escprober.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/escsm.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/eucjpprober.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/euckrfreq.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/euckrprober.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/euctwfreq.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/euctwprober.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/gb2312freq.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/gb2312prober.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/hebrewprober.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/jisfreq.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/jpcntx.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/langbulgarianmodel.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/langgreekmodel.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/langhebrewmodel.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/langhungarianmodel.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/langrussianmodel.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/langthaimodel.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/langturkishmodel.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/latin1prober.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/mbcharsetprober.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/mbcsgroupprober.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/mbcssm.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/sbcharsetprober.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/sbcsgroupprober.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/sjisprober.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/universaldetector.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/utf8prober.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/version.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/cli/
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/cli/__init__.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/cli/chardetect.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/metadata/
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/metadata/__init__.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet/metadata/languages.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet-4.0.0.dist-info/
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet-4.0.0.dist-info/INSTALLER
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet-4.0.0.dist-info/LICENSE
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet-4.0.0.dist-info/METADATA
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet-4.0.0.dist-info/RECORD
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet-4.0.0.dist-info/WHEEL
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet-4.0.0.dist-info/entry_points.txt
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: chardet-4.0.0.dist-info/top_level.txt
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: idna/
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: idna/__init__.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: idna/codec.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: idna/compat.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: idna/core.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: idna/idnadata.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: idna/intranges.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: idna/package_data.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: idna/uts46data.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: idna-2.10.dist-info/
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: idna-2.10.dist-info/INSTALLER
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: idna-2.10.dist-info/LICENSE.rst
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: idna-2.10.dist-info/METADATA
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: idna-2.10.dist-info/RECORD
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: idna-2.10.dist-info/WHEEL
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: idna-2.10.dist-info/top_level.txt
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: jwt/
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: jwt/__init__.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: jwt/algorithms.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: jwt/api_jwk.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: jwt/api_jws.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: jwt/api_jwt.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: jwt/exceptions.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: jwt/help.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: jwt/jwks_client.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: jwt/py.typed
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: jwt/utils.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: requests/
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: requests/__init__.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: requests/__version__.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: requests/_internal_utils.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: requests/adapters.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: requests/api.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: requests/auth.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: requests/certs.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: requests/compat.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: requests/cookies.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: requests/exceptions.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: requests/help.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: requests/hooks.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: requests/models.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: requests/packages.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: requests/sessions.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: requests/status_codes.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: requests/structures.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: requests/utils.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: requests-2.25.1.dist-info/
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: requests-2.25.1.dist-info/INSTALLER
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: requests-2.25.1.dist-info/LICENSE
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: requests-2.25.1.dist-info/METADATA
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: requests-2.25.1.dist-info/RECORD
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: requests-2.25.1.dist-info/REQUESTED
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: requests-2.25.1.dist-info/WHEEL
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: requests-2.25.1.dist-info/top_level.txt
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/__init__.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/_collections.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/_version.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/connection.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/connectionpool.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/exceptions.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/fields.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/filepost.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/poolmanager.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/request.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/response.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/contrib/
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/contrib/__init__.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/contrib/_appengine_environ.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/contrib/appengine.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/contrib/ntlmpool.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/contrib/pyopenssl.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/contrib/securetransport.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/contrib/socks.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/contrib/_securetransport/
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/contrib/_securetransport/__init__.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/contrib/_securetransport/bindings.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/contrib/_securetransport/low_level.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/packages/
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/packages/__init__.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/packages/six.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/packages/backports/
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/packages/backports/__init__.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/packages/backports/makefile.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/util/
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/util/__init__.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/util/connection.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/util/proxy.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/util/queue.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/util/request.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/util/response.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/util/retry.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/util/ssl_.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/util/ssl_match_hostname.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/util/ssltransport.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/util/timeout.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/util/url.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3/util/wait.py
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3-1.26.8.dist-info/
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3-1.26.8.dist-info/INSTALLER
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3-1.26.8.dist-info/LICENSE.txt
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3-1.26.8.dist-info/METADATA
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3-1.26.8.dist-info/RECORD
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3-1.26.8.dist-info/WHEEL
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): zip: adding: urllib3-1.26.8.dist-info/top_level.txt
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (local-exec): Created: builds/8bfa86eac2edda64741e9d27172b6fd2b2c54eb6dbf27fc5bfc8e000c3c4050c.zip
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0]: Creation complete after 2s [id=2632080175396250961]
╷
│ Error: Provider produced inconsistent final plan
│
│ When expanding the plan for
│ module.nsapi.module.lambda_authorizer.module.lambda_authorizer.aws_lambda_function.this[0]
│ to include new values learned so far during apply, provider
│ "registry.terraform.io/hashicorp/aws" produced an invalid new value for
│ .source_code_hash: was
│ cty.StringVal("+q80Td6ETw1Y9WHbrlISWXx0YKJEUwQaos7FNXiekmM="), but now
│ cty.StringVal("kIVjK9ml1kl6xA02RSrik3vrEV2gpzKWZRQOpl1UAnk=").
│
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.
╵
Releasing state lock. This may take a few moments...
ERRO[0038] 1 error occurred:
* exit status 1
Second Terraform plan:
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
~ update in-place
- destroy
+/- create replacement and then destroy
Terraform will perform the following actions:
# module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] must be replaced
+/- resource "null_resource" "archive" {
~ id = "8623599317617130170" -> (known after apply)
~ triggers = { # forces replacement
~ "timestamp" = "1643159679626854800" -> "1643162258748244000"
# (1 unchanged element hidden)
}
}
# module.nsapi.module.lambda_authorizer.module.lambda_authorizer.aws_lambda_function.this[0] will be updated in-place
~ resource "aws_lambda_function" "this" {
~ filename = "builds/419fd6312e3c6d73876d36399d2d92a23930db92d0de55997aafc32dcadc16b4.zip" -> "builds/8bfa86eac2edda64741e9d27172b6fd2b2c54eb6dbf27fc5bfc8e000c3c4050c.zip"
id = "C1NetworkLambdaAuthorizer"
~ last_modified = "2022-01-26T01:06:39.000+0000" -> (known after apply)
tags = {}
# (20 unchanged attributes hidden)
# (2 unchanged blocks hidden)
}
# module.nsapi.module.lambda_authorizer.module.lambda_authorizer.null_resource.archive[0] (deposed object f60d04bb) will be destroyed
# (left over from a partially-failed replacement of this instance)
- resource "null_resource" "archive" {
- id = "9065890149777409639" -> null
- triggers = {
- "filename" = "builds/419fd6312e3c6d73876d36399d2d92a23930db92d0de55997aafc32dcadc16b4.zip"
- "timestamp" = "1643159445299181000"
} -> null
}
Plan: 1 to add, 1 to change, 2 to destroy.
─────────────────────────────────────────────────────────────────────────────
Second Terraform apply:
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0]: Creating...
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0]: Provisioning with 'local-exec'...
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): Executing: ["python3" ".terraform/modules/xdr_authorizer.lambda_xdr_authorizer/package.py" "build" "--timestamp" "1643162258748244000" "builds/5c9a351244db182790cd4bfdc1d80c316600be6ee11c14440c83ab5cca8a46c4.plan.json"]
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: creating 'builds/5c9a351244db182790cd4bfdc1d80c316600be6ee11c14440c83ab5cca8a46c4.zip' archive
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: adding content of directory: .terraform/modules/xdr_authorizer/authorizer
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: adding: authorizer/requirements.txt
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: adding: authorizer/jwt_authorizer.py
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: adding: authorizer/cmk_decoder.py
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: adding: authorizer/__init__.py
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: adding: authorizer/layer.zip
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: adding: authorizer/policy_generator.py
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: adding content of directory: .terraform/modules/xdr_authorizer/util
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: adding: util/logger_factory.py
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: adding: util/athena_query_exception.py
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: adding: util/__init__.py
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: adding: util/inconsistency_account_exception.py
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: adding: util/xdr_exception.py
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: adding: util/key_extractor.py
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: adding: util/dynamo_query_exception.py
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: adding: util/validator_exception.py
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): zip: adding: util/secrets_downloader.py
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (local-exec): Created: builds/5c9a351244db182790cd4bfdc1d80c316600be6ee11c14440c83ab5cca8a46c4.zip
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0]: Creation complete after 1s [id=1162898295106497730]
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0] (deposed object 9e0e8a60): Destroying... [id=8623599317617130170]
module.xdr_authorizer.module.lambda_xdr_authorizer.null_resource.archive[0]: Destruction complete after 0s
module.nsapi.module.lambda_authorizer.module.lambda_authorizer.aws_lambda_function.this[0]: Modifying... [id=C1NetworkLambdaAuthorizer]
╷
│ Error: unable to load "builds/8bfa86eac2edda64741e9d27172b6fd2b2c54eb6dbf27fc5bfc8e000c3c4050c.zip": open builds/8bfa86eac2edda64741e9d27172b6fd2b2c54eb6dbf27fc5bfc8e000c3c4050c.zip: no such file or directory
│
│ with module.nsapi.module.lambda_authorizer.module.lambda_authorizer.aws_lambda_function.this[0],
│ on .terraform/modules/nsapi.lambda_authorizer.lambda_authorizer/main.tf line 19, in resource "aws_lambda_function" "this":
│ 19: resource "aws_lambda_function" "this" {
│
╵
Releasing state lock. This may take a few moments...
ERRO[0035] 1 error occurred:
* exit status 1
Additional context
As you might see from the plan/apply output, there is a second lambda in the terraform state. I've seen other issues related to two lambdas sharing a code base, but these two do not share any code.
Ironically, we think this problem goes away (or lessens) if we set recreate_missing_package to true. Everything I've read about this variable says it is ideal for CI environments like our own 🤷🏻