Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PowerShell] Get-FinOpsHub (0.3) #236

Open
Tracked by #123
flanakin opened this issue Aug 14, 2023 · 2 comments
Open
Tracked by #123

[PowerShell] Get-FinOpsHub (0.3) #236

flanakin opened this issue Aug 14, 2023 · 2 comments
Assignees
Labels
Status: β›” Blocked Progress blocked on another change Tool: FinOps hubs Data pipeline solution Tool: PowerShell PowerShell scripts and automation

Comments

@flanakin
Copy link
Collaborator

flanakin commented Aug 14, 2023

πŸ“ 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/exports into dev, then into features/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:

  1. Please vote this issue up (πŸ‘) to prioritize it.
  2. Are there any parameters that are missing?
  3. Leave comments to help us solidify the vision.
@flanakin flanakin changed the title [PowerShell] Update Get-FinOpsHub function for 0.0.2 [PowerShell] Get-FinOpsHub (0.0.2) Aug 15, 2023
@aromano2 aromano2 self-assigned this Aug 15, 2023
@flanakin flanakin added Status: β›” Blocked Progress blocked on another change Tool: PowerShell PowerShell scripts and automation Tool: FinOps hubs Data pipeline solution labels Aug 17, 2023
@flanakin flanakin changed the title [PowerShell] Get-FinOpsHub (0.0.2) [PowerShell] Get-FinOpsHub (0.2) Oct 5, 2023
@flanakin flanakin added this to the 0.2 milestone Oct 10, 2023
@flanakin flanakin changed the title [PowerShell] Get-FinOpsHub (0.2) [PowerShell] Get-FinOpsHub (0.3) Jan 14, 2024
@flanakin flanakin modified the milestones: 0.3, 0.4 Jan 23, 2024
@erose96
Copy link

erose96 commented Apr 1, 2024

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.

@erose96
Copy link

erose96 commented Apr 1, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: β›” Blocked Progress blocked on another change Tool: FinOps hubs Data pipeline solution Tool: PowerShell PowerShell scripts and automation
Projects
Status: πŸ”– Ready
Development

No branches or pull requests

3 participants