How can I pass the PR_ID to a lifecycle job?

Hi @Melvin_Zottola,

When I run it locally it correctly creates the Terraform state file in my S3 backend with whatever I put in there. Also when I clone manually my environment as mentioned here Environment Preview Cloning Error - #2 by Melvin_Zottola , that same step instead of using

key=branch-${QOVERY_PULL_REQUEST_ID}/terraform.tfstate

I use

key=branch-${BITBUCKET_BRANCH}/terraform.tfstate

And it works just fine. Only when using the builtin preview feature, I get the error mentioned in this topic.

The variable ${QOVERY_PULL_REQUEST_ID} I don’t use it only for the Terraform state file name, I use too for creating a CNAME record in my DNS and that is when I get the error.