Skip to main content

Documentation Index

Fetch the complete documentation index at: https://gcore.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Terraform replaces manual steps in the Gcore Customer Portal with version-controlled configuration files. Describe the desired infrastructure once, and Terraform creates, updates, or deletes Cloud and CDN resources automatically through the Gcore API.

Gcore provider

A provider is a plugin that translates Terraform configuration into API calls — it defines the resource types available for use, such as Virtual Machines, networks, and DNS zones. Two major versions of the Gcore provider are published; the right one depends on whether the project is new or existing:
v2v0
Authenticationapi_keypermanent_api_token
Terraform CLI>= 1.11>= 0.13.0
API coverageTracks Gcore API automaticallyManual updates
Recommended forNew projectsExisting projects
Specify the version in the configuration to avoid unintended upgrades — v0 and v2 use different, incompatible configuration formats.

Provider configuration

Install Terraform first, then add the provider block to main.tf:
Provider v2 uses api_key for authentication and is auto-generated from the Gcore OpenAPI specification.
terraform {
  required_version = ">= 1.11"
  required_providers {
    gcore = {
      source  = "G-Core/gcore"
      version = "= 2.0.0-alpha.6" # see Terraform Registry for latest
    }
  }
}

provider "gcore" {
  api_key = "YOUR_API_KEY"
}
Replace YOUR_API_KEY with a permanent API token. For existing v0 projects, follow the migration guide to move to v2.

Manage Gcore resources

The v0 provider supports Cloud resources — Virtual Machines, Bare Metal servers, Kubernetes clusters, Load Balancers, and networks — and CDN resources. For v2, the full resource reference is on the Terraform Registry.