Comments (3)
@dvasdekis, in order to use runAzLogin, you will need to specify a service connection via the environmentServiceName
input in order for the azure cli to authenticate. The task uses the service connection's credentials to run az login
. Without specifying the service connection, then it would have no means to authenticate against azure.
When doing this on your desktop, you have likely already logged into the az cli before running terraform import. Terraform will automatically pick the az cli context up to authenticate against azure.
If you cannot use a service connection, an alternative is to set the environment variables terraform expects for the azurerm provider. The task provides a means to more easily establish these via Secure Var Files. If you specify a secure var file via secureVarsFile
input whose extension ends with .env
it will export the vars set in the .env file as environment variables on the agent.
from azure-pipelines-tasks-terraform.
See also docs about how to specify a service connection here
Also, see docs about how to setup secure env files for manual configuration
from azure-pipelines-tasks-terraform.
Thanks Charles! Setting the service connection worked a treat :)
from azure-pipelines-tasks-terraform.
Related Issues (20)
- Support for -var on Terraform plan HOT 2
- Tests currently failing after -p change HOT 1
- How to authenticate using Service Principal and certificate in the terraform task in azure pipelines. HOT 1
- How to use service connections in tasks? HOT 1
- (Azure / AzureRM) Terraform Plan fails after successful Init HOT 3
- "Error retrieving keys for Storage Account" when using Management group scoped service principal using workload identity federation HOT 1
- The author is still Charles Zipp HOT 1
- Multi region AWS Services? HOT 3
- Terraform command 'plan' failed with exit code 'null' HOT 4
- Azure Pipelines Terraform Tasks - Charles Zipp HOT 2
- "A task is missing" error HOT 1
- Use TF_IN_AUTOMATION: 'True' by default HOT 2
- Update azure-pipelines-task-lib to latest HOT 2
- I just enabled azure container and blob versions. Do we have to explicitly state to use the latest container/blob version or is 'latest' default? HOT 2
- Terraform apply fails with clientCredentialsToken already expired HOT 1
- Output command task not outputting anything HOT 1
- Severe Security flaw: OIDC Token printed as Plain text in the pipeline run log for Service Connections configured with Workload Identity Federation HOT 1
- AWS - Does Terraform Init Task Support DynamoDB Backend for Locking with S3 State Files? HOT 1
- Node 16+ support HOT 1
- Add support for -backend-config=PATH when using terraform init HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-pipelines-tasks-terraform.