From cfc3d9307c942e5670870a2e6f4710e7c64a57ef Mon Sep 17 00:00:00 2001 From: Ara Ghukasyan Date: Thu, 23 Nov 2023 14:53:53 -0500 Subject: [PATCH 1/5] bump terraform version req --- covalent_azurebatch_plugin/assets/infra/versions.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/covalent_azurebatch_plugin/assets/infra/versions.tf b/covalent_azurebatch_plugin/assets/infra/versions.tf index 059e8c5..30ebf0c 100644 --- a/covalent_azurebatch_plugin/assets/infra/versions.tf +++ b/covalent_azurebatch_plugin/assets/infra/versions.tf @@ -21,5 +21,5 @@ terraform { version = "~> 3.73" } } - required_version = "~> 1.5.1" + required_version = ">= 1.6" } From e5c0fab9fdfa98ad51aeca595f2136ee8f33ad41 Mon Sep 17 00:00:00 2001 From: Ara Ghukasyan Date: Thu, 23 Nov 2023 14:54:24 -0500 Subject: [PATCH 2/5] replace "template_file" with `templatefile` --- covalent_azurebatch_plugin/assets/infra/main.tf | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/covalent_azurebatch_plugin/assets/infra/main.tf b/covalent_azurebatch_plugin/assets/infra/main.tf index 2735c9c..41009eb 100644 --- a/covalent_azurebatch_plugin/assets/infra/main.tf +++ b/covalent_azurebatch_plugin/assets/infra/main.tf @@ -85,10 +85,9 @@ EOF } } -data "template_file" "executor_config" { - template = file("${path.module}/azurebatch.conf.tftpl") - - vars = { +resource "local_file" "executor_config" { + filename = "${path.module}/azurebatch.conf" + content = templatefile("${path.module}/azurebatch.conf.tftpl", { subscription_id = var.subscription_id tenant_id = var.tenant_id client_id = "${azuread_application.batch.application_id}" @@ -98,10 +97,5 @@ data "template_file" "executor_config" { storage_account_domain = "blob.core.windows.net" pool_id = "${azurerm_batch_pool.covalent.name}" retries = 3 - } -} - -resource "local_file" "executor_config" { - content = data.template_file.executor_config.rendered - filename = "${path.module}/azurebatch.conf" + }) } From 2439f57199c779bab2fcdb65aa218d0088ac5c68 Mon Sep 17 00:00:00 2001 From: Ara Ghukasyan Date: Thu, 23 Nov 2023 14:56:13 -0500 Subject: [PATCH 3/5] update changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ead3ab..2dadb95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [UNRELEASED] +### Changed + +- Required terraform version to ">= 1.6" +- Use `templatefile` instead of `data "template_file` ... + ## [0.16.0] - 2023-11-21 ### Changed From 556913b2c43d299248f71ddd1ff82c697dc7e7af Mon Sep 17 00:00:00 2001 From: Ara Ghukasyan Date: Mon, 29 Jan 2024 16:01:59 -0500 Subject: [PATCH 4/5] Revert "bump terraform version req" This reverts commit cfc3d9307c942e5670870a2e6f4710e7c64a57ef. --- covalent_azurebatch_plugin/assets/infra/versions.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/covalent_azurebatch_plugin/assets/infra/versions.tf b/covalent_azurebatch_plugin/assets/infra/versions.tf index 30ebf0c..059e8c5 100644 --- a/covalent_azurebatch_plugin/assets/infra/versions.tf +++ b/covalent_azurebatch_plugin/assets/infra/versions.tf @@ -21,5 +21,5 @@ terraform { version = "~> 3.73" } } - required_version = ">= 1.6" + required_version = "~> 1.5.1" } From c6d75530d8ee5d9c8dea12bb5baf535c4714cdcc Mon Sep 17 00:00:00 2001 From: Ara Ghukasyan Date: Mon, 29 Jan 2024 16:07:58 -0500 Subject: [PATCH 5/5] fix typo --- covalent_azurebatch_plugin/assets/infra/main.tf | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/covalent_azurebatch_plugin/assets/infra/main.tf b/covalent_azurebatch_plugin/assets/infra/main.tf index 807f260..634c3ea 100644 --- a/covalent_azurebatch_plugin/assets/infra/main.tf +++ b/covalent_azurebatch_plugin/assets/infra/main.tf @@ -113,11 +113,5 @@ resource "local_file" "executor_config" { pool_id = "${azurerm_batch_pool.covalent.name}" retries = 3 base_image_uri = "${azurerm_container_registry.batch.login_server}/covalent-executor-base:latest" - } - ) -} - -resource "local_file" "executor_config" { - content = data.template_file.executor_config.rendered - filename = "${path.module}/azurebatch.conf" + }) }