Step 14 - Replace tokens in tf & tfvars - Build
  • 18 Nov 2019
  • 1 Minute to read
  • Contributors
  • Comment
  • Dark
    Light
  • PDF

Step 14 - Replace tokens in tf & tfvars - Build

  • Comment
  • Dark
    Light
  • PDF

Article Summary

In this task we will be replacing the tokens in the artifact staging directory for the terraform files in the terraform folder. This will allow us to run Terraform and have it build and update our infrastructure.

The picture of the configuration for this task is:

image.png

YAML

The yaml for this task is:

steps:
- task: qetza.replacetokens.replacetokens-task.replacetokens@3
  displayName: 'Replace tokens in **/*.tf **/*.tfvars'
  inputs:
    rootDirectory: '$(Build.ArtifactStagingDirectory)\Terraform'
    targetFiles: |
     **/*.tf
     **/*.tfvars
    tokenPrefix: '__'
    tokenSuffix: '__'


Was this article helpful?