azure docs
This commit is contained in:
@@ -58,6 +58,14 @@ export default defineConfig({
|
|||||||
{ text: 'Waiting For Servers', link: '/ansible/server-wait' },
|
{ text: 'Waiting For Servers', link: '/ansible/server-wait' },
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
text: 'Azure',
|
||||||
|
link: '/azure/',
|
||||||
|
collapsed: true,
|
||||||
|
items: [
|
||||||
|
{ text: 'Identify Untagged Resources', link: '/azure/identify-untagged-resources' },
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
text: 'CSS',
|
text: 'CSS',
|
||||||
link: '/css/',
|
link: '/css/',
|
||||||
|
|||||||
28
docs/azure/identify-untagged-resources.md
Normal file
28
docs/azure/identify-untagged-resources.md
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
# Identify Untagged Resources
|
||||||
|
|
||||||
|
Tagging in Azure is essential for managing resouces, billing, ownership and more. As a general rule it's important to ensure that all resources are tagged.
|
||||||
|
|
||||||
|
To identify untagged resources we can use the Resource Graph Explorer in Azure. This allows us to query across all our resources and filter for those that do not have tags.
|
||||||
|
|
||||||
|
## Query for Untagged Resources
|
||||||
|
|
||||||
|
1. Navigate to the Azure Portal and open the Resource Graph Explorer.
|
||||||
|
2. Use the following Kusto Query Language (KQL) query to find untagged resources:
|
||||||
|
|
||||||
|
```kql
|
||||||
|
resources
|
||||||
|
| where isnull(tags) or tostring(tags) == '[]'
|
||||||
|
| project name, type, resourceGroup, location
|
||||||
|
```
|
||||||
|
|
||||||
|
## Recording management
|
||||||
|
|
||||||
|
Personally I like to tag all resources with a `managed_by` tag to indicate who or what is responsible for creating/updating the resource (e.g. `manual` or `terraform` or `pulumi` etc).
|
||||||
|
|
||||||
|
To identify resources that are not tagged with `managed_by` we can use the following query:
|
||||||
|
|
||||||
|
```kql
|
||||||
|
resources
|
||||||
|
| where tags !has 'managed_by'
|
||||||
|
| project name, type, resourceGroup, location
|
||||||
|
```
|
||||||
3
docs/azure/index.md
Normal file
3
docs/azure/index.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# Azure Snippets and Musings
|
||||||
|
|
||||||
|
#### [Identify Untagged Resources](./identify-untagged-resources.md)
|
||||||
@@ -18,6 +18,10 @@ hero:
|
|||||||
text: Ansible
|
text: Ansible
|
||||||
link: /ansible/
|
link: /ansible/
|
||||||
|
|
||||||
|
- theme: alt
|
||||||
|
text: Azure
|
||||||
|
link: /azure/
|
||||||
|
|
||||||
- theme: alt
|
- theme: alt
|
||||||
text: CSS
|
text: CSS
|
||||||
link: /css/
|
link: /css/
|
||||||
|
|||||||
Reference in New Issue
Block a user