Skip to content

Commit 34c0768

Browse files
committed
wip
1 parent c2819f6 commit 34c0768

4 files changed

Lines changed: 18 additions & 8 deletions

File tree

.azuredevops/pipelines/hub-infrastructure-dev.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ resources:
3131

3232
variables:
3333
- group: NON_LIVE_hub_backend
34-
# - group: DEV_hub_config
3534
- name: TF_DIRECTORY
3635
value: $(System.DefaultWorkingDirectory)/$(System.TeamProject)/infrastructure/terraform/hub
3736
- name: TF_VERSION
@@ -51,10 +50,10 @@ stages:
5150
- job: init_and_plan
5251
displayName: Init, plan, store artifact
5352
steps:
54-
# - task: TerraformInstaller@1
55-
# displayName: Install Terraform $(TF_VERSION)
56-
# inputs:
57-
# terraformVersion: $(TF_VERSION)
53+
- task: TerraformInstaller@1
54+
displayName: Install Terraform $(TF_VERSION)
55+
inputs:
56+
terraformVersion: $(TF_VERSION)
5857

5958
- checkout: self
6059
- checkout: dtos-devops-templates

.gitleaksignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ infrastructure/bootstrap/hub.bicep:generic-api-key:57
2222
infrastructure/bootstrap/hub.bicep:generic-api-key:58
2323
infrastructure/bootstrap/hub.bicep:generic-api-key:59
2424
infrastructure/bootstrap/hub.bicep:generic-api-key:60
25+
infrastructure/bootstrap/hub.bicep:generic-api-key:61
2526
infrastructure/bootstrap/main.bicep:generic-api-key:29
2627
infrastructure/bootstrap/main.bicep:generic-api-key:30
2728
infrastructure/bootstrap/main.bicep:generic-api-key:31

infrastructure/bootstrap/hub.bicep

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ var roleID = {
5959
rbacAdmin: 'f58310d9-a9f6-439a-9e8d-f62e7b41a168'
6060
reader: 'acdd72a7-3385-48ef-bd42-f606fba81ae7'
6161
contributor: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
62+
storageBlobDataContributor: 'ba92f5b4-2d11-453d-a403-e96b0029c9fe'
6263
}
6364

6465

@@ -182,7 +183,7 @@ resource CDNContributorAssignment 'Microsoft.Authorization/roleAssignments@2022-
182183
}
183184
}
184185

185-
@description('Let the managed identity configure terraform')
186+
@description('Let the managed identity deploy terraform on the subscription')
186187
resource TerraformContributorAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
187188
name: guid(subscription().subscriptionId, hubType, 'TerraformContributor')
188189
properties: {
@@ -192,6 +193,16 @@ resource TerraformContributorAssignment 'Microsoft.Authorization/roleAssignments
192193
}
193194
}
194195

196+
@description('Let the managed identity strore blobs in storage account')
197+
resource StorageAccountBlobContributorAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
198+
name: guid(subscription().subscriptionId, hubType, 'StorageAccountBlobContributorAssignment')
199+
properties: {
200+
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleID.storageBlobDataContributor)
201+
principalId: managedIdentiyADOtoAZ.outputs.miPrincipalID
202+
description: '${miADOtoAZname} Storage Account Blob Contributor access to subscription'
203+
}
204+
}
205+
195206
@description('Create the managed identity assumed by Github actions to trigger Azure devops pipelines')
196207
module managedIdentiyGHtoADO 'modules/managedIdentity.bicep' = {
197208
scope: managedIdentityRG

infrastructure/environments/nonlive-hub/variables.tfvars

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
deploy_database_as_container = false
21
features = {
32
front_door = false
43
hub_and_spoke = false
54
private_networking = false
65
}
76
fetch_secrets_from_app_key_vault = true
8-
github_mi_name = "mi-lungal-hub-ghtoaz-uks"
7+
github_mi_name = "mi-lungcs-hub-ghtoaz-uks"
98
# key_vault_secrets_officer_groups = ["Azure-Lung-Cancer-Screening---Dev-Owner"]
109
postgres_backup_retention_days = 7
1110
postgres_geo_redundant_backup_enabled = false

0 commit comments

Comments
 (0)