Changing random id regeneration conditions
This commit is contained in:
parent
2931f4a69c
commit
5f7ee70538
2 changed files with 11 additions and 3 deletions
|
|
@ -42,6 +42,14 @@ locals {
|
|||
|
||||
resource "random_id" "cluster_suffix" {
|
||||
byte_length = 4
|
||||
keepers = {
|
||||
# Regenerate when any of these values change
|
||||
cluster_name = var.cluster_name
|
||||
memory_mb = var.memory_mb
|
||||
vcpu_count = var.vcpu_count
|
||||
talos_version = var.talos_version
|
||||
cleanup_script_hash = filesha1("${path.module}/cleanup.sh")
|
||||
}
|
||||
}
|
||||
|
||||
resource "null_resource" "talos_cluster" {
|
||||
|
|
@ -88,8 +96,8 @@ resource "null_resource" "talos_cluster" {
|
|||
--cpus ${self.triggers.vcpu_count}
|
||||
|
||||
# Change ownership of the generated files in ~/.talos and ~/.kube
|
||||
sudo chown -R $(id -u):$(id -g) $(HOME)/.talos
|
||||
sudo chown -R $(id -u):$(id -g) $(HOME)/.kube
|
||||
sudo chown -R $(id -u):$(id -g) $HOME/.talos
|
||||
sudo chown -R $(id -u):$(id -g) $HOME/.kube
|
||||
EOT
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# You can customize these values
|
||||
cluster_name = "evo-npcs-infra"
|
||||
cluster_name = "evo-npcs-clust"
|
||||
memory_mb = 2048
|
||||
vcpu_count = 2
|
||||
talos_version = "v1.11.1"
|
||||
Loading…
Add table
Reference in a new issue