From 92d034ae934c13315eff45671b45500212244b60 Mon Sep 17 00:00:00 2001 From: Simon Gerber Date: Thu, 6 Jul 2023 17:41:19 +0200 Subject: [PATCH] Switch to new `exoscale_template` data source The exoscale_compute_template data source has been deprecated in favor of the exoscale_template data source. With this change, the Terraform module doesn't use any "compute-legacy" API endpoints anymore, which makes working with IAM v3 roles a bit easier. --- bootstrap.tf | 2 +- control_plane.tf | 2 +- infra.tf | 2 +- main.tf | 8 ++++---- storage.tf | 2 +- worker.tf | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bootstrap.tf b/bootstrap.tf index 7264e94..e2f06b4 100644 --- a/bootstrap.tf +++ b/bootstrap.tf @@ -10,7 +10,7 @@ module "bootstrap" { role = "bootstrap" node_count = var.bootstrap_count region = var.region - template_id = data.exoscale_compute_template.rhcos.id + template_id = data.exoscale_template.rhcos.id base_domain = var.base_domain instance_type = "standard.extra-large" node_state = var.bootstrap_state diff --git a/control_plane.tf b/control_plane.tf index b746380..360435b 100644 --- a/control_plane.tf +++ b/control_plane.tf @@ -6,7 +6,7 @@ module "master" { role = "master" node_count = var.master_count region = var.region - template_id = data.exoscale_compute_template.rhcos.id + template_id = data.exoscale_template.rhcos.id base_domain = var.base_domain instance_type = "standard.extra-large" node_state = var.master_state diff --git a/infra.tf b/infra.tf index 17616a2..656098d 100644 --- a/infra.tf +++ b/infra.tf @@ -6,7 +6,7 @@ module "infra" { role = "infra" node_count = var.infra_count region = var.region - template_id = data.exoscale_compute_template.rhcos.id + template_id = data.exoscale_template.rhcos.id base_domain = var.base_domain instance_type = var.infra_type node_state = var.infra_state diff --git a/main.tf b/main.tf index beb1b66..799803f 100644 --- a/main.tf +++ b/main.tf @@ -21,10 +21,10 @@ data "exoscale_domain_record" "exo_nameservers" { } } -data "exoscale_compute_template" "rhcos" { - zone = var.region - name = var.rhcos_template - filter = "mine" +data "exoscale_template" "rhcos" { + zone = var.region + name = var.rhcos_template + visibility = "private" } resource "exoscale_ssh_key" "admin" { diff --git a/storage.tf b/storage.tf index 9331ab0..e13c4ba 100644 --- a/storage.tf +++ b/storage.tf @@ -6,7 +6,7 @@ module "storage" { role = "storage" node_count = var.storage_count region = var.region - template_id = data.exoscale_compute_template.rhcos.id + template_id = data.exoscale_template.rhcos.id base_domain = var.base_domain instance_type = var.storage_type node_state = var.storage_state diff --git a/worker.tf b/worker.tf index 02199e4..9dc1c98 100644 --- a/worker.tf +++ b/worker.tf @@ -8,7 +8,7 @@ module "worker" { role = "worker" node_count = var.worker_count region = var.region - template_id = data.exoscale_compute_template.rhcos.id + template_id = data.exoscale_template.rhcos.id base_domain = var.base_domain instance_type = var.worker_type node_state = var.worker_state @@ -57,7 +57,7 @@ module "additional_worker" { data_disk_size = each.value.data_disk_size != null ? each.value.data_disk_size : 0 region = var.region - template_id = data.exoscale_compute_template.rhcos.id + template_id = data.exoscale_template.rhcos.id base_domain = var.base_domain ssh_key_pair = local.ssh_key_name