Update terraform.tf, variables.tf, .gitlab-ci.yml
This commit is contained in:
@@ -5,6 +5,10 @@ stages:
|
|||||||
- ansible
|
- ansible
|
||||||
- destroy
|
- destroy
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- echo "token = \"$token\"" >> terraform.tfvars
|
||||||
|
- echo "config = \"$CI_PROJECT_DIR\\config\"" >> terraform.tfvars
|
||||||
|
|
||||||
include:
|
include:
|
||||||
- project: 'developerdurp/yml-templates'
|
- project: 'developerdurp/yml-templates'
|
||||||
ref: 'main'
|
ref: 'main'
|
||||||
@@ -14,15 +18,9 @@ include:
|
|||||||
|
|
||||||
plan production:
|
plan production:
|
||||||
extends: .plan production
|
extends: .plan production
|
||||||
before_script:
|
|
||||||
- echo "token = \"$token\"" >> terraform.tfvars
|
|
||||||
|
|
||||||
apply:
|
apply:
|
||||||
extends: .apply
|
extends: .apply
|
||||||
before_script:
|
|
||||||
- echo "token = \"$token\"" >> terraform.tfvars
|
|
||||||
|
|
||||||
destroy:
|
destroy:
|
||||||
extends: .destroy
|
extends: .destroy
|
||||||
before_script:
|
|
||||||
- echo "token = \"$token\"" >> terraform.tfvars
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ resource "linode_lke_cluster" "foobar" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
provider "kubectl" {
|
provider "kubectl" {
|
||||||
config_path = "$CI_PROJECT_DIR/config"
|
config_path = var.config
|
||||||
}
|
}
|
||||||
|
|
||||||
data "kubectl_file_documents" "namespace" {
|
data "kubectl_file_documents" "namespace" {
|
||||||
|
|||||||
@@ -2,6 +2,10 @@ variable "token" {
|
|||||||
description = "Your Linode API Personal Access Token. (required)"
|
description = "Your Linode API Personal Access Token. (required)"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "config" {
|
||||||
|
description = "kube config from lke"
|
||||||
|
}
|
||||||
|
|
||||||
variable "k8s_version" {
|
variable "k8s_version" {
|
||||||
description = "The Kubernetes version to use for this cluster. (required)"
|
description = "The Kubernetes version to use for this cluster. (required)"
|
||||||
default = "1.23"
|
default = "1.23"
|
||||||
|
|||||||
Reference in New Issue
Block a user