Description
Description
Trying to deploy the example package_with_pip_requirements_in_docker using Windows fails
Error message:
zip: Error during zip archive creation Traceback (most recent call last): File ".terraform/modules/terraform-aws-redis-cleanup.redis_cleanup/package.py", line 1137, in build_command bpm.execute(build_plan, zs, query) File ".terraform/modules/terraform-aws-redis-cleanup.redis_cleanup/package.py", line 767, in execute with install_pip_requirements(query, pip_requirements) as rd: File "C:\Python3.7\lib\contextlib.py", line 112, in __enter__ return next(self.gen) File ".terraform/modules/terraform-aws-redis-cleanup.redis_cleanup/package.py", line 888, in install_pip_requirements chown_mask = '{}:{}'.format(os.getuid(), os.getgid()) AttributeError: module 'os' has no attribute 'getuid'
https://github.com/terraform-aws-modules/terraform-aws-lambda/blob/master/package.py#L888
According to this: https://docs.python.org/3.8/library/os.html#os.getgid
these 2 functions are available only on Linux. Basically if you run windows you can deploy only lambdas with non native python requirements.
Versions
- Terraform: v0.13.6
- Provider(s):
- provider registry.terraform.io/-/aws v3.36.0
- provider registry.terraform.io/hashicorp/aws v3.36.0
- provider registry.terraform.io/hashicorp/external v2.1.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: 1.45.0
Reproduction
Just try to deploy like in package_with_pip_requirements_in_docker example from a windows 10 machine
Expected behavior
Use docker to compile python dependencies
Actual behavior
Fails