From 97ddbe76377b46ce09fc4f3ba9855300d0708439 Mon Sep 17 00:00:00 2001 From: Jonathan Lopez Date: Thu, 1 Feb 2024 16:29:21 -0500 Subject: [PATCH] Issue #3: Set up terraform pipeline for our infra repo (gh) with Azure Pipelines [skip ci] --- apply-terraform.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 apply-terraform.yml diff --git a/apply-terraform.yml b/apply-terraform.yml new file mode 100644 index 00000000..6d9d5f05 --- /dev/null +++ b/apply-terraform.yml @@ -0,0 +1,31 @@ +trigger: +- 3-create-a-kubernetes-cluster-for-azure-w-the-ingress-nginx + +pool: + vmImage: 'ubuntu-latest' +steps: +- task: TerraformTaskV1@0 + displayName: Terra Init + inputs: + provider: 'azurerm' + command: 'init' + workingDirectory: '$(System.DefaultWorkingDirectory)/terraform' + backendServiceArm: 'CFSC-AiLabChatbot-Sub-SP' + backendAzureRmResourceGroupName: 'rg-ai-cfia-terraform-state' + backendAzureRmStorageAccountName: 'tfcfiastate' + backendAzureRmContainerName: 'infra-terraform-state' + backendAzureRmKey: 'tf/terraform.tfstate' +- task: TerraformTaskV1@0 + displayName: Terra Plan + inputs: + provider: 'azurerm' + command: 'plan' + workingDirectory: $(System.DefaultWorkingDirectory) + environmentServiceNameAzureRM: 'CFSC-AiLabChatbot-Sub-SP' +- task: TerraformTaskV1@0 + displayName: Terra Apply + inputs: + provider: 'azurerm' + command: 'apply' + workingDirectory: $(System.DefaultWorkingDirectory) + environmentServiceNameAzureRM: 'CFSC-AiLabChatbot-Sub-SP' \ No newline at end of file