Resolve Department Number to a Department Name and Log to Log Analytics (#226)

* add department name

* add valid dept num to test pipeline

* update add-tenantinfo

* departmentNumber setup.md
This commit is contained in:
Matthew Bratschun 2022-11-14 11:21:12 -07:00 коммит произвёл GitHub
Родитель 7183a0f4c0
Коммит 239a838406
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
10 изменённых файлов: 221 добавлений и 61 удалений

Просмотреть файл

@ -238,7 +238,7 @@ steps:
"SecondBreakGlassAccountUPN": "breakglass2@$(testTenantDomain)",
"PBMMPolicyID": "4c4a5f27-de81-430b-b4e5-9cbd50595a87",
"AllowedLocationPolicyId": "e56962a6-4747-49cd-b67b-bf8b01975c4c",
"DepartmentNumber": "",
"DepartmentNumber": "190",
"CBSSubscriptionName": "$(CBSSubscriptionName)",
"SecurityLAWResourceId": "/subscriptions/$(testSubscriptionId)/resourceGroups/rg-core/providers/Microsoft.OperationalInsights/workspaces/mtb-law01",
"HealthLAWResourceId": "/subscriptions/$(testSubscriptionId)/resourceGroups/rg-core/providers/Microsoft.OperationalInsights/workspaces/mtb-law01",
@ -292,7 +292,7 @@ steps:
"SecondBreakGlassAccountUPN": "breakglass2@$(testTenantDomain)",
"PBMMPolicyID": "4c4a5f27-de81-430b-b4e5-9cbd50595a87",
"AllowedLocationPolicyId": "e56962a6-4747-49cd-b67b-bf8b01975c4c",
"DepartmentNumber": "",
"DepartmentNumber": "190",
"CBSSubscriptionName": "$(CBSSubscriptionName)",
"SecurityLAWResourceId": "/subscriptions/$(testSubscriptionId)/resourceGroups/rg-core/providers/Microsoft.OperationalInsights/workspaces/mtb-law01",
"HealthLAWResourceId": "/subscriptions/$(testSubscriptionId)/resourceGroups/rg-core/providers/Microsoft.OperationalInsights/workspaces/mtb-law01",

Просмотреть файл

@ -63,7 +63,7 @@ All named resources will have the first 6 characters of the tenant Id appended t
|SecondBreakGlassAccountUPN| UPN for the second break glass account|
|PBMMPolicyID|Guid of the PBMM applied policy. 4c4a5f27-de81-430b-b4e5-9cbd50595a87 is the default Id but a customized version may have been used.|
|AllowedLocationPolicyId|Guid for the Allowed Location policy. e56962a6-4747-49cd-b67b-bf8b01975c4c is the default|
|DepartmentNumber| a number to be used by module 4 when looking for the existence of the monitoring account in Azure AD|
|DepartmentNumber| The office Government of Canada department number - see: https://open.canada.ca/data/en/dataset/22090865-f8a6-4b83-9bad-e9d61f26a821 |
|CBSSubscriptionName|Subscription Name containing the CBS solution. This subscription will be used to find the required components. **This subscription will also be excluded from checks.**|
|SecurityLAWResourceId|Full resource Id of the Log analytics workspace used for Security (/subscriptions/...)|
|HealthLAWResourceId|Full resource Id of the Log analytics workspace used for resource Health (/subscriptions/...)|

Просмотреть файл

@ -1,30 +1,31 @@
//Scope
targetScope = 'resourceGroup'
//Parameters and variables
param storageAccountName string
param subscriptionId string
param location string = 'canadacentral'
param kvName string = 'guardrails-kv'
param automationAccountName string = 'guardrails-AC'
param logAnalyticsWorkspaceName string = 'guardrails-LAW'
param PBMMPolicyID string = '4c4a5f27-de81-430b-b4e5-9cbd50595a87'
param AllowedLocationPolicyId string = 'e56962a6-4747-49cd-b67b-bf8b01975c4c'
param automationAccountName string = 'guardrails-AC'
param CBSSubscriptionName string
param CustomModulesBaseURL string = 'https://github.com/Azure/GuardrailsSolutionAccelerator/raw/main/psmodules'
param DepartmentNumber string
param DepartmentName string
param deployKV bool = true
param deployLAW bool = true
param CBSSubscriptionName string
param SecurityLAWResourceId string
param HealthLAWResourceId string
param CustomModulesBaseURL string = 'https://github.com/Azure/GuardrailsSolutionAccelerator/raw/main/psmodules'
param DeployTelemetry bool = true
param Locale string = 'EN'
param releaseVersion string
param releaseDate string
param TenantDomainUPN string
param HealthLAWResourceId string
param kvName string = 'guardrails-kv'
param lighthouseTargetManagementGroupID string
param Locale string = 'EN'
param location string = 'canadacentral'
param logAnalyticsWorkspaceName string = 'guardrails-LAW'
param newDeployment bool = true
param updateWorkbook bool = false
param PBMMPolicyID string = '4c4a5f27-de81-430b-b4e5-9cbd50595a87'
param releaseDate string
param releaseVersion string
param SecurityLAWResourceId string
param storageAccountName string
param subscriptionId string
param TenantDomainUPN string
param updatePSModules bool = false
param updateWorkbook bool = false
var containername = 'guardrailsstorage'
var GRDocsBaseUrl='https://github.com/Azure/GuardrailsSolutionAccelerator/docs/'
var vaultUri = 'https://${kvName}.vault.azure.net/'
@ -38,25 +39,26 @@ module telemetry './nested_telemetry.bicep' = if (DeployTelemetry) {
module aa 'modules/automationaccount.bicep' = if (newDeployment || updatePSModules) {
name: 'guardrails-automationaccount'
params: {
automationAccountName: automationAccountName
location: location
containername: containername
PBMMPolicyID: PBMMPolicyID
AllowedLocationPolicyId: AllowedLocationPolicyId
DepartmentNumber: DepartmentNumber
automationAccountName: automationAccountName
CBSSubscriptionName: CBSSubscriptionName
SecurityLAWResourceId: SecurityLAWResourceId
HealthLAWResourceId: HealthLAWResourceId
containername: containername
CustomModulesBaseURL: CustomModulesBaseURL
Locale: Locale
DepartmentNumber: DepartmentNumber
DepartmentName: DepartmentName
guardrailsKVname: kvName
guardrailsLogAnalyticscustomerId: LAW.outputs.logAnalyticsWorkspaceId
guardrailsStoragename: storageAccountName
releaseVersion: releaseVersion
releaseDate: releaseDate
TenantDomainUPN: TenantDomainUPN
HealthLAWResourceId: HealthLAWResourceId
lighthouseTargetManagementGroupID: lighthouseTargetManagementGroupID
Locale: Locale
location: location
newDeployment: newDeployment
PBMMPolicyID: PBMMPolicyID
releaseDate: releaseDate
releaseVersion: releaseVersion
SecurityLAWResourceId: SecurityLAWResourceId
TenantDomainUPN: TenantDomainUPN
updatePSModules: updatePSModules
}
}

Просмотреть файл

@ -1,22 +1,23 @@
param automationAccountName string
param location string
param releaseVersion string
param releaseDate string
param CustomModulesBaseURL string
param guardrailsLogAnalyticscustomerId string
param guardrailsKVname string
param guardrailsStoragename string
param PBMMPolicyID string
param containername string
param AllowedLocationPolicyId string
param DepartmentNumber string
param automationAccountName string
param CBSSubscriptionName string
param SecurityLAWResourceId string
param containername string
param CustomModulesBaseURL string
param DepartmentNumber string
param DepartmentName string
param guardrailsKVname string
param guardrailsLogAnalyticscustomerId string
param guardrailsStoragename string
param HealthLAWResourceId string
param TenantDomainUPN string
param Locale string
param lighthouseTargetManagementGroupID string
param Locale string
param location string
param newDeployment bool = true
param PBMMPolicyID string
param releaseDate string
param releaseVersion string
param SecurityLAWResourceId string
param TenantDomainUPN string
param updatePSModules bool = false
resource guardrailsAC 'Microsoft.Automation/automationAccounts@2021-06-22' = if (newDeployment || updatePSModules) {
@ -353,5 +354,13 @@ resource module14 'modules' = if (newDeployment || updatePSModules) {
'value': '"${lighthouseTargetManagementGroupID}"'
}
}
resource variable17 'variables' = if (newDeployment) {
name: 'DepartmentName'
'properties': {
'isEncrypted': true
'value': '"${DepartmentName}"'
}
}
}
output guardrailsAutomationAccountMSI string = guardrailsAC.identity.principalId

Просмотреть файл

@ -10,6 +10,8 @@ $ReportTime=(get-date).tostring("yyyy-MM-dd HH:mm:ss")
#$StorageAccountName=Get-AutomationVariable -Name "StorageAccountName"
$Locale=Get-AutomationVariable -Name "GuardRailsLocale"
$lighthouseTargetManagementGroupID = Get-AutomationVariable -Name lighthouseTargetManagementGroupID -ErrorAction SilentlyContinue
$DepartmentName = Get-AutomationVariable -Name "DepartmentName"
$DepartmentNumber = Get-AutomationVariable -Name "DepartmentNumber"
# Connects to Azure using the Automation Account's managed identity
try {
@ -36,7 +38,7 @@ get-itsgdata -URL $itsgURL -WorkSpaceID $WorkSpaceID -workspaceKey $WorkspaceKey
Check-UpdateAvailable -WorkSpaceID $WorkSpaceID -WorkspaceKey $WorkspaceKey -ReportTime $ReportTime
# Updates Tenant info.
Add-TenantInfo -WorkSpaceID $WorkSpaceID -WorkspaceKey $WorkspaceKey -ReportTime $ReportTime -TenantId $tenantID
Add-TenantInfo -WorkSpaceID $WorkSpaceID -WorkspaceKey $WorkspaceKey -ReportTime $ReportTime -TenantId $tenantID -DepartmentName $DepartmentName -DepartmentNumber $DepartmentNumber
# Ensure the 'Microsoft.ManagedServices' resource provider is registered under each subscription at the delegated management group
If ($lighthouseTargetManagementGroupID) {

107
setup/departmentList.csv Normal file
Просмотреть файл

@ -0,0 +1,107 @@
Department_number-Ministère_numéro,Department-name_English-Ministère_nom_anglais,Department_name_French-Ministère_nom_français
"001","Agriculture and Agri-Food (Department of)","Agriculture et de l'Agroalimentaire (Ministère de l')"
"002","Office of the Auditor General","Bureau du vérificateur général"
"004","Public Service Commission","Commission de la fonction publique"
"005","Foreign Affairs, Trade and Development (Department of)","Affaires étrangères, du Commerce et du Développement (Ministère des)"
"006","Finance (Department of)","Finances (Ministère des)"
"007","Environment (Department of the)","Environnement (Ministère de l')"
"008","Office of the Governor General's Secretary","Bureau du secrétaire du gouverneur général"
"009","Senate","Sénat"
"011","Office of the Superintendent of Financial Institutions","Bureau du surintendant des institutions financières"
"012","Economic Development Agency of Canada for the Regions of Quebec","Agence de développement économique du Canada pour les régions du Québec"
"013","Justice (Department of)","Justice (Ministère de la)"
"014","Employment and Social Development (Department of)","Emploi et du Développement social (Ministère de l')"
"015","Office of the Chief Electoral Officer","Bureau du directeur général des élections"
"016","Canadian Radio-television and Telecommunications Commission","Conseil de la radiodiffusion et des télécommunications canadiennes"
"017","Library of Parliament","Bibliothèque du Parlement"
"018","National Defence (Department of)","Défense nationale (Ministère de la)"
"019","Office of the Director of Public Prosecutions","Bureau du directeur des poursuites pénales"
"021","Veterans Affairs (Department of)","Anciens Combattants (Ministère des)"
"022","Health (Department of)","Santé (Ministère de la)"
"023","Atlantic Canada Opportunities Agency","Agence de promotion économique du Canada atlantique"
"024","International Joint Commission (Canadian Section)","Commission mixte internationale (section canadienne)"
"025","Privy Council Office","Bureau du Conseil privé"
"027","Natural Sciences and Engineering Research Council","Conseil de recherches en sciences naturelles et en génie"
"030","Royal Canadian Mounted Police","Gendarmerie royale du Canada"
"032","Immigration and Refugee Board","Commission de l'immigration et du statut de réfugié"
"033","Industry (Department of)","Industrie (Ministère de l')"
"034","Transport (Department of)","Transports (Ministère des)"
"035","National Research Council of Canada","Conseil national de recherches du Canada"
"037","Telefilm Canada","Téléfilm Canada"
"038","Canada Border Services Agency - (Administered Activities)","Agence des services frontaliers du Canada - (activités administrées)"
"039","National Film Board","Office national du film"
"040","Canadian Transportation Agency","Office des transports du Canada"
"041","Natural Resources (Department of)","Ressources naturelles (Ministère des)"
"042","Department of Crown-Indigenous Relations and Northern Affairs","Ministère des Relations Couronne-Autochtones et des Affaires du Nord"
"043","Canadian Intergovernmental Conference Secretariat","Secrétariat des conférences intergouvernementales canadiennes"
"044","Western Economic Diversification (Department of)","Diversification de l'économie de l'Ouest canadien (Ministère de la)"
"046","Office of the Public Sector Integrity Commissioner","Commissariat à l'intégrité du secteur public"
"047","Canadian Nuclear Safety Commission","Commission canadienne de sûreté nucléaire"
"050","Citizenship and Immigration (Department of)","Citoyenneté et de l'Immigration (Ministère de la)"
"051","Office of the Commissioner for Federal Judicial Affairs","Bureau du commissaire à la magistrature fédérale"
"052","Canada School of Public Service","École de la fonction publique du Canada"
"053","Correctional Service of Canada","Service correctionnel du Canada"
"054","Statistics Canada","Statistique Canada"
"056","Treasury Board Secretariat","Secrétariat du Conseil du Trésor"
"057","Parole Board of Canada","Commission des libérations conditionnelles du Canada"
"061","Canadian Institutes of Health Research","Instituts de recherche en santé du Canada"
"062","Federal Economic Development Agency for Southern Ontario","Agence fédérale de développement économique pour le Sud de l'Ontario"
"063","Social Sciences and Humanities Research Council","Conseil de recherches en sciences humaines"
"066","Northern Pipeline Agency","Administration du pipe-line du Nord"
"067","House of Commons","Chambre des communes"
"075","Canadian Human Rights Commission","Commission canadienne des droits de la personne"
"076","Office of the Commissioner of Official Languages","Commissariat aux langues officielles"
"078","Canadian Northern Economic Development Agency","Agence canadienne de développement économique du Nord"
"079","Payroll System General Ledger","Grand livre général du système de la paye"
"080","Registrar of the Supreme Court of Canada","Registraire de la Cour suprême du Canada"
"085","Canada Border Services Agency","Agence des services frontaliers du Canada"
"086","Fisheries and Oceans (Department of)","Pêches et des Océans (Ministère des)"
"087","Public Service Superannuation","Pension de retraite de la fonction publique"
"088","Public Safety and Emergency Preparedness (Department of)","Sécurité publique et de la Protection civile (Ministère de la)"
"091","Canada Mortgage and Housing Corporation (Crown Corporation)","Société canadienne d'hypothèques et de logement (Société d'État)"
"095","Canadian Security Intelligence Service","Service canadien du renseignement de sécurité"
"096","Offices of the Information and Privacy Commissioners of Canada","Commissariats à l'information et à la protection de la vie privée au Canada"
"097","Receiver General","Receveur général"
"100","Canadian Centre for Occupational Health and Safety","Centre canadien d'hygiène et de sécurité au travail"
"101","Canadian Transportation Accident Investigation and Safety Board","Bureau canadien d'enquête sur les accidents de transport et de la sécurité des transports"
"102","The National Battlefields Commission","Commission des champs de bataille nationaux"
"109","Patented Medicine Prices Review Board","Conseil d'examen du prix des médicaments brevetés"
"116","Copyright Board","Commission du droit d'auteur"
"119","Canadian Space Agency","Agence spatiale canadienne"
"122","Canada Revenue Agency - (Administered Activities)","Agence du revenu du Canada - (activités administrées)"
"123","Export Development Canada (Crown Corporation)","Exportation et développement Canada (Société d'État)"
"124","Parks Canada Agency","Agence Parcs Canada"
"127","Public Works and Government Services (Department of)","Travaux publics et des Services gouvernementaux (Ministère des)"
"130","Canada Revenue Agency","Agence du revenu du Canada"
"131","Law Commission of Canada","Commission du droit du Canada"
"133","Canadian Grain Commission","Commission canadienne des grains"
"134","Canadian Dairy Commission","Commission canadienne du lait"
"135","Canadian Heritage (Department of)","Patrimoine canadien (Ministère du)"
"136","Canadian Food Inspection Agency","Agence canadienne d'inspection des aliments"
"137","Military Police Complaints Commission","Commission d'examen des plaintes concernant la police militaire"
"138","Military Grievances External Review Committee","Comité externe d'examen des griefs militaires"
"139","Financial Transactions and Reports Analysis Centre of Canada","Centre d'analyse des opérations et déclarations financières du Canada"
"141","Financial Consumer Agency of Canada","Agence de la consommation en matière financière du Canada"
"142","Office of Infrastructure of Canada","Bureau de l'infrastructure du Canada"
"144","Courts Administration Service","Service administratif des tribunaux judiciaires"
"145","Library and Archives of Canada","Bibliothèque et Archives du Canada"
"147","Office of the Conflict of Interest and Ethics Commissioner","Bureau du commissaire aux conflits d'intérêts et à l'éthique"
"148","Public Health Agency of Canada","Agence de la santé publique du Canada"
"151","Office of the Senate Ethics Officer","Bureau du conseiller sénatorial en éthique"
"154","Office of the Commissioner of Lobbying","Commissariat au lobbying"
"163","Shared Services Canada","Services partagés Canada"
"165","Communications Security Establishment","Centre de la sécurité des télécommunications"
"170","Administrative Tribunals Support Service of Canada","Service canadien d'appui aux tribunaux administratifs"
"171","Canadian High Arctic Research Station","Station canadienne de recherche dans l'Extrême-Arctique"
"176","Parliamentary Protective Service","Service de protection parlementaire"
"180","Invest in Canada Hub","Investir au Canada"
"183","Office of the Parliamentary Budget Officer","Bureau du directeur parlementaire du budget"
"190","Department for Women and Gender Equality","Ministère des Femmes et de l'Égalité des genres"
"191","Department of Indigenous Services","Ministère des Services aux Autochtones"
"192","Secretariat of the National Security and Intelligence Committee of Parliamentarians","Secrétariat du Comité des parlementaires sur la sécurité nationale et le renseignement"
"193","Leaders' Debates Commission","Commission des débats des chefs"
"195","Canadian Energy Regulator","Régie canadienne de l'énergie"
"196","National Security and Intelligence Review Agency Secretariat","Secrétariat de l'Office de surveillance des activités en matière de sécurité nationale et de renseignement"
"197","Office of the Intelligence Commissioner","Bureau du commissaire au renseignement"
"199","Canadian Accessibility Standards Development Organization","Organisation canadienne d'élaboration de normes d'accessibilité"
"200","Federal Economic Development Agency for Northern Ontario","Agence fédérale de développement économique pour le Nord de l'Ontario"
1 Department_number-Ministère_numéro Department-name_English-Ministère_nom_anglais Department_name_French-Ministère_nom_français
2 001 Agriculture and Agri-Food (Department of) Agriculture et de l'Agroalimentaire (Ministère de l')
3 002 Office of the Auditor General Bureau du vérificateur général
4 004 Public Service Commission Commission de la fonction publique
5 005 Foreign Affairs, Trade and Development (Department of) Affaires étrangères, du Commerce et du Développement (Ministère des)
6 006 Finance (Department of) Finances (Ministère des)
7 007 Environment (Department of the) Environnement (Ministère de l')
8 008 Office of the Governor General's Secretary Bureau du secrétaire du gouverneur général
9 009 Senate Sénat
10 011 Office of the Superintendent of Financial Institutions Bureau du surintendant des institutions financières
11 012 Economic Development Agency of Canada for the Regions of Quebec Agence de développement économique du Canada pour les régions du Québec
12 013 Justice (Department of) Justice (Ministère de la)
13 014 Employment and Social Development (Department of) Emploi et du Développement social (Ministère de l')
14 015 Office of the Chief Electoral Officer Bureau du directeur général des élections
15 016 Canadian Radio-television and Telecommunications Commission Conseil de la radiodiffusion et des télécommunications canadiennes
16 017 Library of Parliament Bibliothèque du Parlement
17 018 National Defence (Department of) Défense nationale (Ministère de la)
18 019 Office of the Director of Public Prosecutions Bureau du directeur des poursuites pénales
19 021 Veterans Affairs (Department of) Anciens Combattants (Ministère des)
20 022 Health (Department of) Santé (Ministère de la)
21 023 Atlantic Canada Opportunities Agency Agence de promotion économique du Canada atlantique
22 024 International Joint Commission (Canadian Section) Commission mixte internationale (section canadienne)
23 025 Privy Council Office Bureau du Conseil privé
24 027 Natural Sciences and Engineering Research Council Conseil de recherches en sciences naturelles et en génie
25 030 Royal Canadian Mounted Police Gendarmerie royale du Canada
26 032 Immigration and Refugee Board Commission de l'immigration et du statut de réfugié
27 033 Industry (Department of) Industrie (Ministère de l')
28 034 Transport (Department of) Transports (Ministère des)
29 035 National Research Council of Canada Conseil national de recherches du Canada
30 037 Telefilm Canada Téléfilm Canada
31 038 Canada Border Services Agency - (Administered Activities) Agence des services frontaliers du Canada - (activités administrées)
32 039 National Film Board Office national du film
33 040 Canadian Transportation Agency Office des transports du Canada
34 041 Natural Resources (Department of) Ressources naturelles (Ministère des)
35 042 Department of Crown-Indigenous Relations and Northern Affairs Ministère des Relations Couronne-Autochtones et des Affaires du Nord
36 043 Canadian Intergovernmental Conference Secretariat Secrétariat des conférences intergouvernementales canadiennes
37 044 Western Economic Diversification (Department of) Diversification de l'économie de l'Ouest canadien (Ministère de la)
38 046 Office of the Public Sector Integrity Commissioner Commissariat à l'intégrité du secteur public
39 047 Canadian Nuclear Safety Commission Commission canadienne de sûreté nucléaire
40 050 Citizenship and Immigration (Department of) Citoyenneté et de l'Immigration (Ministère de la)
41 051 Office of the Commissioner for Federal Judicial Affairs Bureau du commissaire à la magistrature fédérale
42 052 Canada School of Public Service École de la fonction publique du Canada
43 053 Correctional Service of Canada Service correctionnel du Canada
44 054 Statistics Canada Statistique Canada
45 056 Treasury Board Secretariat Secrétariat du Conseil du Trésor
46 057 Parole Board of Canada Commission des libérations conditionnelles du Canada
47 061 Canadian Institutes of Health Research Instituts de recherche en santé du Canada
48 062 Federal Economic Development Agency for Southern Ontario Agence fédérale de développement économique pour le Sud de l'Ontario
49 063 Social Sciences and Humanities Research Council Conseil de recherches en sciences humaines
50 066 Northern Pipeline Agency Administration du pipe-line du Nord
51 067 House of Commons Chambre des communes
52 075 Canadian Human Rights Commission Commission canadienne des droits de la personne
53 076 Office of the Commissioner of Official Languages Commissariat aux langues officielles
54 078 Canadian Northern Economic Development Agency Agence canadienne de développement économique du Nord
55 079 Payroll System General Ledger Grand livre général du système de la paye
56 080 Registrar of the Supreme Court of Canada Registraire de la Cour suprême du Canada
57 085 Canada Border Services Agency Agence des services frontaliers du Canada
58 086 Fisheries and Oceans (Department of) Pêches et des Océans (Ministère des)
59 087 Public Service Superannuation Pension de retraite de la fonction publique
60 088 Public Safety and Emergency Preparedness (Department of) Sécurité publique et de la Protection civile (Ministère de la)
61 091 Canada Mortgage and Housing Corporation (Crown Corporation) Société canadienne d'hypothèques et de logement (Société d'État)
62 095 Canadian Security Intelligence Service Service canadien du renseignement de sécurité
63 096 Offices of the Information and Privacy Commissioners of Canada Commissariats à l'information et à la protection de la vie privée au Canada
64 097 Receiver General Receveur général
65 100 Canadian Centre for Occupational Health and Safety Centre canadien d'hygiène et de sécurité au travail
66 101 Canadian Transportation Accident Investigation and Safety Board Bureau canadien d'enquête sur les accidents de transport et de la sécurité des transports
67 102 The National Battlefields Commission Commission des champs de bataille nationaux
68 109 Patented Medicine Prices Review Board Conseil d'examen du prix des médicaments brevetés
69 116 Copyright Board Commission du droit d'auteur
70 119 Canadian Space Agency Agence spatiale canadienne
71 122 Canada Revenue Agency - (Administered Activities) Agence du revenu du Canada - (activités administrées)
72 123 Export Development Canada (Crown Corporation) Exportation et développement Canada (Société d'État)
73 124 Parks Canada Agency Agence Parcs Canada
74 127 Public Works and Government Services (Department of) Travaux publics et des Services gouvernementaux (Ministère des)
75 130 Canada Revenue Agency Agence du revenu du Canada
76 131 Law Commission of Canada Commission du droit du Canada
77 133 Canadian Grain Commission Commission canadienne des grains
78 134 Canadian Dairy Commission Commission canadienne du lait
79 135 Canadian Heritage (Department of) Patrimoine canadien (Ministère du)
80 136 Canadian Food Inspection Agency Agence canadienne d'inspection des aliments
81 137 Military Police Complaints Commission Commission d'examen des plaintes concernant la police militaire
82 138 Military Grievances External Review Committee Comité externe d'examen des griefs militaires
83 139 Financial Transactions and Reports Analysis Centre of Canada Centre d'analyse des opérations et déclarations financières du Canada
84 141 Financial Consumer Agency of Canada Agence de la consommation en matière financière du Canada
85 142 Office of Infrastructure of Canada Bureau de l'infrastructure du Canada
86 144 Courts Administration Service Service administratif des tribunaux judiciaires
87 145 Library and Archives of Canada Bibliothèque et Archives du Canada
88 147 Office of the Conflict of Interest and Ethics Commissioner Bureau du commissaire aux conflits d'intérêts et à l'éthique
89 148 Public Health Agency of Canada Agence de la santé publique du Canada
90 151 Office of the Senate Ethics Officer Bureau du conseiller sénatorial en éthique
91 154 Office of the Commissioner of Lobbying Commissariat au lobbying
92 163 Shared Services Canada Services partagés Canada
93 165 Communications Security Establishment Centre de la sécurité des télécommunications
94 170 Administrative Tribunals Support Service of Canada Service canadien d'appui aux tribunaux administratifs
95 171 Canadian High Arctic Research Station Station canadienne de recherche dans l'Extrême-Arctique
96 176 Parliamentary Protective Service Service de protection parlementaire
97 180 Invest in Canada Hub Investir au Canada
98 183 Office of the Parliamentary Budget Officer Bureau du directeur parlementaire du budget
99 190 Department for Women and Gender Equality Ministère des Femmes et de l'Égalité des genres
100 191 Department of Indigenous Services Ministère des Services aux Autochtones
101 192 Secretariat of the National Security and Intelligence Committee of Parliamentarians Secrétariat du Comité des parlementaires sur la sécurité nationale et le renseignement
102 193 Leaders' Debates Commission Commission des débats des chefs
103 195 Canadian Energy Regulator Régie canadienne de l'énergie
104 196 National Security and Intelligence Review Agency Secretariat Secrétariat de l'Office de surveillance des activités en matière de sécurité nationale et de renseignement
105 197 Office of the Intelligence Commissioner Bureau du commissaire au renseignement
106 199 Canadian Accessibility Standards Development Organization Organisation canadienne d'élaboration de normes d'accessibilité
107 200 Federal Economic Development Agency for Northern Ontario Agence fédérale de développement économique pour le Nord de l'Ontario

Просмотреть файл

@ -12,7 +12,7 @@
RootModule = '.\gr-common.psm1'
# Version number of this module.
ModuleVersion = '1.1.4'
ModuleVersion = '1.1.5'
# Supported PSEditions
# CompatiblePSEditions = @()

Просмотреть файл

@ -233,13 +233,21 @@ Function Add-TenantInfo {
$ReportTime,
[Parameter(Mandatory=$true)]
[string]
$TenantId
$TenantId,
[Parameter(Mandatory=$true)]
[string]
$DepartmentName,
[Parameter(Mandatory=$true)]
[string]
$DepartmentNumber
)
$tenantInfo=Get-AutomationVariable("tenantDomainUPN")
$object = [PSCustomObject]@{
TenantDomain = $tenantInfo
DepartmentTenantID = $TenantId
ReportTime = $ReportTime
DepartmentName = $DepartmentName
DepartmentNumber = $DepartmentNumber
}
Write-Output $tenantInfo
$JSON= ConvertTo-Json -inputObject $object

Просмотреть файл

@ -139,6 +139,34 @@ Function Confirm-GSAConfigurationParameters {
Break
}
# verify that Department Number has an associated Department Name, get name value for AA variable
try {
$uri = 'https://donnees-data.tpsgc-pwgsc.gc.ca/ba1/min-dept/min-dept.csv'
$response = Invoke-RestMethod -Method GET -Uri $uri -StatusCodeVariable statusCode -ErrorAction Stop -ResponseHeadersVariable h
}
catch {
Write-Error "Error retrieving department list from '$uri'. Verify that you have access to the internet. Falling back to local department list, which may be outdated."
$departmentList = Import-Csv -Path "$PSScriptRoot/../../../../setup/departmentList.csv"
}
If ($statusCode -eq 200) {
try {
$departmentList = $response | ConvertFrom-CSV -ErrorAction Stop
}
catch {
Write-Error "Error converting department list from CSV to hashtable. Verify that the CSV format and response is valid!"
break
}
If ($departmentList.'Department_number-Ministère_numéro' -notcontains $config.DepartmentNumber) {
Write-Error "Department Number '$($config.DepartmentNumber)' is not a valid department number or is not found in this GOC-published list: $uri. Verify that the department number is correct and that the published list is accurate."
$departmentName = 'Department_Name_Unknown'
}
Else {
$departmentName = $departmentList | Where-Object { $_.'Department_number-Ministère_numéro' -eq $config.DepartmentNumber } | Select-Object -ExpandProperty 'Department-name_English-Ministère_nom_anglais'
}
}
# get tenant id from curent context
$context = Get-AzContext
$tenantId = $context.Tenant.Id
@ -171,6 +199,9 @@ Function Confirm-GSAConfigurationParameters {
# generate run-time config parameters
$config['runtime'] = @{}
## add department name
$config['runtime']['DepartmentName'] = $departmentName
## confirm subscription selection
Confirm-GSASubscriptionSelection -config $config

Просмотреть файл

@ -48,25 +48,26 @@ Function New-GSACoreResourceDeploymentParamObject {
Write-Verbose "Creating bicep parameters file for this deployment."
$templateParameterObject = @{
'kvName' = $config['runtime']['keyVaultName']
'location' = $config.region
'storageAccountName' = $config['runtime']['storageaccountName']
'logAnalyticsWorkspaceName' = $config['runtime']['logAnalyticsworkspaceName']
'AllowedLocationPolicyId' = $config.AllowedLocationPolicyId
'automationAccountName' = $config['runtime']['autoMationAccountName']
'subscriptionId' = (Get-AzContext).Subscription.Id
'PBMMPolicyID' = $config.PBMMPolicyID
'CBSSubscriptionName' = $config.CBSSubscriptionName
'DepartmentNumber' = $config.DepartmentNumber
'DepartmentName' = $config['runtime']['departmentName']
'deployKV' = $config['runtime']['deployKV']
'deployLAW' = $config['runtime']['deployLAW']
'AllowedLocationPolicyId' = $config.AllowedLocationPolicyId
'DepartmentNumber' = $config.DepartmentNumber
'CBSSubscriptionName' = $config.CBSSubscriptionName
'SecurityLAWResourceId' = $config.SecurityLAWResourceId
'HealthLAWResourceId' = $config.HealthLAWResourceId
'releaseVersion' = $config['runtime']['tagsTable'].ReleaseVersion
'releasedate' = $config['runtime']['tagsTable'].ReleaseDate
'Locale' = $config.Locale
'tenantDomainUPN' = $config['runtime']['tenantDomainUPN']
'kvName' = $config['runtime']['keyVaultName']
'lighthouseTargetManagementGroupID' = $config.lighthouseTargetManagementGroupID
'Locale' = $config.Locale
'location' = $config.region
'logAnalyticsWorkspaceName' = $config['runtime']['logAnalyticsworkspaceName']
'PBMMPolicyID' = $config.PBMMPolicyID
'releasedate' = $config['runtime']['tagsTable'].ReleaseDate
'releaseVersion' = $config['runtime']['tagsTable'].ReleaseVersion
'SecurityLAWResourceId' = $config.SecurityLAWResourceId
'storageAccountName' = $config['runtime']['storageaccountName']
'subscriptionId' = (Get-AzContext).Subscription.Id
'tenantDomainUPN' = $config['runtime']['tenantDomainUPN']
}
# Adding URL parameter if specified
[regex]$alternateURIRegex = '(https://github.com/.+?/(raw|archive)/.*?/psmodules)|(https://.+?\.blob\.core\.windows\.net/psmodules)'