From ced3058862b866ea6f78c20553d363e84ff1342f Mon Sep 17 00:00:00 2001 From: Serge Logvinov Date: Tue, 14 Jun 2022 23:34:29 +0300 Subject: [PATCH] Name of image --- azure/images/gallery.tf | 6 +++--- azure/images/variables.tf | 10 ++++++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/azure/images/gallery.tf b/azure/images/gallery.tf index 7c4634d..2be34e9 100644 --- a/azure/images/gallery.tf +++ b/azure/images/gallery.tf @@ -1,6 +1,6 @@ data "azurerm_resource_group" "kubernetes" { - name = var.project + name = var.resource_group } resource "random_id" "images" { @@ -31,7 +31,7 @@ resource "azurerm_shared_image" "talos" { # specialized = true identifier { - publisher = var.project + publisher = var.name offer = "Talos-${lower(each.key)}" sku = "1.0-dev" } @@ -61,7 +61,7 @@ resource "azurerm_storage_account" "images" { } resource "azurerm_storage_container" "images" { - name = lower(var.project) + name = lower(var.name) storage_account_name = azurerm_storage_account.images.name container_access_type = "private" } diff --git a/azure/images/variables.tf b/azure/images/variables.tf index 6c30fe8..2a0c03f 100644 --- a/azure/images/variables.tf +++ b/azure/images/variables.tf @@ -4,8 +4,8 @@ variable "subscription_id" { type = string } -variable "project" { - description = "The project name" +variable "resource_group" { + description = "The existed resource group" type = string } @@ -15,6 +15,12 @@ variable "regions" { default = ["uksouth", "ukwest"] } +variable "name" { + description = "The image name" + type = string + default = "talos" +} + variable "arch" { description = "The Talos architecture list" type = list(string)