-
Notifications
You must be signed in to change notification settings - Fork 146
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
kitchen converge fails in GitHub actions environment #411
Comments
Thank you for your interest in kitchen-terraform @fdansey-ostmodern Do you have that example with Actions in a public repo, that we can look at to help troubleshoot? I'm busy for the next few days but am happy to help debug early next week. |
Howdy, I'm afraid the repo in which I am working is private. However, I can tell you I am running these four setup commands on the ubuntu-18.04 virtual env:
I tried running kitchen via bundle exec and also completely changed the terraform I was testing without success. |
Hi @fdansey-ostmodern! You should run with |
Howdy, this is partial output when I added the
|
@fdansey-ostmodern thank you! Can you please confirm which version of Kitchen-Terraform is present in the |
The specs section of the Gemfile.lock includes: kitchen-terraform (5.4.0) |
I also tried using a self-hosted runner. Running the commands directly on the host yielded the same error, however when I used a docker container action, everything worked as expected including the InSpec tests. |
@fdansey-ostmodern sorry for the delay in responding! Are you able to share reproductions that we may poke at? |
@aaron-lane , @edwardbartholomew - I have the similar issue. This is under a public repo. Below is the URL. Do you think you can help on this please? D ::debug::Terraform exited with code 0. D ::debug::stdout: ***%0A D ::set-output name=stdout::***%0A D Finished running command
https://github.com/amitkumardube/terraform-misc/runs/2426133878?check_suite_focus=true |
Hi @amitkumardube! Could you please manually provision the |
@aaron-lane - thanks for looking into this. C:\Users\User\Downloads\terraform_0.14.4_windows_amd64\terraform-misc\test\fixtures\secret>terraform output -json The output of pipeline is still same - D ::set-output name=stderr:: D Finished running command
|
@aaron-lane - Sorry for follow-up. Wondering if you got some clue around why this is happening? |
I don't have a firm explanation yet, but this log message from your latest build looks suspicious:
It may just be the way that GitHub Actions is rendering the message, but it appears like it is modifying the output of |
@aaron-lane - No worries . thanks for your time. I got a workaround in the meantime by adding a container and running all the steps inside a container and there it seems to be working fine. Below is the change I made if you like to have a look. https://github.com/amitkumardube/terraform-misc/blob/master/.github/workflows/gcloud.yml#L22 Below is the successful run |
Hi @amitkumardube, @aaron-lane I had the same issue using the hashicorp/setup-terraform action to install terraform. Following hashicorp/setup-terraform/issues/20, you can see that hashicorp wrap terraform binary, that's why there is a different behavior. You can disable the wrapper :
After that, kitchen works as expected. Hope it will help other kitchen-terraform users :) |
@jnahelou thank you for confirming the fix! |
Howdy. Running the
kitchen converge
command locally (using the example terraform code) works, but when I come to automate this in GitHub Actions, it fails after having created the resources in terraform with error,The text was updated successfully, but these errors were encountered: