Skip to content

Commit 13b54f6

Browse files
trouzeclaude
andcommitted
feat: add resource_metadata Dynamic field to all resource schemas and models (closes #662)
Adds optional resource_metadata attribute of type Dynamic to every resource schema and ResourceModel struct. The field is persisted in Terraform state only and is not sent to the API. Intended for account migration tooling to track identity mappings between old and new resource IDs across tenancies. Regenerates docs for all affected resources. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
1 parent 17814e7 commit 13b54f6

152 files changed

Lines changed: 554 additions & 180 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
kind: Changes
2+
body: Add optional `resource_metadata` Dynamic field to all resource schemas and models for account migration tooling support
3+
time: 2026-04-09T19:58:00.000000+00:00

docs/resources/account_features.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ resource "dbtcloud_account_features" "my_features" {
4747
- `fusion_migration_permissions` (Boolean) Whether permissions for accounts migrating to Fusion are enabled.
4848
- `partial_parsing` (Boolean) Whether partial parsing is enabled.
4949
- `repo_caching` (Boolean) Whether repository caching is enabled.
50+
- `resource_metadata` (Dynamic) Metadata for tracking resource identity during account migrations. Stored in Terraform state only and not sent to the API.
5051

5152
### Read-Only
5253

docs/resources/athena_credential.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ resource "dbtcloud_athena_credential" "example_wo" {
6161
- `aws_secret_access_key` (String, Sensitive) AWS secret access key for Athena user. Consider using `aws_secret_access_key_wo` instead, which is not stored in state.
6262
- `aws_secret_access_key_wo` (String) Write-only alternative to `aws_secret_access_key`. The value is not stored in state. Requires `aws_secret_access_key_wo_version` to trigger updates.
6363
- `aws_secret_access_key_wo_version` (Number) Version number for `aws_secret_access_key_wo`. Increment this value to trigger an update of the AWS secret access key when using `aws_secret_access_key_wo`.
64+
- `resource_metadata` (Dynamic) Metadata for tracking resource identity during account migrations. Stored in Terraform state only and not sent to the API.
6465

6566
### Read-Only
6667

docs/resources/auth_provider.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ resource "dbtcloud_auth_provider" "gsuite" {
166166
- `gsuite_admin_id` (String) Google Workspace admin email used to fetch group memberships.
167167
- `include_indirect_groups` (Boolean) Whether to include transitive (indirect) group memberships from Azure AD. Defaults to true.
168168
- `max_groups_to_retrieve` (Number) Maximum number of Azure AD groups to fetch per user. Defaults to 250.
169+
- `resource_metadata` (Dynamic) Metadata for tracking resource identity during account migrations. Stored in Terraform state only and not sent to the API.
169170
- `sign_request` (Boolean) Whether to sign SAML authentication requests. Defaults to false.
170171
- `slug` (String) URL-safe identifier used in the SSO login URL. Auto-generated if omitted. Immutable on accounts where auto-slug enforcement is enabled.
171172
- `sso_url` (String) SAML Single Sign-On URL from your identity provider. Required for `saml` and `okta`.

docs/resources/azure_ad_application.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ resource "dbtcloud_azure_ad_application" "this" {
5555
### Optional
5656

5757
- `azure_service_authentication_method` (String) The method used for service authentication. One of: ~~~service_user~~~, ~~~service_principal~~~. Defaults to ~~~service_user~~~.
58+
- `resource_metadata` (Dynamic) Metadata for tracking resource identity during account migrations. Stored in Terraform state only and not sent to the API.
5859

5960
### Read-Only
6061

docs/resources/bigquery_credential.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ resource "dbtcloud_bigquery_credential" "my_credential_v1" {
4242

4343
- `connection_id` (Number) The ID of the global connection to use for this credential. When provided, the credential will automatically use the correct adapter version based on the connection's configuration (e.g., bigquery_v1 for connections with use_latest_adapter=true).
4444
- `is_active` (Boolean) Whether the BigQuery credential is active
45+
- `resource_metadata` (Dynamic) Metadata for tracking resource identity during account migrations. Stored in Terraform state only and not sent to the API.
4546

4647
### Read-Only
4748

docs/resources/bigquery_semantic_layer_credential.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ resource "dbtcloud_bigquery_semantic_layer_credential" "example" {
5858
- `private_key` (String, Sensitive) Private Key for the Service Account. Consider using `private_key_wo` instead, which is not stored in state.
5959
- `private_key_wo` (String) Write-only alternative to `private_key`. The value is not stored in state. Requires `private_key_wo_version` to trigger updates.
6060
- `private_key_wo_version` (Number) Version number for `private_key_wo`. Increment this value to trigger an update of the private key when using `private_key_wo`.
61+
- `resource_metadata` (Dynamic) Metadata for tracking resource identity during account migrations. Stored in Terraform state only and not sent to the API.
6162

6263
### Read-Only
6364

@@ -86,6 +87,7 @@ Optional:
8687

8788
- `connection_id` (Number) The ID of the global connection to use for this credential. When provided, the credential will automatically use the correct adapter version based on the connection's configuration (e.g., bigquery_v1 for connections with use_latest_adapter=true).
8889
- `is_active` (Boolean) Whether the BigQuery credential is active
90+
- `resource_metadata` (Dynamic) Metadata for tracking resource identity during account migrations. Stored in Terraform state only and not sent to the API.
8991

9092
Read-Only:
9193

docs/resources/connection_catalog_config.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ resource "dbtcloud_connection_catalog_config" "with_creds" {
9999

100100
- `database_allow` (List of String) List of database names to include. Supports wildcards (e.g., 'analytics_*'). If set, only these databases are ingested.
101101
- `database_deny` (List of String) List of database names to exclude. Supports wildcards (e.g., 'staging_*'). Matching databases are not ingested.
102+
- `resource_metadata` (Dynamic) Metadata for tracking resource identity during account migrations. Stored in Terraform state only and not sent to the API.
102103
- `schema_allow` (List of String) List of schema names to include. Supports wildcards (e.g., 'public_*'). If set, only these schemas are ingested.
103104
- `schema_deny` (List of String) List of schema names to exclude. Supports wildcards (e.g., 'temp_*'). Matching schemas are not ingested.
104105
- `table_allow` (List of String) List of table names to include. Supports wildcards (e.g., 'fact_*'). If set, only these tables are ingested.

docs/resources/databricks_credential.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ resource "dbtcloud_databricks_credential" "my_databricks_cred_wo" {
5050

5151
- `adapter_type` (String, Deprecated) The type of the adapter. 'spark' is deprecated, but still supported for backwards compatibility. For Spark, please use the spark_credential resource. Optional only when semantic_layer_credential is set to true; otherwise, this field is required.
5252
- `catalog` (String) The catalog where to create models (only for the databricks adapter)
53+
- `resource_metadata` (Dynamic) Metadata for tracking resource identity during account migrations. Stored in Terraform state only and not sent to the API.
5354
- `schema` (String) The schema where to create models. Optional only when semantic_layer_credential is set to true; otherwise, this field is required.
5455
- `semantic_layer_credential` (Boolean) This field indicates that the credential is used as part of the Semantic Layer configuration. It is used to create a Databricks credential for the Semantic Layer.
5556
- `target_name` (String, Deprecated) Target name

docs/resources/databricks_platform_metadata_credential.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ resource "dbtcloud_databricks_platform_metadata_credential" "example_wo" {
7777
- `catalog_ingestion_enabled` (Boolean) Whether catalog ingestion is enabled for this credential. When enabled, dbt Cloud will ingest metadata about tables, views, and other objects from your data warehouse.
7878
- `cost_insights_enabled` (Boolean) Whether cost insights is enabled for this credential.
7979
- `cost_optimization_enabled` (Boolean) Whether cost optimization data collection is enabled for this credential.
80+
- `resource_metadata` (Dynamic) Metadata for tracking resource identity during account migrations. Stored in Terraform state only and not sent to the API.
8081
- `token` (String, Sensitive) The Databricks personal access token. Consider using `token_wo` instead, which is not stored in state.
8182
- `token_wo` (String) Write-only alternative to `token`. The value is not stored in state. Requires `token_wo_version` to trigger updates.
8283
- `token_wo_version` (Number) Version number for `token_wo`. Increment this value to trigger an update of the token when using `token_wo`.

0 commit comments

Comments
 (0)