Terraform Plan addititonal command arguments

Copper Contributor

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

  1. I create artifacts(zip packages) and zip package with all my artifacts and give a name for example MyDeploy20220517.10.zip.
  2. 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"
  3. Execute task with command init
  4. Execute task with command plan.
    1. 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  ?

 

0 Replies