initial terraform code

This commit is contained in:
Oli
2022-10-09 21:13:41 +00:00
parent f73b890e18
commit 8072eb9434
9 changed files with 314 additions and 0 deletions

34
main.tf Normal file
View File

@@ -0,0 +1,34 @@
# Providers
terraform {
required_providers {
hcloud = {
source = "hetznercloud/hcloud"
version = "1.35.2"
}
ionosdeveloper = {
source = "ionos-developer/ionosdeveloper"
version = ">= 0.0.1"
}
}
}
# Set the variable value in *.tfvars file
# or using the -var="hcloud_token=..." CLI option
# or get from env variable (export = abc132)
# Hetzner Cloud
variable "dtsv_hcloud_token" {}
# Configure the Hetzner Cloud Provider
provider "hcloud" {
token = var.dtsv_hcloud_token
}
# Ionos Cloud
variable "dtsv_ionos_token" {}
# Configure the Ionos Developer Provider
provider "ionosdeveloper" {
api_key = var.dtsv_ionos_token
}
# Public SSH Key
variable "dtsv_hcloud_ssh_key" {}