-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathmise.toml
More file actions
57 lines (52 loc) · 1.33 KB
/
mise.toml
File metadata and controls
57 lines (52 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
[tools]
tflint = "latest"
pre-commit = "latest"
terraform = "1.10"
opentofu = "1.10"
uv = "latest"
[tasks]
lint = ["terraform fmt -recursive", "tflint --recursive"]
setup = ["pre-commit install", "tflint --init"]
precommit = ["pre-commit run --all-files"]
[tasks.validate]
description = "Validate the Terraform module and example code"
run = """
#!/usr/bin/env bash
set -e
echo "Validating module"
terraform init -upgrade
terraform validate
echo "Validating example code"
cd examples/braintrust-data-plane
# Override the module source to point to the local module.
# '*_override.tf' is a lesser known native terraform feature
trap 'rm -f main_override.tf' EXIT
cat <<EOF> main_override.tf
module "braintrust-data-plane" {
source = "../../"
}
EOF
terraform init -upgrade
terraform validate
"""
[tasks.validate-tofu]
description = "Validate the Terraform module and example code using OpenTofu"
run = """
#!/usr/bin/env bash
set -e
echo "Validating module with OpenTofu"
tofu init -upgrade
tofu validate
echo "Validating example code with OpenTofu"
cd examples/braintrust-data-plane
# Override the module source to point to the local module.
# '*_override.tf' is a lesser known native terraform feature
trap 'rm -f main_override.tf' EXIT
cat <<EOF> main_override.tf
module "braintrust-data-plane" {
source = "../../"
}
EOF
tofu init -upgrade
tofu validate
"""