question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Run conftest on tfmigrate-plan

See original GitHub issue

Hi, this is a some kind of bug report, and feature request.

I noticed that the conftest validation doesn’t run during tfmigrate-plan action. We noticed that the resource definition violating our conftest policy in terraform-plan after tfmigrate’d.

I think this part in terraform-plan should also be in tfmigrate-plan. https://github.com/suzuki-shunsuke/tfaction/blob/91916f7cf7d2df7f8a01357f5d15e07a603d0555/terraform-plan/main.sh#L30-L38

Furthermore, there’s a edge case related to this: skip: prefix used in tfmgirate multi-state migration. If a working directory that was added resources skipped tfmigrate-plan by skip:xxx label, this would cause an issue. To fix the case, I propose splitting build matrix from [terraform, tfmigrate] to [terraform, tfmigrate, conftest (or validation)]. What do you think?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
kyontancommented, Sep 14, 2022

Thanks for your great work! I’ll try the new version.

1reaction
suzuki-shunsukecommented, Sep 12, 2022

I understood why TF_CLI_ARGS_plan="-out=tfplan.out doesn’t work. https://github.com/minamijoyo/tfmigrate/issues/106#issuecomment-1243826555

Read more comments on GitHub >

github_iconTop Results From Across the Web

Conftest
Conftest is a utility to help you write tests against structured configuration ... Assuming you have a Kubernetes deployment in deployment.yaml you can...
Read more >
PyTest Tutorial #6 - How to use Conftest.py in PyTest - YouTube
Get all my courses for USD 5.99/Month - https://bit.ly/all-courses-subscriptionIn this PyTest Tutorial we will learn how to use conftest.py ...
Read more >
how to run pytest conftest before everything is imported
This is a simplified version of my problem. I have a python application with the structure as below: my_project my_app __init__.py ...
Read more >
Pytest - Conftest.py - Tutorialspoint
Pytest - Conftest.py, We can define the fixture functions in this file to make them accessible ... Run the tests by executing the...
Read more >
Version 7.1.0 seems like not picking up conftest.py · Issue #9767
When I run pytest refnx , all my tests get picked up, but the refnx/conftest.py file does not. Consequently all the tests that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found