Skip to content

feat: add resource_metadata field to all resources (account migration support) #662

@trouze

Description

@trouze

Summary

Add an optional resource_metadata field (type: Dynamic) to every resource's model and schema. This is a free-form field that persists arbitrary migration identity metadata in Terraform state — the core primitive needed to support account migration tooling that moves dbt Cloud customers between tenancies.

Motivation

When migrating a dbt Cloud account from one tenancy to another, the migration tool needs to track the mapping between old and new resource IDs. By storing this metadata directly in the Terraform state file, the tool can correlate resources across accounts without external bookkeeping.

Scope

  • Add ResourceMetadata types.Dynamic to every resource model struct
  • Add resource_metadata as an optional DynamicAttribute in every resource schema
  • Field is purely additive — no required changes to existing configs, no API calls made with this data

Resources affected

All resources in pkg/framework/objects/, including: environment, job, profile, project, global_connection, bigquery_credential, snowflake_credential, environment_variable_job_override, group_partial_permissions, semantic_layer_*, platform_metadata_credentials, and more.

Source

Developed on branch fix/provider-bug-wsargent as part of account migration tooling work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions