Skip to content

Commit b48e521

Browse files
committed
Run fmt recursive
1 parent 0ecffa1 commit b48e521

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ repos:
44
hooks:
55
- id: terraform_docs
66
- id: terraform_fmt
7+
args:
8+
- --args=-recursive
79
- id: terraform_validate
810
args:
911
- --hook-config=--retry-once-with-cleanup=true

tests/custom_rules_override.tftest.hcl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ run "create_vault_with_custom_rules" {
44
plan_name = "example-plan"
55

66
predefined_rules = ["daily-snapshot", "yearly-snapshot"]
7-
custom_rules = [
7+
custom_rules = [
88
# Daily Snapshot but change the schedule to run at 12:00 UTC
99
{
1010
name = "daily-snapshot"
@@ -13,7 +13,7 @@ run "create_vault_with_custom_rules" {
1313

1414
# Yearly Snapshot but delete after 3 years instead
1515
{
16-
name = "yearly-snapshot"
16+
name = "yearly-snapshot"
1717
lifecycle = {
1818
delete_after = 1095
1919
}
@@ -37,12 +37,12 @@ run "create_vault_with_custom_rules" {
3737
}
3838

3939
assert {
40-
condition = one([for rule in aws_backup_plan.main.rule : rule if rule.rule_name == "daily-snapshot" ]).schedule == "cron(0 12 ? * * *)"
40+
condition = one([for rule in aws_backup_plan.main.rule : rule if rule.rule_name == "daily-snapshot"]).schedule == "cron(0 12 ? * * *)"
4141
error_message = "Expected daily-snapshot rule to have new schedule."
4242
}
4343

4444
assert {
45-
condition = one(one([for rule in aws_backup_plan.main.rule : rule if rule.rule_name == "yearly-snapshot" ]).lifecycle).delete_after == 1095
45+
condition = one(one([for rule in aws_backup_plan.main.rule : rule if rule.rule_name == "yearly-snapshot"]).lifecycle).delete_after == 1095
4646
error_message = "Expected yearly-snapshot rule to have new lifecycle."
4747
}
4848
}

0 commit comments

Comments
 (0)