Skip to content

Commit

Permalink
Updated the resource gruop
Browse files Browse the repository at this point in the history
  • Loading branch information
danielscholl committed Nov 11, 2024
1 parent 013c980 commit 9e1204b
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 40 deletions.
76 changes: 38 additions & 38 deletions bicep/modules/blade_partition.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -669,49 +669,49 @@ module partitonNamespace 'br/public:avm/res/service-bus/namespace:0.9.1' = [for


// TODO: This should be moved to the Kubernetes Job.
module blobUpload 'br/public:avm/res/resources/deployment-script:0.4.0' = [for (partition, index) in partitions: {
name: '${bladeConfig.sectionName}-storage-blob-upload-${index}'
params: {
name: 'script-${storage[index].outputs.name}-Legal_COO'
location: location
cleanupPreference: 'Always'
retentionInterval: 'PT1H'
timeout: 'PT30M'
runOnce: true
// module blobUpload 'br/public:avm/res/resources/deployment-script:0.4.0' = [for (partition, index) in partitions: {
// name: '${bladeConfig.sectionName}-storage-blob-upload-${index}'
// params: {
// name: 'script-${storage[index].outputs.name}-Legal_COO'
// location: location
// cleanupPreference: 'Always'
// retentionInterval: 'PT1H'
// timeout: 'PT30M'
// runOnce: true

managedIdentities: {
userAssignedResourcesIds: [
stampIdentity.id
]
}

kind: 'AzureCLI'
azCliVersion: '2.63.0'
// managedIdentities: {
// userAssignedResourcesIds: [
// stampIdentity.id
// ]
// }

// kind: 'AzureCLI'
// azCliVersion: '2.63.0'

environmentVariables: [
{ name: 'CONTENT', value: loadTextContent('./deploy-scripts/Legal_COO.json') }
{ name: 'FILE_NAME', value: 'Legal_COO.json' }
{ name: 'CONTAINER', value: 'legal-service-azure-configuration' }
{ name: 'AZURE_STORAGE_ACCOUNT', value: storage[index].outputs.name }
]
scriptContent: loadTextContent('./deploy-scripts/blob_upload.sh')
}
}]
// environmentVariables: [
// { name: 'CONTENT', value: loadTextContent('./deploy-scripts/Legal_COO.json') }
// { name: 'FILE_NAME', value: 'Legal_COO.json' }
// { name: 'CONTAINER', value: 'legal-service-azure-configuration' }
// { name: 'AZURE_STORAGE_ACCOUNT', value: storage[index].outputs.name }
// ]
// scriptContent: loadTextContent('./deploy-scripts/blob_upload.sh')
// }
// }]


// TODO: ACL can only be applied after the blob upload.
module storageAcl './network_acl_storage.bicep' = [for (partition, index) in partitions: {
name: '${bladeConfig.sectionName}-storage-acl-${index}'
params: {
storageName: storage[index].outputs.name
location: location
skuName: partitionLayerConfig.storage.sku
natClusterIP: natClusterIP
}
dependsOn: [
blobUpload[index]
]
}]
// module storageAcl './network_acl_storage.bicep' = [for (partition, index) in partitions: {
// name: '${bladeConfig.sectionName}-storage-acl-${index}'
// params: {
// storageName: storage[index].outputs.name
// location: location
// skuName: partitionLayerConfig.storage.sku
// natClusterIP: natClusterIP
// }
// dependsOn: [
// blobUpload[index]
// ]
// }]

module partitionSecrets './keyvault_secrets_partition.bicep' = [for (partition, index) in partitions: {
name: '${bladeConfig.sectionName}-secrets-${index}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ spec:
storageaccount: {{ $storageAccount }}
containerName: {{ $.Values.blobUpload.container }}
clientID: {{ $.Values.blobUpload.clientId | default $.Values.azure.clientId }}
resourceGroup: {{ (lookup "v1" "ConfigMap" $.Release.Namespace "configmap-services").data.resource_group }}
resourceGroup: {{ $.Values.azure.resourceGroup }}
---
apiVersion: v1
kind: PersistentVolumeClaim
Expand Down Expand Up @@ -93,5 +93,4 @@ spec:
restartPolicy: Never
{{- end }}
{{- end }}
{{- end }}
{{- end }}

0 comments on commit 9e1204b

Please sign in to comment.