- THIS IS NOT PRODUTION CODE.
- YOU ARE RESPONSIBLE IF YOU CHOOSE TO RUN THIS.
This script replaces GCP billing account association for all projects associated to a particular billing account to a new one
- comment line 24 and run
./change-projects-billing.sh OLD_BILLING_ACC_ID=xxx-xxx-xxx-xxx NEW_BILLING_ACC_ID=yyy-yyy-yyy-yyy | tee change-projects-billing.log 2>&1
- go through the log to make sure the projects are there
export NEW_BILLING_ACC_ID="yyy-yyy-yyy-yyy"
export project="test-project-id-that-you-want-to-use"
- copy line 24 and execute by itself * in the command line * (so you don't run the script)
- uncomment line 24 and run script using command at 1.1