Skip to content

raul-arrieta/Terraform-Outputs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform-Outputs

This extension enables you to use the Terraform outputs as variables in your Azure Pipelines.

Terraform Outputs Task

task-screenshot

This task will execute 'terraform output -json' command within the provided "Path to Terraform scripts" and map all these values to pipeline variables.

It is possible to indicate if you want to map the sensitive outputs as secrets (thanks to @joseph-passineau 😊).

You can also provide a common prefix that will be applied to each of the variable names.

Optionally a path to Terraform assembly can be provided. If it's available in PATH this value can be leave empty.

Build pipeline

Build status

CI build pipeline that packages the vsix extension and publishes two artifacts:

  • terraform-outputs-extension: includes the packaged extension.
  • terraform-test: contains .tf files and a powershell script used to validate the extension.

Release pipeline

CD release pipeline is composed of three different stages:

Development:

Development

Publishes a private version of the extension tagged as "development".

Before running next stage there is a deployment gate to check that the extension has been successfully validated by the marketplace.

Validation:

Validation

Executes the same task group on three different hosted agents:

  • Windows Validation: Hosted VS2017 agent pool.
  • Linux Validation: Hosted Ubuntu 1604 agent pool.
  • MacOS Validation: Hosted macOS agent pool.

The task group:

  • Installs the extension that has been published on Development stage.
  • Installs Terraform and executes init and apply using 'terraform-test' published artifact.
  • Run Terraform Outputs without prefix.
  • Executes a powershell to check that the variable has been published and contains the appropriate value.
  • Run Terraform Outputs with prefix.
  • Executes a powershell to check that the variable has been published using the provided prefix and contains the appropriate value.

Production

Production

Once it has been approved this stage publishes the extension to the marketplace.