Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pypypyo14/defaultvpc-tag
AWSアカウント作成時にデフォルトで存在するリソースにタグ付け(`{isDefault: true}`)するスクリプト
https://github.com/pypypyo14/defaultvpc-tag
Last synced: 3 months ago
JSON representation
AWSアカウント作成時にデフォルトで存在するリソースにタグ付け(`{isDefault: true}`)するスクリプト
- Host: GitHub
- URL: https://github.com/pypypyo14/defaultvpc-tag
- Owner: pypypyo14
- Created: 2020-01-08T13:44:34.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-06-02T00:54:11.000Z (over 3 years ago)
- Last Synced: 2024-05-30T06:56:03.955Z (6 months ago)
- Language: Python
- Size: 4.88 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# defaultvpc-tag
```
$ python main.py -h
usage: main.py [-h] [-d] [--profile PROFILE]Add AWS tag {isDefault: true} to default EC2 & RDS resources
optional arguments:
-h, --help show this help message and exit
-d, --dryrun set dry_run flag
--profile PROFILE set aws profile
```## about
- AWSアカウント作成時にデフォルトで存在するリソースにタグ付け(`{isDefault: true}`)するスクリプト
- Default VPCとそれに紐づく以下のリソース
- Subnet*
- Security Groups*
- Network ACL*
- Route Table*
- Internet Gateway*
- デフォルトで作成されるDHCP Option Set
- デフォルトで作成されるDBSecurityGroup
- 手動作成したDefault VPCにもタグが付く
- Default VPC内に手動で作った上記`*`印のリソースにもタグが付く
- 厳密に管理したい場合は本スクリプトのDryRunや本スクリプト実行後にタグエディタなどから対象の確認をおすすめします## 実行例
```
$ python main.py
INFO:EC2:eu-north-1: Tag on vpc-xxxxxxxx,subnet-xxxxxxxx,subnet-xxxxxxxx,subnet-xxxxxxxx,sg-xxxxxxxx,acl-xxxxxxxx,rtb-xxxxxxxx,igw-xxxxxxxx,dopt-xxxxxxxx
INFO:EC2:eu-north-1: Success!
INFO:RDS:eu-north-1: Tag on arn:aws:rds:eu-north-1:000000000000:secgrp:default
INFO:RDS:eu-north-1: Success!
INFO:EC2:ap-south-1: Tag on vpc-xxxxxxxx,subnet-xxxxxxxx,subnet-xxxxxxxx,subnet-xxxxxxxx,sg-xxxxxxxx,acl-xxxxxxxx,rtb-xxxxxxxx,igw-xxxxxxxx,dopt-xxxxxxxx
INFO:EC2:ap-south-1: Success!
INFO:RDS:ap-south-1: Tag on arn:aws:rds:ap-south-1:000000000000:secgrp:default
INFO:RDS:ap-south-1: Success!
INFO:EC2:eu-west-3: Tag on vpc-xxxxxxxx,subnet-xxxxxxxx,subnet-xxxxxxxx,subnet-xxxxxxxx,sg-xxxxxxxx,acl-xxxxxxxx,rtb-xxxxxxxx,igw-xxxxxxxx,dopt-xxxxxxxx
INFO:EC2:eu-west-3: Success!
INFO:RDS:eu-west-3: Tag on arn:aws:rds:eu-west-3:000000000000:secgrp:default
INFO:RDS:eu-west-3: Success!
(snip)
```