Skip to content

Commit 8ccb372

Browse files
authored
Merge pull request #5196 from cloudflare/refine-schema-version-reset
2 parents 091523e + 5565468 commit 8ccb372

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.grit/patterns/cloudflare_terraform_v5_attribute_renames_state.grit

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ language json
33
pattern cloudflare_terraform_v5_attribute_renames_state() {
44
any {
55
// clear out any previously defined schema bumps
6-
`"schema_version": $version`=> `"schema_version": 0`,
6+
`{ "mode": "managed", "type": "$resource_type", $..., "instances":[$instances] }` where {
7+
and {
8+
$resource_type <: r"^cloudflare_.*",
9+
$instances <: contains `"schema_version": $version`=> `"schema_version": 0`
10+
}
11+
},
712

813
// cloudflare_api_token
914
`{ "mode": "managed", "type": "$resource_type", $..., "instances":[$instances] }` where {
@@ -147,8 +152,8 @@ pattern cloudflare_terraform_v5_attribute_renames_state() {
147152
`{ "mode": "managed", "type": "$resource_type", $..., "instances":[$instances] }` where {
148153
and {
149154
$resource_type <: contains `cloudflare_zone`,
150-
$instances <: contains `"account_id": $v` => `"account": {
151-
"id": $v
155+
$instances <: contains `"account_id": $v` => `"account": {
156+
"id": $v
152157
}`
153158
}
154159
},

0 commit comments

Comments
 (0)