My prefect flow has few tasks which are running te...
# prefect-community
s
My prefect flow has few tasks which are running terraform. Is there any way I can see the detailed log of the task getting executed. for eg, when terraform runs, it displays the logs on console. is there any way i can see those logs? in the prefect console, i see a very basic log which doesn't tell me what is going on inside the task
k
Would you see logs if you just executed the Python code without Prefect? If so, you can add extra loggers to get logs. I just don’t know if terraofmr logs happen on the same process
s
ok. even when my terraform is failing, the task shows succeeded. is there any way to make the task fail if terraform fails
k
Use a conditional and then:
Copy code
@task
def mytask(x):
    if x == 5:
        raise FAIL()
where FAIL is the Prefect signal. So you need to identify how to detect for failure
s
ok, thanks