Skip to content

Commit

Permalink
chore: fix pre-commit spotted errors
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Privitere <[email protected]>
  • Loading branch information
cprivitere committed Apr 8, 2024
1 parent 53ea2cf commit d4a103d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
locals {
project_id = var.create_project ? equinix_metal_project.nutanix.*.id[0] : data.equinix_metal_project.nutanix.id
project_id = var.create_project ? equinix_metal_project.nutanix[*].id[0] : data.equinix_metal_project.nutanix.id
}

resource "equinix_metal_project" "nutanix" {
count = var.create_project ? 1 : 0
name = var.metal_project_name
name = var.metal_project_name
}

data "equinix_metal_project" "nutanix" {
Expand Down
8 changes: 7 additions & 1 deletion providers.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
terraform {
required_version = ">= 1.0"
required_providers {
equinix = {
source = "equinix/equinix"
source = "equinix/equinix"
version = ">=1.3"
}
tls = {
source = "hashicorp/tls"
version = ">=4"
}
}
}
Expand Down
10 changes: 8 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
variable "metal_auth_token" {
type = string
description = "Your Equinix Metal API Token"
}

variable "metal_vlan_description" {
default = "ntnx-demo"
type = string
default = "ntnx-demo"
description = "Description added to VLAN created for your Nutanix Cluster"
}

variable "metal_project_name" {
type = string
description = "The name of the Metal project in which to deploy the cluster. If create_project is false the project will be looked up by name."
}

variable "create_project" {
default = true
type = bool
default = true
description = "(Optional) to use an existing project matching `metal_project_name`, set this to false"
}

0 comments on commit d4a103d

Please sign in to comment.