Giter Site home page Giter Site logo

vsts-release-terraform's People

Contributors

pgroene avatar tevert avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

vsts-release-terraform's Issues

Failure on Plan Stage

Running "Plan" causes failure. With leaving out a step for "init" prior to it generates a blank error.

When running "init" followed by "plan" you recieve the following error on the plan stage:

erraform version:
Terraform v0.11.1
+ provider.azurerm v0.3.3
+ provider.random v1.1.0
Running: terraform plan
�[0m�[1mRefreshing Terraform state in-memory prior to plan...�[0m'
The refreshed state will be used to calculate this plan, but will not be persisted to local or remote state storage.
�[0m
------------------------------------------------------------------------
�[31m
�[1m�[31mError: �[0m�[0m�[1mError running plan: 1 error(s) occurred:
* provider.azurerm: Azure CLI Authorization Profile was not found. Please ensure the Azure CLI is installed and then log-in with az login.�[0m
�[0m�[0m�[0m
Terraform failed to execute. Error:
End of Task Terraform

Passing Variables

Do you have any examples on how to pass the variables? I have the variables defined in the library and linked to the build job but they seem to not be referencing. I added the following line to attempt to call them:

-var 'subscription_id=vars' -var 'client_id=vars' -var 'client_secret=vars' -var 'tenant_id=vars'

and flipped it around as well to:

-var 'vars=subscription_id' -var 'vars=client_id' -var 'vars=client_secret' -var 'vars=tenant_id'

My code I have tried using

variable subscription_id {
description = "words in here"
}

as well as:

provider "azurerm" {
subscription_id = "${var.subscription_id}"
client_id = "${var.client_id}"
client_secret = "${var.client_secret}"
tenant_id = "${var.tenant_id}"
}

but cannot seem to get the variables to take. Get an error telling me:

- provider config 'azurerm': unknown variable referenced: 'subscription_id'; define it with a 'variable' block
- provider config 'azurerm': unknown variable referenced: 'client_id'; define it with a 'variable' block
- provider config 'azurerm': unknown variable referenced: 'client_secret'; define it with a 'variable' block
- provider config 'azurerm': unknown variable referenced: 'tenant_id'; define it with a 'variable' block

Each time I run it.

Add ability to set TF_LOG

I'm new the the VSTS deployment process but pretty good with PowerShell. It should be pretty easy to add by implementing a picklist with the different TF_LOG options defaulting to ERROR and then adding something like this to the invoke-terraform:

$tf_log = Get-VstsInput -Name tf_log
[Environment]::SetEnvironmentVariable("TF_LOG", $tf_log, "Process")

I would do this myself, but I am not entirely sure how to go about it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.