From 7287d733b0bd09b76d96d72f79ef9df5ce222c34 Mon Sep 17 00:00:00 2001 From: Dimitar Dimitrov Date: Fri, 23 Feb 2024 10:02:41 +0200 Subject: [PATCH] PRODENG-2550 Cleanup of the terraform module (#1) * PRODENG-2550 Added description to each variable Signed-off-by: Dimitar Dimitrov * PRODENG-2550 Moved vsphere provider to latest hashicorp/vsphere version Signed-off-by: Dimitar Dimitrov --------- Signed-off-by: Dimitar Dimitrov --- .gitignore | 9 +++++++++ main.tf | 1 - variables.tf | 9 +++++++-- versions.tf | 9 +++++++++ 4 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 .gitignore create mode 100644 versions.tf diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1811523 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +.DS_Store + +plan +ssh_keys/ +.terraform/ +*terraform.tfstate* +*.tfvars +*.tfvars.json +.terraform.lock.hcl \ No newline at end of file diff --git a/main.tf b/main.tf index dbddc6c..6b731b9 100644 --- a/main.tf +++ b/main.tf @@ -1,5 +1,4 @@ provider "vsphere" { - version = "~> 1.21" vsphere_server = var.vsphere_server user = var.vsphere_user password = var.vsphere_password diff --git a/variables.tf b/variables.tf index 0d6191a..480b69b 100644 --- a/variables.tf +++ b/variables.tf @@ -11,20 +11,25 @@ variable "vsphere_password" { } variable "datacenter" { - default = "" + default = "" + description = "Datacenter to deploy resources in" } variable "resource_pool" { + description = "Resource pool to deploy resources in" } variable "folder" { - default = "" + default = "" + description = "Folder to deploy resources in" } variable "datastore_cluster" { + description = "Datastore cluster to deploy resources in" } variable "network" { + description = "Network to deploy resources in" } variable "template_vm_linux" { diff --git a/versions.tf b/versions.tf new file mode 100644 index 0000000..9be442d --- /dev/null +++ b/versions.tf @@ -0,0 +1,9 @@ +terraform { + required_version = ">= 1.4.5" + required_providers { + google = { + source = "hashicorp/vsphere" + version = "2.6.1" + } + } +}