Skip to content

hiscox/terratestutilities

Repository files navigation

terratestutilities

A number of helper functions to be used in other go modules. For instance checking that appropriate environment variables have been set to authenticate through the Azure Cli.

We particulary use this alongside Terratest to control Azure Cli authentication and to set whether a terraform execution should do a plan, apply, destroy or all.

Checkout terraform-template and inspect the tests folder to see an example setup of how we use this module to control the workflow in a pipeline.

Getting Started

Add this module as an import:

import (
  util "github.com/hiscox/go-utilities"
)

Access methods like so:

cSecret, cID, tenID, subID, err := util.AzCLiAuth()
if err != nil {
  // handle it
}

Build and Test

TODO: add an azure-pipelines.yml to run the tests

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages