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

General best practices documentation update #1090

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

nteyan
Copy link
Contributor

@nteyan nteyan commented Nov 4, 2024

πŸ› οΈ Description

This documentation update introduces new queries to summarize the counts of various resources. The aim is to provide users with an overview of their resource inventory, helping them understand the distribution and quantity of resources in their environment.

πŸ“· Screenshots

πŸ“‹ Checklist

πŸ”¬ How did you test this change?

  • 🀏 Lint tests
  • 🀞 PS -WhatIf / az validate
  • πŸ‘ Manually deployed + verified
  • πŸ’ͺ Unit tests
  • πŸ™Œ Integration tests

πŸ™‹β€β™€οΈ Do any of the following that apply?

  • 🚨 This is a breaking change.
  • 🀏 The change is less than 20 lines of code.

πŸ“‘ Did you update docs/changelog.md?

  • βœ… Updated changelog (required for dev PRs)
  • ➑️ Will add log in a future PR (feature branch PRs only)
  • ❎ Log not needed (small/internal change)

πŸ“– Did you update documentation?

  • βœ… Public docs in docs (required for dev)
  • βœ… Internal dev docs in src (required for dev)
  • ➑️ Will add docs in a future PR (feature branch PRs only)
  • ❎ Docs not needed (small/internal change)

@nteyan nteyan changed the title adding resource inventory qummary queries adding resource inventory summary queries Nov 4, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Review πŸ‘€ PR that is ready to be reviewed label Nov 4, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added Skill: Documentation Documentation updates Tool: FinOps guide Implementing FinOps guide labels Nov 4, 2024
@nteyan nteyan changed the title adding resource inventory summary queries General best practices documentation update Nov 4, 2024
@@ -28,6 +29,157 @@ Discover essential FinOps best practices to optimize cost efficiency and governa

---

## Resource inventory summary
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a service. Maybe use "Resource Manager" instead?

@@ -28,6 +29,157 @@ Discover essential FinOps best practices to optimize cost efficiency and governa

---

## Resource inventory summary
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this after ACO so it's sorted alphabetically.

@@ -28,6 +29,157 @@ Discover essential FinOps best practices to optimize cost efficiency and governa

---

## Resource inventory summary

### Query: Count of all resources
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really necessary? It feels too simple to document. What scenario does this actually address? Fwiw, I think we have a larger effort to document scenarios across the entire BPL, but it's fine if we don't do that right now.


<br>

### Query: Count of all resources per subscription
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still feels too simplistic, right? If we think this and the previous one are needed, should we merge both with the next one, which is closer to what I think people are looking for with a resource inventory?

Comment on lines +62 to +64
resources
| summarize Count=count(id) by subscriptionId
| order by Count desc
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Query styling

Suggested change
resources
| summarize Count=count(id) by subscriptionId
| order by Count desc
Resources
| summarize Count = count(id) by subscriptionId
| order by Count desc

Comment on lines +62 to +64
resources
| summarize Count=count(id) by subscriptionId
| order by Count desc
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I'm on the fence as to whether we should put sorting in the queries. We don't want unnecessary load on the server. I get it may be useful in some scenarios, but I'd probably leave that to the user to decide on their own unless sorting is critical for the scenario.

```kql
Resources
| extend type = case(
type contains 'microsoft.netapp/netappaccounts', 'NetApp Accounts',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unmaintainable and not technically accurate, if I'm reading it correctly. We should discuss this one.

Comment on lines +177 to +178
resources
| summarize count() by location
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Query styling...

Suggested change
resources
| summarize count() by location
Resources
| summarize Count = count() by location

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Attention πŸ‘‹ Issue or PR needs to be reviewed by the author or it will be closed due to no activity and removed Needs: Review πŸ‘€ PR that is ready to be reviewed labels Nov 5, 2024

@nteyan: you have some new feedback!

Please review and resolve all comments and I'll let reviewers know by removing the Needs: Attention label. If I miss anything, just reply with #needs-review and I'll update the status.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Attention πŸ‘‹ Issue or PR needs to be reviewed by the author or it will be closed due to no activity Skill: Documentation Documentation updates Tool: FinOps guide Implementing FinOps guide
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants