Skip to content

Latest commit

 

History

61 提交

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

仓库 files navigation

Az CLI Scripts

Budgets

Bulk upload budget settings for Resource Groups from a CSV file

Usage


Bash

bash budgets.sh <csv_file> [EXECUTE]

Example


To just view the commands:

bash budgets.sh budgets.csv

To execute the commands:

bash budgets.sh budgets.csv EXECUTE

Sync CSV 标签 (Azure CLI BASH or PowerShell)

Sync 标签 to Azure Resources or Resource Groups from a CSV file

  • one execution for all tags per resource
  • pass in any number of tags in the CSV file, it's not hardcoded (except the ResourceName header in the CSV file) :)
  • see the actual Azure CLI commands that will run before you choose to execute

Usage


Bash

bash synccsvtags.sh <csv_file> <azure_subscription_id> [EXECUTE]

PowerShell

.\synccsvtags.ps1 <csv_file> <azure_subscription_id> [EXECUTE]

Example


To just view the commands:

bash synccsvtags.sh tags.csv 11111111-1111-1111-1111-111111111111

To execute the commands:

bash synccsvtags.sh tags.csv 11111111-1111-1111-1111-111111111111 EXECUTE

Output


az tag create --resource-id /subscriptions/11111111-1111-1111-1111-111111111111/resourcegroups/RG1 --tags Tag1=aaaa Tag2=bbbb Tag3=cccc Tag4=dddd
az tag create --resource-id /subscriptions/11111111-1111-1111-1111-111111111111/resourcegroups/RG2 --tags Tag1=eeee Tag2=ffff Tag3=gggg Tag4=hhhh

CSV Sample


ResourceName,Tag1,Tag2,Tag3,Tag4
RG1,aaaa,bbbb,cccc,dddd
RG2,eeee,ffff,gggg,hhhh

关于

Sync 标签 to Azure Resources or Resource Groups from a CSV file

Topics

Resources

Stars

3 stars

关注者

1 watching

复刻s

发布

贡献者

Languages