[PowerShell] Get-FinOpsHub (0.3)
📝 Scenario
As a hub admin, I need to get hub metadata in order to confirm the hub is setup correctly
💎 Solution
Update the Get-FinOpsHub command to include new settings and resources in 0.3.
⛔ Blocked
- Sync
features/exportsintodev, then intofeatures/powershell
Synopsis, syntax, description, and parameters should not change. We only need to update the output.
{
// ID is added as a cm-resource-parent tag to all deployed resources as part of the bicep code
id: "/subscriptions/.../resourceGroups/.../providers/Microsoft.Cloud/hubs/...",
// Type and name can be parsed out of the ID
type: "Microsoft.Cloud/hubs",
name: "...",
// Location would be pulled from the resources
location: "...",
properties: {
// Version, retention, and scopes pulled from settings.json
version: "0.3",
retention: {
ingestion: {
months: 13,
},
msexports: {
days: 0,
},
},
scopes: [{
scope: "...",
}],
// Resources determined at runtime via tags or saved in settings.json (TBD)
resources: {
dataFactory: "<data-factory-id>",
keyVault: "<keyvault-id>",
storage: "<storage-account-id>",
...
},
}
}
}
🙋♀️ Ask for the community
We could use your help:
- Please vote this issue up (👍) to prioritize it.
- Are there any parameters that are missing?
- Leave comments to help us solidify the vision.
Would this work item cause this Cmdlet to return the latest deployed version of the template? Currently when I run this, I get this for the version return:
Version : 0.1
However, I have deployed the 0.3 version and have verified the version by checking the tag on the storage account (+ I have seen the changes implemented in the 0.3 version of the hub).
My use case: writing a deployment pipeline for updating the finops hub version, would be useful to use the Get Cmdlet to check what version is already deployed.
Reviewing the code, I think the first if statement should check for the existence of the ftk-version tag and then if it matches across all of the resources it gets applied to, set the value of $version to the tag value.