ivanlg
May 17, 2022Copper Contributor
Terraform Plan addititonal command arguments
I'm trying to deploy different sites with terraform(at this moment we are deploying in a manual way) for that I follow next steps
- I create artifacts(zip packages) and zip package with all my artifacts and give a name for example MyDeploy20220517.10.zip.
- I save the package name and package path in enviroment variables Write-Host "##vso[task.setvariable variable=mypackagename;]$packageName" Write-Host "##vso[task.setvariable variable=mypackagepath;]$(System.WorkFolder)\package\$packageName.zip"
- Execute task with command init
- Execute task with command plan.
- Here I'm having problems to send the name and path created in step 1(environment variables), I'm sending additional arguments with those values as follow target=aws_elastic_beanstalk_application_version.MyApp -target=aws_s3_bucket_object.MyApp -var=fileName=$mypackagename -var=filePath=$(env:mypackagepath)
I want to send the values mypackagename & mypackagepath, but instead of send values it is passing the name of variables "$mypackagename" & "$(env:mypackagepath)"
Is possible send the values of my variables ?