Local_Sensitive_file not working in Git Pipeline

I am using Local_sensitive_file resource to create a certificate (.crt) file. It is working fine and file is getting created on my local system but the same is not happening when I run through pipeline. Any help is appreciated.

@apparentlymart Any thoughts ?

Are you able to share the config and errors you’re getting? I think the local_sensitive_file resource creates a file that is local to the server on which the terraform configuration is being executed. My guess is that terraform is attempting to create the file on the remote server (since you’re using a Git pipeline) and may not have sufficient permissions to create files/directories on that server (whereas the opposite would be true on your local system). If you are using Terraform Cloud, maybe you can set your workspace to only store the state files while executing configuration locally or you can write a separate config which will run locally and use the remote state file to retrieve the content for your .crt file.