-
Notifications
You must be signed in to change notification settings - Fork 1
/
terraform.tf
57 lines (53 loc) · 1.46 KB
/
terraform.tf
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
terraform {
required_providers {
azuread = "~> 2.40"
azuredevops = {
source = "microsoft/azuredevops"
version = "~> 0.9"
}
azurerm = "~> 3.66"
external = "~> 2.3"
http = "~> 3.4"
random = "~> 3.5"
time = "~> 0.9"
}
required_version = "~> 1.3"
}
data external azdo_token {
program = [
"az", "account", "get-access-token",
"--resource", "499b84ac-1321-427f-aa17-267ca6975798", # Azure DevOps
"--query","{accessToken:accessToken}",
"-o","json"
]
}
provider azuredevops {
org_service_url = local.azdo_organization_url
personal_access_token = data.external.azdo_token.result.accessToken
}
provider azurerm {
features {
resource_group {
prevent_deletion_if_contains_resources = false
}
}
# skip_provider_registration = true
}
provider azurerm {
alias = "managed_identity"
features {
resource_group {
prevent_deletion_if_contains_resources = false
}
}
subscription_id = local.managed_identity_subscription_id
}
provider azurerm {
alias = "target"
features {
resource_group {
prevent_deletion_if_contains_resources = false
}
}
subscription_id = local.target_subscription_id
}