Azure DevOps - Azure library variables to TF variables

%3CLINGO-SUB%20id%3D%22lingo-sub-2067747%22%20slang%3D%22en-US%22%3EAzure%20DevOps%20-%20Azure%20library%20variables%20to%20TF%20variables%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2067747%22%20slang%3D%22en-US%22%3E%3CP%3EI%20want%20to%20map%20Azure%20Library%20variables%20to%20TF%20variables.%20I%20am%20unable%20to%20do%20so%2C%20output.tf%20doesn't%20display%20the%20variables%20when%20I%20try%20to%20pass%20them%20through%20the%20pipeline.%20Anyone%20has%20done%20this%3F%20Thanks%20RK.%3C%2FP%3E%3CP%3Eeg%3A%26nbsp%3B%3C%2FP%3E%3CP%3ETF_VAR_x%20%3D%20%24x%3C%2FP%3E%3CP%3ETF_VAR_y%20%3D%20%24y%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eoutput.tf%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eoutput%20%22X%22%7B%3C%2FP%3E%3CP%3Evalue%20%3D%20X%3C%2FP%3E%3CP%3E%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2087500%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20DevOps%20-%20Azure%20library%20variables%20to%20TF%20variables%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2087500%22%20slang%3D%22en-US%22%3EUnfortunately%20below%20assignment%20didn't%20work%20for%20you.%20Did%20any%20try%3F%3CBR%20%2F%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fwww.terraform.io%2Fdocs%2Fcommands%2Fenvironment-variables.html%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.terraform.io%2Fdocs%2Fcommands%2Fenvironment-variables.html%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fstackoverflow.com%2Fquestions%2F54247055%2Fhow-to-reference-a-variable-in-terraform-file-for-azure-devops-vsts%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fstackoverflow.com%2Fquestions%2F54247055%2Fhow-to-reference-a-variable-in-terraform-file-for-azure-devops-vsts%3C%2FA%3E%3C%2FLINGO-BODY%3E
New Contributor

I want to map Azure Library variables to TF variables. I am unable to do so, output.tf doesn't display the variables when I try to pass them through the pipeline. Anyone has done this? Thanks RK.

eg: 

TF_VAR_x = $x

TF_VAR_y = $y

 

output.tf

 

output "X"{

value = X

}

 

 

1 Reply