-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 Cloud Remote Operations broken for Terraform versions >= 0.15.0 #1628
Comments
FWIW, I was experiencing this same behavior and found a solution by overriding the default TF commands to not include the '-out' param. I set the override via the Here's a copy pasta of my config:
Anyway hope it helps -- good luck! |
This is still a problem. It is necessary to override I had to add {
"workflows": {
"default": {
"plan": {
"steps": [
{
"run": "terraform init -input=false -no-color"
},
{
"run": "terraform plan -input=false -no-color"
}
]
},
"apply": {
"steps": [
{
"run": "terraform apply -auto-approve -input=false -no-color"
}
]
}
}
},
"repos": [
{
"id": "/.*/",
"allowed_overrides": [
"workflow"
],
"allow_custom_workflows": true
}
]
} |
@blytheaw I think you're right. Closing the issue since the original issue on @alexkosj @AmiditeX Not sure which version of Terraform were you using, but for versions later than v1.1, I'm working on another fix in #2793 |
I believe this is another occurrence of #705 where the error message used to detect remote operations has changed between versions 0.14.11 and 0.15.0 of Terraform.
This closely related to some of the issues that have been previously fixed like #704 and #915.
I have confirmed this in a test as follows. The below output is from a single PR, with each workspace locked to a specific Terraform version. The Terraform Cloud workspaces are also locked to those specific versions. The Terraform configuration in each is identical except for the remote backend configuration and simply creates a null resource for testing:
Atlantis Plan Output
Ran Plan for 2 projects:
atlantis-remoteops/0.14.11
workspace:default
atlantis-remoteops/0.15.0
workspace:default
1. dir:
atlantis-remoteops/0.14.11
workspace:default
Show Output
atlantis apply -d atlantis-remoteops/0.14.11
atlantis plan -d atlantis-remoteops/0.14.11
2. dir:
atlantis-remoteops/0.15.0
workspace:default
Plan Error
Additional Info
I found the error message string in the Terraform repo, and it hasn't changed in 3 years. In my testing with different local CLI versions, it appears that 0.15.0 removed an extra newline character at the end of the error output.
0.14.11:
0.15.0
I'm not certain, but it appears that the string Atlantis is using to check for this message includes two newlines, and this might be why it is no longer detecting it:
atlantis/server/events/runtime/plan_step_runner.go
Lines 328 to 333 in a4f0e3a
The text was updated successfully, but these errors were encountered: