-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipeline.yml
54 lines (49 loc) · 1.86 KB
/
azure-pipeline.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: $(SourceBranchName)-$(Date:yyyyMMdd)-$(Rev:rrr)
trigger:
batch: true
branches:
include:
- main
- develop
paths:
include:
- ./environments/*.tfvars
- ./terraform/*.tf
- ./.azuredevops/*.yml #templates
- ./*.yaml #triggers
resources:
repositories:
- repository: remote
type: github
name: 'casa-de-vops/terraform-code-standards'
ref: 'refs/heads/main'
endpoint: 'GitHub'
mapping: '.azuredevops'
- repository: local
type: git
name: 'terraform-code-standards'
ref: 'refs/heads/main'
variables:
- group: ssh_host #library group containing knownHostsEntry, sshPublicKey, sshPassphrase, sshKeySecureFile
- group: ado
- template: 'versions/modules.nonprod.yml'
stages:
- template: .azuredevops/stages.deploy.yml@local #Change this to @remote to use the remote templates from casa-de-vops/terraform-code-standards
parameters:
workload: terraform-pipeline
working_directory: terraform/
environments:
- stage: Prod_Global
vmImage: 'ubuntu-latest'
azure_service_connection: terraform
tfvars_file: ../environments/infrastructure-as-code.tfvars
environment: prod
ado_environment: prod
backend_service_connection: terraform
backend_azure_rm_resource_group_name: rg-terraform-ops
backend_azure_rm_storage_account_name: casadevopsterraform
backend_azure_rm_container_name: ops-terraform-state
backend_azure_rm_key: project-casa-de-vops-devops.prod.tfstate
command_option_args: '-var azuredevops_personal_access_token="$(azuredevops_personal_access_token)" -var azuredevops_org_service_url="$(azuredevops_org_service_url)"'
# destroy_mode: true ## runs the -destroy flag in the terraform plan & apply stages
# step_apply_command_option_args: '-no-color'