{"id":20463198,"url":"https://github.com/devwithkrishna/update-azure-resource-group-tag-using-python-sdk","last_synced_at":"2026-04-22T09:31:50.014Z","repository":{"id":216289878,"uuid":"740837704","full_name":"devwithkrishna/update-azure-resource-group-tag-using-python-sdk","owner":"devwithkrishna","description":"update-azure-resource-group-tag-using-python-sdk","archived":false,"fork":false,"pushed_at":"2024-10-25T03:47:29.000Z","size":138,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-05T11:52:59.979Z","etag":null,"topics":["azure-python-sdk","azure-tags","github","github-workflow","update-tags"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devwithkrishna.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-09T07:03:18.000Z","updated_at":"2024-09-20T18:45:47.000Z","dependencies_parsed_at":"2024-01-24T17:31:25.540Z","dependency_job_id":"1dda3480-3b75-4c6d-acca-059c70e14194","html_url":"https://github.com/devwithkrishna/update-azure-resource-group-tag-using-python-sdk","commit_stats":null,"previous_names":["devwithkrishna/update-azure-resource-group-tag-using-python-sdk"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/devwithkrishna/update-azure-resource-group-tag-using-python-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devwithkrishna%2Fupdate-azure-resource-group-tag-using-python-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devwithkrishna%2Fupdate-azure-resource-group-tag-using-python-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devwithkrishna%2Fupdate-azure-resource-group-tag-using-python-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devwithkrishna%2Fupdate-azure-resource-group-tag-using-python-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devwithkrishna","download_url":"https://codeload.github.com/devwithkrishna/update-azure-resource-group-tag-using-python-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devwithkrishna%2Fupdate-azure-resource-group-tag-using-python-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32129621,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T08:34:57.708Z","status":"ssl_error","status_checked_at":"2026-04-22T08:34:55.583Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure-python-sdk","azure-tags","github","github-workflow","update-tags"],"created_at":"2024-11-15T13:09:50.344Z","updated_at":"2026-04-22T09:31:49.987Z","avatar_url":"https://github.com/devwithkrishna.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# update-azure-resource-group-tag-using-python-sdk\nupdate-azure-resource-group-tag-using-python-sdk\n\n## Inputs \n\n* tag_key   --\u003e tag name in azure\n* tag_value --\u003e tag value in azure\n* resource_group_names   --\u003e names of resource groups. more than one can be provided as comma seperated values\n* subscription_name --\u003e Azure subscription name\n\n\n## How code works?\n\n* Azure Identity - uses DefaultAzureCredential method for authentication.\n  * This uses the service principal app id, service principal secret and tenant id to do the authentication make sure you have the below.\n    ``` \n     AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, AZURE_TENANT_ID are the environment variables it will be using\n    ``` \nI use the .env to supply the above vars and load them using python-dotenv package and use it. or you can pass it as environment variable and use by os method.\nThe .env file will be of following\n\n```commandline\nAZURE_CLIENT_ID = \"value\"\nAZURE_CLIENT_SECRET = \"value\"\nAZURE_SUBSCRIPTION_ID = \"value\"\nAZURE_TENANT_ID = \"value\"\n```\n* This is how stuff is passed from work flow to pythin file\n```\njobs:\n  azure-tag-updation-using-python-github-workflow:\n    runs-on: ubuntu-latest\n    env:\n      AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}\n      AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}\n      AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}\n    steps:\n      - name: run python program\n        run: |\n          pipenv run python3 update_azure_tag.py --tag_key ${{ inputs.tag_key }} \\\n          --tag_value ${{ inputs.tag_value }} \\\n          --subscription_name ${{ inputs.subscription_name }} \\\n          --resource_group_names ${{ inputs.resource_group_names }}\n  ```\n:pushpin: azure_resource_graph_query --\u003e this will use the subcription name, run azure resource graph query return the sunbscription id.\n\n:pushpin: [yes] I have configued AZURE_CLIENT_ID, AZURE_CLIENT_SECRET and AZURE_TENANT_ID as repository secrets / organizational secrets.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevwithkrishna%2Fupdate-azure-resource-group-tag-using-python-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevwithkrishna%2Fupdate-azure-resource-group-tag-using-python-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevwithkrishna%2Fupdate-azure-resource-group-tag-using-python-sdk/lists"}