Fastly provides our customers with a number of ways to modify services outside of our UI with tools such as cURL and API calls. One that you may not be familiar with is the FastlyCTL. FastlyCTL provides you with the ability to create, clone, and update a variety of elements within your account. This document will focus on creating and cloning services.
Creating New Services:
With FastlyCTL, you have the ability to create new services. When a new service is created our standard VCL is loaded onto it which can be later customized.
Here’s an example of this taking place:
In the example below I ran the following command fastlyctl create Desired_Name_of_Service
If the service name you entered already belongs to a customer you will get this error, at which point you will have to FastlyCTL command for a new service creation and rename it.
The FastlyCTL can be used to clone one service to another. This action moves all of the configured settings in service A and copies them into service B. Below is an example of this happening.
When cloning a service it’s important to keep a few things in mind:
- The clone will clone whatever version currently active.
- Domains do not carry over to the new service, you will need to delete from service A and readd in service B
- If you clone a service that has OTFP enabled, additional setup may be needed for service B.
Besides cloning and creating services there a bunch of other actions that can be used with this tool. Learn more here.
As always, if you have any questions reach out to our support team at support.Thanks for reading!
Please sign in to leave a comment.