Closed amitaymolko closed 5 years ago
in terraform-spotinst-modules/spotinst_ocean_controller/main.tf
try to fix by adding "" to variable name spotinst.token --> "spotinst.token"
fixed code: resource "kubernetes_config_map" "configmap" { metadata { name = "spotinst-kubernetes-cluster-controller-config" namespace = "kube-system" }
data { "spotinst.token" = "${var.spotinst_token}" "spotinst.account" = "${var.spotinst_account}" "spotinst.cluster-identifier" = "${var.spotinst_cluster_identifier}" } }
I ended up implementing it with helm provider as so:
data "helm_repository" "spotinst" {
name = "spotinst"
url = "https://spotinst.github.io/spotinst-kubernetes-helm-charts"
}
resource "helm_release" "spotinst-controller" {
name = "spotinst-controller"
repository = "${data.helm_repository.spotinst.metadata.0.name}"
chart = "spotinst-kubernetes-cluster-controller"
values = [<<EOF
spotinst:
token: ${var.spotinst_token}
account: ${var.spotinst_account}
clusterIdentifier: ${var.spotinst_cluster_identifier}
EOF
]
}
Thank you for letting us know. Fixed by #18 and #20. Closing for now.
Terraform version: Terraform v0.12.8 Spotinst plugin installed manually via https://api.spotinst.com/provisioning-ci-cd-sdk/provisioning-tools/terraform/installation/installation-links/
I am trying to set up the Spotinst k8s controller. I've successfully created the EKS cluster and Spotinst Elastigroup with terraform. Now I am trying to get the Spotinst k8 controller to deploy via terraform. I've added:
When I run
terraform init
I get the following error: