ske tf module
This commit is contained in:
parent
4e9fc826bf
commit
dcc8079e21
4 changed files with 53 additions and 0 deletions
12
ske/main.tf
Normal file
12
ske/main.tf
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
resource "stackit_ske_cluster" "this" {
|
||||
project_id = var.project_id
|
||||
name = var.name
|
||||
kubernetes_version_min = var.kubernetes_version_min
|
||||
node_pools = var.node_pools
|
||||
}
|
||||
|
||||
resource "stackit_ske_kubeconfig" "admin" {
|
||||
project_id = var.project_id
|
||||
cluster_name = stackit_ske_cluster.this.name
|
||||
refresh = true
|
||||
}
|
||||
10
ske/output.tf
Normal file
10
ske/output.tf
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
output "name" {
|
||||
description = "Name of SKE cluster"
|
||||
value = stackit_ske_cluster.this.name
|
||||
}
|
||||
|
||||
output "kubeconfig" {
|
||||
description = "Kubeconfig of SKE cluster"
|
||||
value = stackit_ske_kubeconfig.admin.kube_config
|
||||
sensitive = true
|
||||
}
|
||||
9
ske/providers.tf
Normal file
9
ske/providers.tf
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
terraform {
|
||||
required_version = ">= 1.9.0"
|
||||
required_providers {
|
||||
stackit = {
|
||||
source = "stackitcloud/stackit"
|
||||
version = "0.56.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
22
ske/variables.tf
Normal file
22
ske/variables.tf
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
variable "project_id" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "name" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "kubernetes_version_min" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "node_pools" {
|
||||
type = list(object({
|
||||
name = string
|
||||
machine_type = string
|
||||
availability_zones = list(string)
|
||||
volume_size = number
|
||||
minimum = number
|
||||
maximum = number
|
||||
}))
|
||||
}
|
||||
Loading…
Reference in a new issue