From 2d00c96c671db750985e4ae2073dd9d1dc0a76d1 Mon Sep 17 00:00:00 2001 From: "Jorge E. Gamboa G." Date: Tue, 16 Jan 2024 11:44:51 +0100 Subject: [PATCH] Changing to name --- gcp/sa/main.tf | 4 ++-- gcp/sa/variables.tf | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gcp/sa/main.tf b/gcp/sa/main.tf index 4e0798ca..87116e43 100644 --- a/gcp/sa/main.tf +++ b/gcp/sa/main.tf @@ -1,6 +1,6 @@ resource "google_service_account" "this" { account_id = var.account_id - display_name = "${project_name}-sa" + display_name = "${var.name}-sa" project = var.project_id } @@ -16,7 +16,7 @@ resource "google_project_iam_binding" "role_bindings" { resource "google_project" "this" { count = var.create_project ? 1 : 0 - name = var.project_name + name = var.name project_id = var.project_id folder_id = var.folder_id } diff --git a/gcp/sa/variables.tf b/gcp/sa/variables.tf index 95bdba4c..3fd62348 100644 --- a/gcp/sa/variables.tf +++ b/gcp/sa/variables.tf @@ -1,3 +1,8 @@ +variable "name" { + description = "The displayed name of the project" + type = string +} + variable "account_id" { description = "The ID of the account for the service account" type = string @@ -14,11 +19,6 @@ variable "create_project" { default = false } -variable "project_name" { - description = "The displayed name of the project" - type = string -} - variable "project_id" { description = "The ID of the project to be created" type = string