Hello,
I am using recently published “Azure Devops” playground. It does says we can create pipelines and much more. But I am practicing azure infra provisioning with azure devops. I am trying to install terraform from marketplace but it does not add automatically. It is asking me for generate request.
Question -
- can this get resolved ?
- Or i cant provision Azure Infra through azure devops at all.
- then how can i practice creating pipelines.
Hi @SnehaGursale
I can see you’ve sent a request to install the Terraform extension, but I don’t think the playground allows approving or installing Azure DevOps extensions.
If you want to use Terraform in Azure DevOps, you don’t actually need the Terraform extension. You can simply use the Terraform CLI in your pipeline by installing Terraform and then running terraform init , terraform plan , and terraform apply .
For example:
trigger:
- main
pool:
vmImage: ubuntu-latest
variables:
TF_VERSION: "1.9.8"
steps:
- script: |
curl -fsSL https://releases.hashicorp.com/terraform/${TF_VERSION}/terraform_${TF_VERSION}_linux_amd64.zip -o terraform.zip
unzip terraform.zip
sudo mv terraform /usr/local/bin/
terraform version
displayName: Install Terraform
- script: |
terraform init
displayName: Terraform Init
- script: |
terraform plan -out=tfplan
displayName: Terraform Plan
- script: |
terraform apply -auto-approve tfplan
displayName: Terraform Apply