API
The Gcore Customer Portal is being updated. Screenshots may not show the current version.
CDN
CDN
BillingCDN resources overviewOrigin groupPurgePrefetchReports
API
Chosen image
Home/CDN

Install Terraform and integrate it with Gcore CDN

The following instructions will help you set up Terraform and use it to create and manage CDN resources.

1. Download the appropriate Terraform package for your OS from the official Terraform website.  

2. Create a new folder and name it just as the downloaded package. 

3. Unzip the Terraform archive into the new folder. 

4. Add the directory of the unzipped Terraform archive to the PATH environment variable. 

5. Create a configuration file in the Terraform folder and name it main.tf.  

6. Copy the code below and paste it to the main.tf file.  

terraform { required_version = ">=0.13.0" required_providers { gcore = { source = "G-Core/gcore"       version = "0.3.44"    }    }  }  provider gcore { permanent_api_token = "251$d33611b35f26d8" } 

Where:

7. Open the command-line interface, navigate to the Terraform folder, and run the following command:

terraform init

This command will install Terraform and download a set of modules to work with our CDN. The following response will appear:

response

This response means Terraform was successfully downloaded and installed, you can start working with it. 

Was this article helpful?

Not a Gcore user yet?

Learn more about our next-gen CDN

Go to the product page