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

Build step assumes that there is a directory named terraform #62

Open
carolynvs opened this issue May 25, 2021 · 2 comments
Open

Build step assumes that there is a directory named terraform #62

carolynvs opened this issue May 25, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@carolynvs
Copy link
Member

  1. Run porter create
  2. Add the terraform mixin
    mixins:
    - terraform
    
  3. Run porter build

This results in the following error

Error: unable to build CNAB invocation image: failed to stream docker build output: The command '/bin/sh -c cd /cnab/app/terraform && terraform init -backend=false' returned a non-zero code: 2

After making a directory named terraform at the root of the bundle, the build passes. Seems like we have a hard coded assumption about where the terraform files are kept that should more gracefully handle when it's not there, or return an error during lint.

@evan-hines-js
Copy link

From the readme. The workingDir configuration setting is the relative path to your terraform files. Defaults to "terraform". So this is expected behavior but the lint may be possible?

@carolynvs
Copy link
Member Author

I added workingDir after this issue was opened. 😀 Seems like we can still have a lint check that validates that the workdinDir exists, to avoid having the bundle predictably fail when it is run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants