fix variable

This commit is contained in:
Valentin CZERYBA 2022-11-07 23:07:06 +01:00
parent 097d0621d6
commit 005127a37b
2 changed files with 5 additions and 5 deletions

View File

@ -16,6 +16,6 @@
method: GET method: GET
headers: headers:
X-Auth-Token: "{{ scw_secret_key }}" X-Auth-Token: "{{ scw_secret_key }}"
when: item.name == "{{ project_name }}" when: item.name == "{{ project_name_tf }}"
with_items: "{{ (output.content |from_json).clusters }}" with_items: "{{ (output.content |from_json).clusters }}"

View File

@ -17,7 +17,7 @@ terraform {
} }
resource "scaleway_k8s_pool" "john" { resource "scaleway_k8s_pool" "john" {
cluster_id = scaleway_k8s_cluster.{{ project_name }}.id cluster_id = scaleway_k8s_cluster.{{ project_name_tf }}.id
name = "john" name = "john"
node_type = "DEV1-M" node_type = "DEV1-M"
size = 1 size = 1
@ -26,9 +26,9 @@ terraform {
resource "null_resource" "kubeconfig" { resource "null_resource" "kubeconfig" {
depends_on = [scaleway_k8s_pool.john] # at least one pool here depends_on = [scaleway_k8s_pool.john] # at least one pool here
triggers = { triggers = {
host = scaleway_k8s_cluster.{{ project_name }}.kubeconfig[0].host host = scaleway_k8s_cluster.{{ project_name_tf }}.kubeconfig[0].host
token = scaleway_k8s_cluster.{{ project_name }}.kubeconfig[0].token token = scaleway_k8s_cluster.{{ project_name_tf }}.kubeconfig[0].token
cluster_ca_certificate = scaleway_k8s_cluster.{{ project_name }}.kubeconfig[0].cluster_ca_certificate cluster_ca_certificate = scaleway_k8s_cluster.{{ project_name_tf }}.kubeconfig[0].cluster_ca_certificate
} }
} }