Skip to content

Commit c2819f6

Browse files
committed
wip
1 parent 133280d commit c2819f6

9 files changed

Lines changed: 29 additions & 16 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ variables:
3939
- name: TF_PLAN_ARTIFACT
4040
value: tf_plan_hub_art_NONLIVE_dev
4141
- name: ENVIRONMENT
42-
value: non-live-hub
42+
value: nonlive-hub
4343

4444
stages:
4545
- stage: terraform_plan

.gitleaksignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ infrastructure/bootstrap/hub.bicep:generic-api-key:56
2121
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
24+
infrastructure/bootstrap/hub.bicep:generic-api-key:60
2425
infrastructure/bootstrap/main.bicep:generic-api-key:29
2526
infrastructure/bootstrap/main.bicep:generic-api-key:30
2627
infrastructure/bootstrap/main.bicep:generic-api-key:31
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# AZURE_SUBSCRIPTION="Lung Cancer Risk Check - Non-live hub"
2-
AZURE_SUBSCRIPTION="Lung Cancer Screening - Dev"
1+
AZURE_SUBSCRIPTION="Lung Cancer Risk Check - Non-live hub"
2+
# AZURE_SUBSCRIPTION="Lung Cancer Screening - Dev"
33
BOOTSTRAP=hub
44
HUB_TYPE=nonlive

infrastructure/bootstrap/hub.bicep

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ param enableSoftDelete bool
3131
// var keyVaultName = 'kv-lungcs-${envConfig}-inf'
3232

3333
// removed when generalised
34-
// var appShortName = 'lungcs'
35-
var appShortName = 'lungal'
34+
var appShortName = 'lungcs'
35+
//var appShortName = 'lungal'
3636

3737
var devCenterSuffix = substring(uniqueString(subscription().id), 0, 3)
3838
var devCenterName = 'devc-hub-${hubType}-${regionShortName}-${devCenterSuffix}'
@@ -58,6 +58,7 @@ var roleID = {
5858
networkContributor: '4d97b98b-1d4f-4787-a291-c67834d212e7'
5959
rbacAdmin: 'f58310d9-a9f6-439a-9e8d-f62e7b41a168'
6060
reader: 'acdd72a7-3385-48ef-bd42-f606fba81ae7'
61+
contributor: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
6162
}
6263

6364

@@ -181,6 +182,16 @@ resource CDNContributorAssignment 'Microsoft.Authorization/roleAssignments@2022-
181182
}
182183
}
183184

185+
@description('Let the managed identity configure terraform')
186+
resource TerraformContributorAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
187+
name: guid(subscription().subscriptionId, hubType, 'TerraformContributor')
188+
properties: {
189+
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleID.contributor)
190+
principalId: managedIdentiyADOtoAZ.outputs.miPrincipalID
191+
description: '${miADOtoAZname} Terraform Contributor access to subscription'
192+
}
193+
}
194+
184195
@description('Create the managed identity assumed by Github actions to trigger Azure devops pipelines')
185196
module managedIdentiyGHtoADO 'modules/managedIdentity.bicep' = {
186197
scope: managedIdentityRG

infrastructure/bootstrap/modules/managedDevopsPool.bicep

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ param devopsSubnetName string
1212
param devopsSubnetAddressPrefix string
1313
param virtualNetworkName string
1414

15-
param fabricProfileSkuName string = 'Standard_D2ads_v5'
15+
// param fabricProfileSkuName string = 'Standard_D2ads_v5'
16+
param fabricProfileSkuName string = 'Standard_D2as_v5'
1617
//param fabricProfileSkuName string = 'Standard_D2ldsv6'
1718
//param fabricProfileSkuName string = 'Standard_B4ms'
1819

infrastructure/environments/non-live-hub/variables.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
ENVIRONMENT=nonlive-hub
2+
ENV_CONFIG=nonlive-hub
3+
AZURE_SUBSCRIPTION="Lung Cancer Risk Check - Non-live hub"
4+
HUB_SUBSCRIPTION="Lung Cancer Risk Check - Non-live hub"
5+
STORAGE_ACCOUNT_RG=rg-tfstate-nonlive-hub-uks
6+
TERRAFORM_MODULES_REF=main
7+
# ENABLE_SOFT_DELETE=false
8+
# DOCKER_IMAGE=ghcr.io/nhsdigital/lung_cancer_screening

infrastructure/environments/non-live-hub/variables.tfvars renamed to infrastructure/environments/nonlive-hub/variables.tfvars

File renamed without changes.

scripts/terraform/terraform.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
REGION=uksouth
2-
# APP_SHORT_NAME=lungcs
3-
APP_SHORT_NAME=lungal
2+
APP_SHORT_NAME=lungcs
3+
# APP_SHORT_NAME=lungal
44
bootstrap:
55
az deployment sub create --confirm-with-what-if \
66
--subscription ${AZURE_SUBSCRIPTION} \

0 commit comments

Comments
 (0)