fastly-service-clone
v1.0.1
Published
A CLI tool to clone a Fastly service.
Downloads
6
Readme
Fastly Service Clone
A CLI tool to clone a Fastly service.
Usage
- Create an API Key (Account -> Personal Profile -> ApiTokens -> Create Token)
- Click automation
- with
global
access - expires in 7 days
- give the key a name
- give access to Source Service and Destination Service (Access -> 'One Or More Services')
- save the key
- Copy the key and put it in a note file
export FASTLY_API_TOKEN=your_api_key
export SRC_SERVICE=your_source_service_id
export DST_SERVICE=your_dst_service_id
npx fastly-service-clone
Important
If you're creating a new Fastly service with this command, add 'full' to the end of it.
export FASTLY_API_TOKEN=your_api_key
export SRC_SERVICE=your_source_service_id
export DST_SERVICE=your_dst_service_id
npx fastly-service-clone full
Known Issues
requires jq
mac: HOMEBREW_NO_AUTO_UPDATE=1 brew install jq
linux: sudo apt-get install jq