Skip to content

Commit b7318f0

Browse files
trouzeclaude
andcommitted
fix: add resource_metadata to global_connection datasource schema
The datasource reuses GlobalConnectionResourceModel which now has ResourceMetadata, but the datasource schema was missing the field. This caused a schema/model mismatch that silently zeroed state.ID, resulting in a connections/0/ 404 on every datasource read. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
1 parent 13b54f6 commit b7318f0

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

docs/data-sources/global_connection.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ data dbtcloud_global_connection my_connection {
2525

2626
- `id` (Number) Connection Identifier
2727

28+
### Optional
29+
30+
- `resource_metadata` (Dynamic) Metadata for tracking resource identity during account migrations. Stored in Terraform state only and not sent to the API.
31+
2832
### Read-Only
2933

3034
- `adapter_version` (String) Version of the adapter

pkg/framework/objects/global_connection/schema.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,6 +1172,10 @@ func (r *globalConnectionDataSource) Schema(
11721172
},
11731173
},
11741174
},
1175+
"resource_metadata": datasource_schema.DynamicAttribute{
1176+
Optional: true,
1177+
Description: "Metadata for tracking resource identity during account migrations. Stored in Terraform state only and not sent to the API.",
1178+
},
11751179
},
11761180
}
11771181
}

0 commit comments

Comments
 (0)