Skip to content

Commit

Permalink
Merge pull request #5196 from cloudflare/refine-schema-version-reset
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobbednarz authored Feb 26, 2025
2 parents 091523e + 5565468 commit 8ccb372
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ language json
pattern cloudflare_terraform_v5_attribute_renames_state() {
any {
// clear out any previously defined schema bumps
`"schema_version": $version`=> `"schema_version": 0`,
`{ "mode": "managed", "type": "$resource_type", $..., "instances":[$instances] }` where {
and {
$resource_type <: r"^cloudflare_.*",
$instances <: contains `"schema_version": $version`=> `"schema_version": 0`
}
},

// cloudflare_api_token
`{ "mode": "managed", "type": "$resource_type", $..., "instances":[$instances] }` where {
Expand Down Expand Up @@ -147,8 +152,8 @@ pattern cloudflare_terraform_v5_attribute_renames_state() {
`{ "mode": "managed", "type": "$resource_type", $..., "instances":[$instances] }` where {
and {
$resource_type <: contains `cloudflare_zone`,
$instances <: contains `"account_id": $v` => `"account": {
"id": $v
$instances <: contains `"account_id": $v` => `"account": {
"id": $v
}`
}
},
Expand Down

0 comments on commit 8ccb372

Please sign in to comment.