-
Notifications
You must be signed in to change notification settings - Fork 415
[reference-tables] Add terraform support #3317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
g-brizolier
wants to merge
7
commits into
master
Choose a base branch
from
guillaume.brizolier/REDEXP-2126-terraform-support-reftables
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
[reference-tables] Add terraform support #3317
g-brizolier
wants to merge
7
commits into
master
from
guillaume.brizolier/REDEXP-2126-terraform-support-reftables
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Author
54cf6f1 to
18c39ab
Compare
ee15a38 to
65c2402
Compare
g-brizolier
commented
Nov 7, 2025
81ac940 to
c8f9b0b
Compare
c8f9b0b to
e3a74a1
Compare
The Go client's OneOf unmarshaler for file_metadata fails because both CloudStorage and LocalFile types can match the JSON response (LocalFile has AdditionalProperties that accepts any extra fields). This causes the unmarshaler to set UnparsedObject instead of populating the typed fields.
Workaround:
- Manually parse UnparsedObject when it's set, checking for 'access_details' to distinguish CloudStorage from LocalFile
- Skip utils.CheckForUnparsed() for reference tables since file_metadata will always have UnparsedObject set
- Update data source to handle Values as interface{} (API spec change)
- Remove LocalFile.upload_id field (no longer in API)
e3a74a1 to
16f208c
Compare
…GCS/Azure tests - Update datadog-api-client-go to commit e7ecad4 which includes the additionalProperties:false fix for OneOf parsing - Remove GCS and Azure basic tests (only S3 test is sufficient for testing cloud storage) - Update S3 test cassettes with working OneOf parsing - Remove replace directive from go.mod, now using proper version from package mirror
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

What & Why
Adds Terraform support for Datadog Reference Tables, enabling users to manage Reference Tables as Infrastructure-as-Code.
Includes:
datadog_reference_tableresource - CRUD operations for Reference Tablesdatadog_reference_tabledata source - Query tables by ID or namedatadog_reference_table_rowsdata source - Fetch specific rows by IDModifyPlanto prevent destructive changes (only additive schema changes allowed)Note: Depends on OpenAPI spec fix (DataDog/datadog-api-spec#4532) to resolve OneOf unmarshaling for
file_metadata.QA Instructions
Run Acceptance Tests
dd-auth --domain dd.datad0g.com --api-key-env=DD_TEST_CLIENT_API_KEY --app-key-env=DD_TEST_CLIENT_APP_KEY \ DD_TEST_ORG=yB5yjZ RECORD=none TESTARGS="-run TestAccDatadogReferenceTable" make testaccTests cover:
Manual Testing (Optional)
make~/.terraformrcwith dev_overrides pointing to$GOPATH/bindd-auth --domain dd.datad0g.com --api-key-env=TF_VAR_datadog_api_key --app-key-env=TF_VAR_datadog_app_key terraform planReferences