Skip to content

Commit

Permalink
Merge pull request #12 from equinix-labs/fix-pre-commit
Browse files Browse the repository at this point in the history
Fix pre commit
  • Loading branch information
cprivitere authored Apr 8, 2024
2 parents 03d2a2f + d4a103d commit 5845f95
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
tf: [1.3.0]
tflint: [v0.44.1]
tf: [1.7.5]
tflint: [v0.50.3]
permissions:
pull-requests: write
id-token: write
Expand Down
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 5845f95

Please sign in to comment.