Split up contabo provider vars

This commit is contained in:
Tobias Reisinger 2024-09-30 20:31:04 +02:00
parent 048ea26034
commit 48a4f72e4f
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
5 changed files with 42 additions and 19 deletions

View file

@ -35,7 +35,10 @@ module "services" {
module "infrastructure" {
source = "./modules/infrastructure"
contabo_provider_vars = var.contabo_provider_vars
contabo_client_id = var.contabo_client_id
contabo_client_secret = var.contabo_client_secret
contabo_user = var.contabo_user
contabo_pass = var.contabo_pass
hcloud_token = var.hcloud_token

View file

@ -24,10 +24,10 @@ terraform {
}
provider "contabo" {
oauth2_client_id = var.contabo_provider_vars.client_id
oauth2_client_secret = var.contabo_provider_vars.client_secret
oauth2_user = var.contabo_provider_vars.user
oauth2_pass = var.contabo_provider_vars.pass
oauth2_client_id = var.contabo_client_id
oauth2_client_secret = var.contabo_client_secret
oauth2_user = var.contabo_user
oauth2_pass = var.contabo_pass
}
provider "hcloud" {

View file

@ -1,10 +1,16 @@
variable "contabo_provider_vars" {
type = object({
client_id = string
client_secret = string
user = string
pass = string
})
variable "contabo_client_id" {
sensitive = true
}
variable "contabo_client_secret" {
sensitive = true
}
variable "contabo_user" {
sensitive = true
}
variable "contabo_pass" {
sensitive = true
}

View file

@ -4,6 +4,14 @@ backend_endpoint = ""
backend_region = ""
backend_bucket = ""
authentik_token = ""
contabo_client_id = ""
contabo_client_secret = ""
contabo_user = ""
contabo_pass = ""
hcloud_token = ""
ovh_application_key = ""

View file

@ -28,13 +28,19 @@ variable "authentik_token" {
}
variable "contabo_provider_vars" {
type = object({
client_id = string
client_secret = string
user = string
pass = string
})
variable "contabo_client_id" {
sensitive = true
}
variable "contabo_client_secret" {
sensitive = true
}
variable "contabo_user" {
sensitive = true
}
variable "contabo_pass" {
sensitive = true
}