1. Packages
  2. Packages
  3. Gcore Provider
Viewing docs for gcore 2.0.0-alpha.6
published on Monday, Apr 27, 2026 by g-core

Gcore Provider

Viewing docs for gcore 2.0.0-alpha.6
published on Monday, Apr 27, 2026 by g-core

    Generate Provider

    The Gcore provider must be installed as a Local Package by following the instructions for Any Terraform Provider:

    pulumi package add terraform-provider g-core/gcore
    

    Overview

    The Gcore provider allows you to configure your Gcore infrastructure.

    !> This provider is a complete rewrite with breaking changes compared to v0.x. Resource names, attribute schemas, and import IDs have changed. It is currently in alpha and under active development. The previous provider remains fully functional and is recommended for production workloads until v2 reaches GA. Install it from registry.pulumi.io/providers/G-Core/gcore.

    Need help? If you encounter any issues or have questions about the Gcore Pulumi provider, please reach out to Gcore Support for assistance.

    Example Usage

    # Pulumi.yaml provider configuration file
    name: configuration-example
    runtime: nodejs
    config:
        gcore:apiKey:
            value: 'TODO: var.gcore_api_key'
    
    import * as pulumi from "@pulumi/pulumi";
    
    # Pulumi.yaml provider configuration file
    name: configuration-example
    runtime: python
    config:
        gcore:apiKey:
            value: 'TODO: var.gcore_api_key'
    
    import pulumi
    
    # Pulumi.yaml provider configuration file
    name: configuration-example
    runtime: dotnet
    config:
        gcore:apiKey:
            value: 'TODO: var.gcore_api_key'
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() =>
    {
    });
    
    # Pulumi.yaml provider configuration file
    name: configuration-example
    runtime: go
    config:
        gcore:apiKey:
            value: 'TODO: var.gcore_api_key'
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    # Pulumi.yaml provider configuration file
    name: configuration-example
    runtime: yaml
    config:
        gcore:apiKey:
            value: 'TODO: var.gcore_api_key'
    
    {}
    
    # Pulumi.yaml provider configuration file
    name: configuration-example
    runtime: java
    config:
        gcore:apiKey:
            value: 'TODO: var.gcore_api_key'
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
        }
    }
    

    Configuration Reference

    • apiKey (String, Sensitive) The API key for authenticating with the Gcore API. Can also be set via the GCORE_API_KEY environment variable.
    • baseUrl (String) Set the base url that the provider connects to.
    • cloudPollingIntervalSeconds (Number) Interval in seconds between polling requests for long-running cloud operations. Defaults to 3.
    • cloudPollingTimeoutSeconds (Number) Timeout in seconds for polling long-running cloud operations. Defaults to 7200.
    • cloudProjectId (Number) Default cloud project ID to use for cloud resources. Serves as a convenience fallback for local development; for production, prefer setting projectId explicitly on each resource. Can also be set via the GCORE_CLOUD_PROJECT_ID environment variable.
    • cloudRegionId (Number) Default cloud region ID to use for cloud resources. Serves as a convenience fallback for local development; for production, prefer setting regionId explicitly on each resource. Can also be set via the GCORE_CLOUD_REGION_ID environment variable.

    Best Practices

    Project and Region Configuration

    Cloud resources accept projectId and regionId as explicit attributes. The provider-level cloudProjectId / cloudRegionId (and their GCORE_CLOUD_PROJECT_ID / GCORE_CLOUD_REGION_ID environment variable counterparts) serve as convenience fallbacks for local development and testing.

    For production configurations, always set projectId and regionId explicitly on each resource:

    import * as pulumi from "@pulumi/pulumi";
    import * as gcore from "@pulumi/gcore";
    
    const example = new gcore.CloudVolume("example", {
        projectId: 1,
        regionId: 1,
        name: "my-volume",
    });
    
    import pulumi
    import pulumi_gcore as gcore
    
    example = gcore.CloudVolume("example",
        project_id=1,
        region_id=1,
        name="my-volume")
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcore = Pulumi.Gcore;
    
    return await Deployment.RunAsync(() =>
    {
        var example = new Gcore.CloudVolume("example", new()
        {
            ProjectId = 1,
            RegionId = 1,
            Name = "my-volume",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-pulumi-provider/sdks/go/gcore/v2/gcore"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := gcore.NewCloudVolume(ctx, "example", &gcore.CloudVolumeArgs{
    			ProjectId: pulumi.Float64(1),
    			RegionId:  pulumi.Float64(1),
    			Name:      pulumi.String("my-volume"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    resources:
      example:
        type: gcore:CloudVolume
        properties:
          projectId: 1
          regionId: 1
          name: my-volume
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcore.CloudVolume;
    import com.pulumi.gcore.CloudVolumeArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new CloudVolume("example", CloudVolumeArgs.builder()
                .projectId(1.0)
                .regionId(1.0)
                .name("my-volume")
                .build());
    
        }
    }
    

    This makes your Pulumi configuration self-contained, portable, and unambiguous — it won’t silently change behavior when run in a different environment.

    Viewing docs for gcore 2.0.0-alpha.6
    published on Monday, Apr 27, 2026 by g-core
      Try Pulumi Cloud free. Your team will thank you.