Skip to content

Commit d4bfac8

Browse files
for_object_expr: allow ellipsis in separate line (#221)
1 parent 58b7334 commit d4bfac8

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
99

1010
### Fixed
1111

12+
- Issue parsing ellipsis in a separate line within `for` expression ([#221](https://github.com/amplify-education/python-hcl2/pull/221))
1213
- Issue parsing inline expression as an object key; **see Limitations in README.md** ([#222](https://github.com/amplify-education/python-hcl2/pull/222))
1314

1415
## \[7.1.0\] - 2025-04-10

test/helpers/terraform-config-json/variables.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@
5454
"empty_tuple": []
5555
},
5656
{
57-
"route53_forwarding_rule_shares": "${{for forwarding_rule_key in keys(var.route53_resolver_forwarding_rule_shares) : \"${forwarding_rule_key}\" => {\"aws_account_ids\": \"${[for account_name in var.route53_resolver_forwarding_rule_shares[forwarding_rule_key].aws_account_names : module.remote_state_subaccounts.map[account_name].outputs[\"aws_account_id\"]]}\"}}}",
57+
"route53_forwarding_rule_shares": "${{for forwarding_rule_key in keys(var.route53_resolver_forwarding_rule_shares) : \"${forwarding_rule_key}\" => {\"aws_account_ids\": \"${[for account_name in var.route53_resolver_forwarding_rule_shares[forwarding_rule_key].aws_account_names : module.remote_state_subaccounts.map[account_name].outputs[\"aws_account_id\"]]}\"} ...}}",
5858
"has_valid_forwarding_rules_template_inputs": "${(length(keys(var.forwarding_rules_template.copy_resolver_rules)) > 0 && length(var.forwarding_rules_template.replace_with_target_ips) > 0 && length(var.forwarding_rules_template.exclude_cidrs) > 0)}",
59-
"for_whitespace": "${{for i in [1, 2, 3] : i => i}}"
59+
"for_whitespace": "${{for i in [1, 2, 3] : i => i ...}}"
6060
},
6161
{
6262
"nested_data": [

test/helpers/terraform-config/variables.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ locals {
6565
module.remote_state_subaccounts.map[account_name].outputs["aws_account_id"]
6666
]
6767
}
68+
...
6869
}
6970
has_valid_forwarding_rules_template_inputs = (
7071
length(keys(var.forwarding_rules_template.copy_resolver_rules)) > 0
@@ -74,7 +75,7 @@ locals {
7475

7576
for_whitespace = { for i in [1, 2, 3] :
7677
i =>
77-
i
78+
i ...
7879
}
7980
}
8081

0 commit comments

Comments
 (0)