Comments (6)
@toast-gear please create another issue
from terraform-github-actions.
We are having a plan fail for a specific stack with the below diff (I've replaced the account IDs with 111111111 but in all cases it's the same account ID:
16a17
> - "arn:aws:iam::***:root",
19d19
< - "arn:aws:iam::***:root",
40d39
< - "arn:aws:iam::111111111111:root",
43c42
< + "arn:aws:iam::111111111111:root",
---
> "arn:aws:iam::111111111111:root",
63a63
> - "arn:aws:iam::111111111111:root",
66c66
< "arn:aws:iam::111111111111:root",
---
> + "arn:aws:iam::111111111111:root",
133d132
< - "arn:aws:iam::111111111111:root",
136c135
< + "arn:aws:iam::111111111111:root",
---
> "arn:aws:iam::111111111111:root",
180d178
< - "arn:aws:iam::111111111111:root",
183c181
< + "arn:aws:iam::111111111111:root",
---
> "arn:aws:iam::111111111111:root",
250a249
> - "arn:aws:iam::111111111111:root",
253c252
< "arn:aws:iam::111111111111:root",
---
> + "arn:aws:iam::111111111111:root",
288c287
It looks like a whitespace type issue, I had a look at the diff --help
options and I think perhaps adding ignores for all the whitespace style changes should be included in the diff check? We do fmt
in the pipeline so I'm not sure how we could have a whitespace issue but even so, this probably isn't the way to enforce fmt
in a pipeline and can potentially lead to false positives so I think ignoring whitespace style differences in the diff would be good and could avoid weird edge cases
-E --ignore-tab-expansion Ignore changes due to tab expansion.
-b --ignore-space-change Ignore changes in the amount of white space.
-w --ignore-all-space Ignore all white space.
-B --ignore-blank-lines Ignore changes whose lines are all blank.
EDIT Have looked at this more I can see the real comparison determining the go / no go logic happens in python script which strips, now I'm very confused as what the root cause of our issue is https://github.com/dflook/terraform-github-actions/blob/master/image/tools/plan_cmp.py. Changing the diff
binary flags won't help but there is probably an improvement to be made to make the go / no go diff the same as the binary diff
output. It would be more ideal if the script that performs the compare is also responsible for reporting what the differences are in the case of a mismatch in plans so a more accurate diff
can be presented.
from terraform-github-actions.
The diff command is only used for informational output when the plan does not compare equal to the plan in the comment.
The plan_cmp script is for comparing plans and it could definately be improved (see #64), but I'm not aware that whitespace is a problem. Do you have an example of a whitespace only difference preventing an apply? The plan is generated the same way every time.
@toast-gear It's difficult to tell what the differences are in your snippet. It looks like it's a list where the entries are changing or being re-ordered. This would be a legitimate difference in the plan.
from terraform-github-actions.
It's difficult to tell what the differences are in your snippet
yes I'm having the same problem
Do you have an example of a whitespace only difference preventing an apply?
No, the PR is created and merged within 30 seconds and the repository isn't managing resources that are touched outside of this repository. We have also removed the problem being a race condition. Still looking into it, going grab the plan from the comment and compare it with the runtime plan, but a improvement would from my perspective would be to improve the Python plan script to also handle the reporting if the plans don't match.
from terraform-github-actions.
Is there a easy way of uploading the 2 plans as artefacts so I can easy compare them outside the pipeline?
from terraform-github-actions.
I don't think insignificant blank lines in the plan can prevent an apply. If you find an example, please re-open this issue.
from terraform-github-actions.
Related Issues (20)
- Cosmetic - missing the selected workspace name HOT 3
- Cannot run plan with S3 backend HOT 4
- Inability to trigger the action due to an alleged missing file HOT 5
- Terraform Plan action fails due to Unknown token: 15:19 IDENT confluent_service_account.app-producer.id error HOT 10
- "terraform-plan" fails with an error while using "terraform plan" succeeds HOT 2
- backend_config read as file in apply
- Ability to Share Plan Outputs Between Runs HOT 6
- Resources are not removed despite the action claiming otherwise HOT 2
- Issues in terraform version 1.6.0 HOT 1
- Support for Terraform 1.6 test framework HOT 1
- Terraform Cloud deploy with hard-coded workspace fails
- Add option to create new comments on following execution of a terraform operation HOT 3
- OpenTofu support HOT 5
- Terraform Plan Action failing on tf version 1.6.x showing S3 403 permission error
- terraform-plan error: The process '/usr/bin/git' failed with exit code 128 HOT 2
- Terraform Plan Fails on self-hosted runner - ls: cannot access '/github/home': No such file or directory HOT 12
- .tool-versions at workspace level doesn't work HOT 1
- Terraform Cloud backend requires manual "Confirm & Apply" for Terraform >= 1.6.0 HOT 6
- Add option for multiple SSH keys (GH deploy keys)
- auto apply if no resources changed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-github-actions.