Skip to content

bug using tfenv with cdktf #348

@stephengroat

Description

@stephengroat

have a strange bug where tfenv fails from within cdktf, but does not fail when TFENV_DEBUG=3 is set

not sure how to debug or determine what's wrong

$ cdktf synth
######################################################################## 100.0%
######################################################################## 100.0%
######################################################################## 100.0%
######################################################################## 100.0%
[2022-07-16T18:38:04.540] [ERROR] default - /usr/src/app/.tfenv/lib/tfenv-exec.sh: line 43: /usr/src/app/.tfenv/versions/1.2.4/terraform: Permission denied
/usr/src/app/.tfenv/lib/tfenv-exec.sh: line 43: exec: /usr/src/app/.tfenv/versions/1.2.4/terraform: cannot execute: Permission denied
Terraform CLI not present - Please install a current version https://learn.hashicorp.com/terraform/getting-started/install.html

seems to work if the binary is installed before, i.e. running terraform version before the cdktf command seems to fix it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions