Implementierung unseres eigenen Terraform-Providers zur Automatisierung von Infrastruktur

created: Donnerstag, Sept. 12, 2024

Wir haben begonnen, unseren eigenen Terraform-Provider zu implementieren, weil wir glauben, dass Automatisierung der Schlüssel zur Nutzung von Cloud-Diensten ist.

You can find our provider at github under

and over at the Hashicorp terraform site:

This provider give every customer another path of accessing DTZ resources and implemting their automation/IaaS on top of our services.

To setup the provider you need to generate an API-key through the website. We currently only support apikey authentication.

terraform {
  required_providers {
    dtz = {
      source = "DownToZero-Cloud/dtz"
      version = ">= 0.1.22"
    }
  }
}

provider "dtz" {
  api_key = "apikey-1234"
}

Zugriff auf einen DTZ-Kontext

https://registry.terraform.io/providers/DownToZero-Cloud/dtz/latest/docs/data-sources/context

data "dtz_context" "ctx" {}

output "context-alias" {
  value = data.dtz_context.ctx.alias
}
output "context-id" {
  value = data.dtz_context.ctx.id
}