Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terraform plan / Terraform apply breaks in CI system #11

Open
ekfastlane opened this issue Oct 9, 2020 · 0 comments
Open

Terraform plan / Terraform apply breaks in CI system #11

ekfastlane opened this issue Oct 9, 2020 · 0 comments

Comments

@ekfastlane
Copy link

Hi Raymond

Egor again. We're facing the following issue during terraform apply stage:

`[terragrunt] 2020/10/08 03:22:32 Running command: terraform apply -input=false --auto-approve /tmp/cci-extras/workspace/terraform.plan
module.identify_unprocessed_grids_lambda_function.aws_s3_bucket_object.source_zip_file[0]: Creating...

Error: Error opening S3 bucket object source (.terraform/modules/identify_unprocessed_grids_lambda_function/zip_files/aws-ap-southeast-2-288871573946-ga_sb_default_identify_unprocessed_grids.zip): open .terraform/modules/identify_unprocessed_grids_lambda_function/zip_files/aws-ap-southeast-2-288871573946-ga_sb_default_identify_unprocessed_grids.zip: no such file or directory

on .terraform/modules/identify_unprocessed_grids_lambda_function/main.tf line 53, in resource "aws_s3_bucket_object" "source_zip_file":
53: resource "aws_s3_bucket_object" "source_zip_file" {

[terragrunt] 2020/10/08 03:22:42 Hit multiple errors:
exit status 1

Exited with code exit status 1

CircleCI received exit code 1
`

The reason here is that plan and apply stages are separated with approval stage in between. Terraform plan file is transferred between stages as part of CI process, however, zip files complied with LAMBDA builder are quite hard to move as they sit under .terraform/modules. Would you accept our pull request if we externalised zip_files_dir and made it configurable via variable?

This way we'd be able to store all outputs in a specific folder so we could move them between stages.

Cheers
Egor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant