Update terraform.tf, variables.tf, .gitlab-ci.yml

This commit is contained in:
2022-09-25 11:36:28 +00:00
parent 68522ddf39
commit b40be8fb6d
3 changed files with 9 additions and 7 deletions

View File

@@ -5,6 +5,10 @@ stages:
- ansible
- destroy
before_script:
- echo "token = \"$token\"" >> terraform.tfvars
- echo "config = \"$CI_PROJECT_DIR\\config\"" >> terraform.tfvars
include:
- project: 'developerdurp/yml-templates'
ref: 'main'
@@ -14,15 +18,9 @@ include:
plan production:
extends: .plan production
before_script:
- echo "token = \"$token\"" >> terraform.tfvars
apply:
extends: .apply
before_script:
- echo "token = \"$token\"" >> terraform.tfvars
destroy:
extends: .destroy
before_script:
- echo "token = \"$token\"" >> terraform.tfvars

View File

@@ -34,7 +34,7 @@ resource "linode_lke_cluster" "foobar" {
}
provider "kubectl" {
config_path = "$CI_PROJECT_DIR/config"
config_path = var.config
}
data "kubectl_file_documents" "namespace" {

View File

@@ -2,6 +2,10 @@ variable "token" {
description = "Your Linode API Personal Access Token. (required)"
}
variable "config" {
description = "kube config from lke"
}
variable "k8s_version" {
description = "The Kubernetes version to use for this cluster. (required)"
default = "1.23"