Skip to content

Commit

Permalink
delete node template custom_label
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanstankovcast committed Nov 27, 2023
1 parent 7e8ae36 commit 5281a23
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 9 deletions.
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,43 @@ module "castai-eks-cluster" {
}
EOT
}
```
Migrating from 6.x.x to 7.x.x
---------------------------

Version 7.x.x changed:
* Removed `custom_label` attribute in `castai_node_template` resource. Use `custom_labels` instead.

Old configuration:
```terraform
module "castai-eks-cluster" {
// ...
node_templates = {
spot_tmpl = {
custom_label = {
key = "custom-label-key-1"
value = "custom-label-value-1"
}
}
}
}
```

New configuration:
```terraform
module "castai-eks-cluster" {
// ...
node_templates = {
spot_tmpl = {
custom_labels = {
custom-label-key-1 = "custom-label-value-1"
}
}
}
}
```


Expand Down
9 changes: 0 additions & 9 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,6 @@ resource "castai_node_template" "this" {
configuration_id = try(each.value.configuration_id, null)
should_taint = try(each.value.should_taint, true)

dynamic "custom_label" {
for_each = flatten([lookup(each.value, "custom_label", [])])

content {
key = try(custom_label.value.key, null)
value = try(custom_label.value.value, null)
}
}

custom_labels = try(each.value.custom_labels, {})

dynamic "custom_taints" {
Expand Down

0 comments on commit 5281a23

Please sign in to comment.