A main.tf => main.tf +15 -0
@@ 0,0 1,15 @@
+terraform {
+ cloud {
+ organization = "gandi-dns"
+ workspaces {
+ name = "main"
+ }
+ }
+
+ required_providers {
+ gandi = {
+ source = "go-gandi/gandi"
+ version = ">= 2.1.0"
+ }
+ }
+}
A provider.tf => provider.tf +10 -0
@@ 0,0 1,10 @@
+# The Gandi provider lives at:
+# https://github.com/go-gandi/terraform-provider-gandi
+
+# To make sure we don't expose things, let's leverage the `GANDI_KEY`
+# environment variable to replace the `key = ""` field in the provider
+# below.
+
+provider "gandi" {
+ key = var.gandi_api_key
+}
A variables.tf => variables.tf +11 -0
@@ 0,0 1,11 @@
+variable "gandi_api_key" {
+ type = string
+ description = "The Gandi API key from the Account Management screen"
+}
+
+# README: This is disabled as I'm not sure if I'll ever use it.
+# variable "gandi_sharing_id" {
+# type = string
+# default = ""
+# description = "The Gandi Sharing ID to indicate the organization that will pay for any ordered products and to filter collections."
+# }