This repository was archived by the owner on Aug 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -67,14 +67,6 @@ data ibm_container_cluster_config cluster {
6767resource null_resource setup_kube_config {
6868 depends_on = [null_resource. create_dirs , data . ibm_container_cluster_config . cluster ]
6969
70- provisioner "local-exec" {
71- command = " rm -f ${ local . cluster_config } && ln -s ${ data . ibm_container_cluster_config . cluster . config_file_path } ${ local . cluster_config } "
72- }
73-
74- provisioner "local-exec" {
75- command = " cp ${ regex (" (.*)/config.yml" , data. ibm_container_cluster_config . cluster . config_file_path )[0 ]} /* ${ local . cluster_config_dir } "
76- }
77-
7870 provisioner "local-exec" {
7971 command = " echo 'Waiting for 5 minutes for permissions to be established...' && sleep 300"
8072 }
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ locals {
1818 }
1919 }
2020 cluster_config_dir = " ${ path . cwd } /.kube"
21- cluster_config = " ${ local . cluster_config_dir } /config "
21+ cluster_config = data . ibm_container_cluster_config . cluster . config_file_path
2222 cluster_type_file = " ${ path . cwd } /.tmp/cluster_type.val"
2323 name_prefix = var. name_prefix != " " ? var. name_prefix : var. resource_group_name
2424 name_list = [local . name_prefix , " cluster" ]
@@ -48,9 +48,14 @@ locals {
4848}
4949
5050resource null_resource create_dirs {
51+ triggers = {
52+ always_run = timestamp ()
53+ }
54+
5155 provisioner "local-exec" {
5256 command = " echo 'regex: ${ local . cluster_regex } '"
5357 }
58+
5459 provisioner "local-exec" {
5560 command = " echo 'cluster_type_cleaned: ${ local . cluster_type_cleaned } '"
5661 }
@@ -76,6 +81,7 @@ resource null_resource print_resources {
7681 }
7782}
7883
84+ # separated to prevent circular dependency
7985resource null_resource print_subnets {
8086 provisioner "local-exec" {
8187 command = " echo 'VPC subnet count: ${ local . vpc_subnet_count } '"
You can’t perform that action at this time.
0 commit comments