Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

G-PORTAL/terraform-provider-gpcloud

Repository files navigation

LEGACY

This project moved to a new location. The most recent version of the terraform provider is available at G-PORTAL/terraform-provider-gpcore

Terraform Provider GPCloud

This repository is a Terraform provider for GPCloud. It is intended to allow an Infrastructure-as-Code definition of the GPCloud services.

Implemented Resources:

  • gpcloud_node - The GPCloud Node resource
  • gpcloud_project - The GPCloud Project resource
  • gpcloud_project_image - The GPCloud Project Image resource (Custom image)
  • gpcloud_sshkey - The GPCloud SSH-Key resource
  • gpcloud_billing_profile - The GPCloud Billing Profile resource

Implemented Data sources:

  • gpcloud_project - The GPCloud Project data source (read-only)
  • gpcloud_flavour - The GPCloud Flavour data source
  • gpcloud_datacenter - The GPCloud Datacenter data source
  • gpcloud_image - The GPCloud Image data source (Official images)

Requirements

Building The GPCloud Provider manually

  1. Clone the repository
  2. Enter the repository directory
  3. Build the provider using the Go install command:
go install

Using the provider

This provider is published on the Terraform Registry.

To use the GPCloud Terraform Provider, all you need to do is to reference the published provider inside your terraform configuration.

terraform {
  required_providers {
    gpcloud = {
      source = "G-PORTAL/gpcloud"
      # Ensure to use the latest version of the provider
      version = "0.1.4"
    }
  }
}

The full documentation for the provider can be found here or inside the docs/ directory.

Developing the Provider

If you wish to contribute to the GPCloud Terraform Provider, you'll first need Go installed on your machine (see Requirements above).

To compile the provider, run go install. This will build the provider and put the provider binary in the $GOPATH/bin directory.

To reference the custom version of the provider built instead of the hosted one, setting dev_override inside the $HOME/.terraformrc file becomes useful:

provider_installation {
  dev_overrides {
    "registry.terraform.io/g-portal/gpcloud" = "~/go/bin"
  }
  direct {}
}

To generate or update documentation, run go generate.