-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathhub-infrastructure-dev.yaml
More file actions
56 lines (51 loc) · 1.72 KB
/
hub-infrastructure-dev.yaml
File metadata and controls
56 lines (51 loc) · 1.72 KB
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
55
56
---
name: $(Build.SourceBranchName)-$(Date:yyyyMMdd)_$(Rev:r)
trigger: none
pr: none
pool:
name: private-pool-hub-nonlive-uks
resources:
repositories:
- repository: dtos-devops-templates
type: github
name: NHSDigital/dtos-devops-templates
ref: PPHA-417-Create-infra-as-code-for-Hub-resources
endpoint: NHSDigital
variables:
- group: NON_LIVE_hub_backend
- name: TF_DIRECTORY
value: $(System.DefaultWorkingDirectory)/lung_cancer_screening/infrastructure/terraform/hub
- name: TF_VERSION
value: 1.14.3
- name: TF_PLAN_ARTIFACT
value: tf_plan_hub_art_NONLIVE_dev
- name: ENVIRONMENT
value: nonlive-hub
stages:
- stage: terraform_plan
displayName: Terraform Plan
condition: eq(variables['Build.Reason'], 'Manual')
variables:
tfVarsFile: ../../environments/$(ENVIRONMENT)/variables.tfvars
jobs:
- job: init_and_plan
displayName: Init, plan, store artifact
steps:
- checkout: self
- checkout: dtos-devops-templates
- template: .azuredevops/templates/steps/tf_plan.yaml@dtos-devops-templates
- stage: terraform_apply
displayName: Terraform Apply
dependsOn: [terraform_plan]
condition: and(eq(dependencies.terraform_plan.outputs['init_and_plan.TerraformPlan.changesPresent'], 'true'), eq(variables['Build.Reason'], 'Manual'))
jobs:
- deployment: terraform_apply
displayName: Init, get plan artifact, apply
environment: $(ENVIRONMENT)
strategy:
runOnce:
deploy:
steps:
- checkout: self
- checkout: dtos-devops-templates
- template: .azuredevops/templates/steps/tf_apply.yaml@dtos-devops-templates