Repository navigation
Expand file tree
/
Copy pathAzureDevOpsPipelineExample.yml
More file actions
58 lines (55 loc) · 1.76 KB
/
Copy pathAzureDevOpsPipelineExample.yml
File metadata and controls
58 lines (55 loc) · 1.76 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
57
58
trigger: none
variables:
- name: subscriptionCreationServiceConnection
value: 'SERVICECONNECTIONNAME'
parameters:
- name: Identifier
displayName: What is the identifying name of the Azure Landing Zone? (short name)
type: string
- name: DisplayName
displayName: What is the display name of the Azure Landing Zone? (long name)
type: string
- name: ManagementGroupName
displayName: Azure Management Group Name
type: string
- name: BillingScope
displayName: Azure Billing Scope, Example /billingAccounts/123456/enrollmentAccounts/123456
type: string
- name: Workload
displayName: Azure Billing Scope, Example /billingAccounts/123456/enrollmentAccounts/123456
type: string
values:
- Production
- DevTest
- name: Environment
displayName: Environment?
type: string
default: Sandbox
values:
- sbx
- dev
- acc
- prod
stages:
- stage: provision
displayName: 'Subscription Vending'
jobs:
- job: subscriptionCreate
displayName: 'Create Azure Subscription'
steps:
- task: AzurePowerShell@5
displayName: 'Create Azure Subscription'
name: CreateSub
inputs:
azureSubscription: $(subscriptionCreationServiceConnection)
ScriptType: 'FilePath'
azurePowerShellVersion: LatestVersion
pwsh: true
ScriptPath: 'New-AzureSubscription.ps1'
ScriptArguments: >
-Identifier '${{ parameters.Identifier }}'
-BillingScope '${{ parameters.BillingScope }}'
-Workload 'Production'
-ManagementGroupId '/providers/Microsoft.Management/managementGroups/${{ parameters.ManagementGroupName }}'
-EnvironmentShortName '$(variableOutput.environmentShortName)'
-DisplayName '${{ parameters.DisplayName }}'