diff --git a/CHANGELOG.md b/CHANGELOG.md index b76e247..f76c226 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ -## 0.1.0 (Unreleased) +## 0.1.2 (April 2, 2024) -FEATURES: +* Documentation updates + +## 0.1.1 (April 2, 2024) + +* Documentation updates + +## 0.1.0 (April 2, 2024) + +NOTES: + +* initial beta release diff --git a/docs/functions/between.md b/docs/functions/between.md index 4c19c65..a7de086 100644 --- a/docs/functions/between.md +++ b/docs/functions/between.md @@ -29,7 +29,7 @@ run "ebs_volume_size" { variable "ebs_volume_size" { type = number validation { - condition = provider::assert::between(1, 100, aws_ebs_volume.example.size) + condition = provider::assert::between(1, 100, var.ebs_volume_size) error_message = "EBS volume size must be between 1 and 100 GiB" } } diff --git a/docs/functions/null.md b/docs/functions/null.md index ac8015a..8808d55 100644 --- a/docs/functions/null.md +++ b/docs/functions/null.md @@ -15,10 +15,13 @@ description: |- ```terraform variable "example" { - type = string + type = object({ + name = string + value = optional(string) + }) validation { - condition = provider::assert::null(var.example) || length(var.example_variable) > 0 - error_message = "Must either be a non-empty string or null" + condition = provider::assert::null(var.example.value) + error_message = "Value must be null" } } ``` diff --git a/docs/index.md b/docs/index.md index 8e974bb..8bf472d 100644 --- a/docs/index.md +++ b/docs/index.md @@ -26,7 +26,7 @@ Define the provider as a `required_provider` to use its functions terraform { required_providers { assert = { - source = "bschaatsbergen/assert" + source = "bschaatsbergen/assert" } } } diff --git a/examples/functions/null/variable.tf b/examples/functions/null/variable.tf index c08ddf8..667f66d 100644 --- a/examples/functions/null/variable.tf +++ b/examples/functions/null/variable.tf @@ -1,7 +1,10 @@ variable "example" { - type = string + type = object({ + name = string + value = optional(string) + }) validation { - condition = provider::assert::null(var.example) || length(var.example_variable) > 0 - error_message = "Must either be a non-empty string or null" + condition = provider::assert::null(var.example.value) + error_message = "Value must be null" } } diff --git a/examples/provider/provider.tf b/examples/provider/provider.tf index ec4b552..0ff417c 100644 --- a/examples/provider/provider.tf +++ b/examples/provider/provider.tf @@ -1,7 +1,7 @@ terraform { required_providers { assert = { - source = "bschaatsbergen/assert" + source = "bschaatsbergen/assert" } } }