Enabled module_name in provider meta for Equinix (#10044)

pull/10112/head
Vasubabu 2023-05-22 06:02:19 +05:30 committed by GitHub
parent 09ea2ca688
commit feeea7e512
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 12 deletions

View File

@ -110,7 +110,7 @@ tf-validate-upcloud:
# TF_VAR_number_of_k8s_nodes: "1"
# TF_VAR_plan_k8s_masters: t1.small.x86
# TF_VAR_plan_k8s_nodes: t1.small.x86
# TF_VAR_facility: ewr1
# TF_VAR_metro: ny
# TF_VAR_public_key_path: ""
# TF_VAR_operating_system: ubuntu_16_04
#
@ -124,7 +124,7 @@ tf-validate-upcloud:
# TF_VAR_number_of_k8s_nodes: "1"
# TF_VAR_plan_k8s_masters: t1.small.x86
# TF_VAR_plan_k8s_nodes: t1.small.x86
# TF_VAR_facility: ams1
# TF_VAR_metro: am
# TF_VAR_public_key_path: ""
# TF_VAR_operating_system: ubuntu_18_04

View File

@ -10,7 +10,7 @@ resource "equinix_metal_device" "k8s_master" {
count = var.number_of_k8s_masters
hostname = "${var.cluster_name}-k8s-master-${count.index + 1}"
plan = var.plan_k8s_masters
facilities = [var.facility]
metro = var.metro
operating_system = var.operating_system
billing_cycle = var.billing_cycle
project_id = var.equinix_metal_project_id
@ -23,7 +23,7 @@ resource "equinix_metal_device" "k8s_master_no_etcd" {
count = var.number_of_k8s_masters_no_etcd
hostname = "${var.cluster_name}-k8s-master-${count.index + 1}"
plan = var.plan_k8s_masters_no_etcd
facilities = [var.facility]
metro = var.metro
operating_system = var.operating_system
billing_cycle = var.billing_cycle
project_id = var.equinix_metal_project_id
@ -36,7 +36,7 @@ resource "equinix_metal_device" "k8s_etcd" {
count = var.number_of_etcd
hostname = "${var.cluster_name}-etcd-${count.index + 1}"
plan = var.plan_etcd
facilities = [var.facility]
metro = var.metro
operating_system = var.operating_system
billing_cycle = var.billing_cycle
project_id = var.equinix_metal_project_id
@ -49,7 +49,7 @@ resource "equinix_metal_device" "k8s_node" {
count = var.number_of_k8s_nodes
hostname = "${var.cluster_name}-k8s-node-${count.index + 1}"
plan = var.plan_k8s_nodes
facilities = [var.facility]
metro = var.metro
operating_system = var.operating_system
billing_cycle = var.billing_cycle
project_id = var.equinix_metal_project_id

View File

@ -1,9 +1,13 @@
terraform {
required_version = ">= 1.0.0"
provider_meta "equinix" {
module_name = "kubespray"
}
required_providers {
equinix = {
source = "equinix/equinix"
version = ">=1.11.0"
version = "~> 1.14"
}
}
}

View File

@ -9,8 +9,8 @@ equinix_metal_project_id = "Example-Project-Id"
# Terraform will complain if the public key is setup in Equinix Metal
public_key_path = "~/.ssh/id_rsa.pub"
# cluster location
facility = "ewr1"
# Equinix interconnected bare metal across our global metros.
metro = "da"
# operating_system
operating_system = "ubuntu_22_04"

View File

@ -19,8 +19,8 @@ variable "billing_cycle" {
default = "hourly"
}
variable "facility" {
default = "dfw2"
variable "metro" {
default = "da"
}
variable "plan_k8s_masters" {

View File

@ -48,7 +48,7 @@ equinix_metal_project_id = "_redacted_"
public_key_path = "~/.ssh/id_rsa.pub"
# cluster location
facility = "am6"
metro = "da"
# standalone etcds
number_of_etcd = 0