Skip to content

Commit ae22af5

Browse files
authoredFeb 12, 2025··
fix(grit): handle inner objects within the object for records
1 parent 1b70a64 commit ae22af5

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed
 

‎.grit/patterns/cloudflare_terraform_v5_attribute_renames_state.grit

+19-1
Original file line numberDiff line numberDiff line change
@@ -226,10 +226,28 @@ pattern cloudflare_terraform_v5_attribute_renames_state() {
226226
},
227227

228228
// cloudflare_record
229+
`{ "mode": "managed", "type": "$resource_type", $..., "instances":[$instances] }` where {
230+
or {
231+
and {
232+
$resource_type <: contains `cloudflare_record`,
233+
$instances <: contains `"data": []` => `"data": {}`
234+
},
235+
and {
236+
$resource_type <: contains `cloudflare_record`,
237+
$instances <: contains `"data": [$inner]` => `"data": $inner`
238+
}
239+
}
240+
},
241+
`{ "mode": "managed", "type": "$resource_type", $..., "instances":[$instances] }` where {
242+
and {
243+
$resource_type <: contains `cloudflare_record`,
244+
$instances <: contains `"hostname": $v` => .
245+
}
246+
},
229247
`{ "mode": "managed", "type": "$resource_type", $..., "instances":[$instances] }` where {
230248
and {
231249
$resource_type <: contains `cloudflare_record`,
232-
$instances <: contains `"data": [$inner]` => `"data": {$inner}`
250+
$instances <: contains `"allow_overwrite": $v` => .
233251
}
234252
},
235253
}

0 commit comments

Comments
 (0)
Please sign in to comment.