Mise en œuvre de notre propre fournisseur Terraform pour permettre l'automatisation de l'infrastructure

created: jeudi, sept. 12, 2024

Nous avons commencé à développer notre propre fournisseur Terraform car nous pensons que l’automatisation est essentielle à l’adoption du cloud.

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"
}

accéder à un contexte DTZ

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
}