@@ -20,41 +20,37 @@ Usage:
2020 azure-janitor [OPTIONS]
2121
2222Application Options:
23- --dry-run Dry run (no delete) [$DRYRUN]
24- --log.debug debug mode [$LOG_DEBUG]
25- --log.devel development mode [$LOG_DEVEL]
26- --log.json Switch log output to json format [$LOG_JSON]
27- --azure.environment= Azure environment name (default: AZUREPUBLICCLOUD) [$AZURE_ENVIRONMENT]
28- --azure.subscription= Azure subscription ID (space delimiter) [$AZURE_SUBSCRIPTION_ID]
29- --azure.resource-tag= Azure Resource tags (space delimiter) (default: owner) [$AZURE_RESOURCE_TAG]
30- --janitor.interval= Janitor interval (time.duration) (default: 1h) [$JANITOR_INTERVAL]
31- --janitor.tag= Janitor azure tag (string) (default: ttl) [$JANITOR_TAG]
32- --janitor.tag.target= Janitor azure tag (string) (default: ttl_expiry) [$JANITOR_TAG_TARGET]
33- --janitor.resourcegroups Enable Azure ResourceGroups cleanup [$JANITOR_RESOURCEGROUPS_ENABLE]
34- --janitor.resourcegroups.filter= Additional $filter for Azure REST API for ResourceGroups [$JANITOR_RESOURCEGROUPS_FILTER]
35- --janitor.resources Enable Azure Resources cleanup [$JANITOR_RESOURCES_ENABLE]
36- --janitor.resources.filter= Additional $filter for Azure REST API for Resources [$JANITOR_RESOURCES_FILTER]
37- --janitor.deployments Enable Azure Deployments cleanup [$JANITOR_DEPLOYMENTS_ENABLE]
38- --janitor.deployments.ttl= Janitor deployment ttl (time.duration) (default: 8760h) [$JANITOR_DEPLOYMENTS_TTL]
39- --janitor.deployments.limit= Janitor deployment limit count (int) (default: 700) [$JANITOR_DEPLOYMENTS_LIMIT]
40- --janitor.roleassignments Enable Azure RoleAssignments cleanup [$JANITOR_ROLEASSIGNMENTS_ENABLE]
41- --janitor.roleassignments.ttl= Janitor roleassignment ttl (time.duration) (default: 6h) [$JANITOR_ROLEASSIGNMENTS_TTL]
42- --janitor.roleassignments.roledefinitionid= Janitor roledefinition ID (eg:
43- /subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/providers/Microsoft.Authorization/roleDef-
44- initions/xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx or
45- /providers/Microsoft.Authorization/roleDefinitions/xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx for
46- subscription independent roleDefinitions) (space delimiter)
47- [$JANITOR_ROLEASSIGNMENTS_ROLEDEFINITIONID]
48- --janitor.roleassignments.filter= Additional $filter for Azure REST API for RoleAssignments
49- [$JANITOR_ROLEASSIGNMENTS_FILTER]
50- --janitor.roleassignments.descriptionttl= Regexp for detecting ttl inside description of RoleAssignment
51- [$JANITOR_ROLEASSIGNMENTS_DESCRIPTIONTTL]
52- --server.bind= Server address (default: :8080) [$SERVER_BIND]
53- --server.timeout.read= Server read timeout (default: 5s) [$SERVER_TIMEOUT_READ]
54- --server.timeout.write= Server write timeout (default: 10s) [$SERVER_TIMEOUT_WRITE]
23+ --dry-run Dry run (no delete) [$DRYRUN]
24+ --log.level=[trace|debug|info|warning|error] Log level (default: info) [$LOG_LEVEL]
25+ --log.format=[logfmt|json] Log format (default: logfmt) [$LOG_FORMAT]
26+ --log.source=[|short|file|full] Show source for every log message (useful for debugging and bug reports) [$LOG_SOURCE]
27+ --log.color=[|auto|yes|no] Enable color for logs [$LOG_COLOR]
28+ --log.time Show log time [$LOG_TIME]
29+ --azure.environment= Azure environment name (default: AZUREPUBLICCLOUD) [$AZURE_ENVIRONMENT]
30+ --azure.subscription= Azure subscription ID (space delimiter) [$AZURE_SUBSCRIPTION_ID]
31+ --azure.resource-tag= Azure Resource tags (space delimiter) (default: owner) [$AZURE_RESOURCE_TAG]
32+ --janitor.interval= Janitor interval (time.duration) (default: 1h) [$JANITOR_INTERVAL]
33+ --janitor.tag= Janitor azure tag (string) (default: ttl) [$JANITOR_TAG]
34+ --janitor.tag.target= Janitor azure tag (string) (default: ttl_expiry) [$JANITOR_TAG_TARGET]
35+ --janitor.resourcegroups Enable Azure ResourceGroups cleanup [$JANITOR_RESOURCEGROUPS_ENABLE]
36+ --janitor.resourcegroups.filter= Additional $filter for Azure REST API for ResourceGroups [$JANITOR_RESOURCEGROUPS_FILTER]
37+ --janitor.resources Enable Azure Resources cleanup [$JANITOR_RESOURCES_ENABLE]
38+ --janitor.resources.filter= Additional $filter for Azure REST API for Resources [$JANITOR_RESOURCES_FILTER]
39+ --janitor.deployments Enable Azure Deployments cleanup [$JANITOR_DEPLOYMENTS_ENABLE]
40+ --janitor.deployments.ttl= Janitor deployment ttl (time.duration) (default: 8760h) [$JANITOR_DEPLOYMENTS_TTL]
41+ --janitor.deployments.limit= Janitor deployment limit count (int) (default: 700) [$JANITOR_DEPLOYMENTS_LIMIT]
42+ --janitor.roleassignments Enable Azure RoleAssignments cleanup [$JANITOR_ROLEASSIGNMENTS_ENABLE]
43+ --janitor.roleassignments.ttl= Janitor roleassignment ttl (time.duration) (default: 6h) [$JANITOR_ROLEASSIGNMENTS_TTL]
44+ --janitor.roleassignments.roledefinitionid= Janitor roledefinition ID (eg: /subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/providers/Microsoft.Authorization/roleDefinitions/xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx or
45+ /providers/Microsoft.Authorization/roleDefinitions/xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx for subscription independent roleDefinitions) (space delimiter) [$JANITOR_ROLEASSIGNMENTS_ROLEDEFINITIONID]
46+ --janitor.roleassignments.filter= Additional $filter for Azure REST API for RoleAssignments [$JANITOR_ROLEASSIGNMENTS_FILTER]
47+ --janitor.roleassignments.descriptionttl= Regexp for detecting ttl inside description of RoleAssignment [$JANITOR_ROLEASSIGNMENTS_DESCRIPTIONTTL]
48+ --server.bind= Server address (default: :8080) [$SERVER_BIND]
49+ --server.timeout.read= Server read timeout (default: 5s) [$SERVER_TIMEOUT_READ]
50+ --server.timeout.write= Server write timeout (default: 10s) [$SERVER_TIMEOUT_WRITE]
5551
5652Help Options:
57- -h, --help Show this help message
53+ -h, --help Show this help message
5854```
5955
6056for Azure API authentication (using ENV vars)
0 commit comments