~rogeruiz/dns

1b314fe5ccf1d3e096b5f96c29406e8235d18e10 — Roger Steve Ruiz 1 year, 10 months ago 4fd102e
Adding the Gandi Provider working;

I'm leveraging TF Cloud to store my state files as well here. It's a
best practice, but it's certainly not entirely needed. Also, since
departing from HashiCorp I had to create a new user since I can't access
my Google account at HC anymore and my 2FA can't be disabled in order
for me to reclaim my account. I hope HC appreciates it 😉.
3 files changed, 36 insertions(+), 0 deletions(-)

A main.tf
A provider.tf
A variables.tf
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."
# }