Skip to content

Conversation

@ameesha
Copy link

@ameesha ameesha commented Dec 23, 2025


Summary

This PR adds Terraform support for Datadog Datastores and Datastore Items, enabling users to manage key-value data
storage through Infrastructure as Code.

New Resources

  • datadog_datastore - Create and manage Datadog datastores with configurable primary keys and access controls
  • datadog_datastore_item - Create and manage individual items within a datastore

New Data Sources

  • datadog_datastore - Read existing datastore configurations by ID
  • datadog_datastore_item - Read existing datastore items by datastore ID and item key

Features

  • Full CRUD operations for datastores and datastore items
  • Support for custom primary key columns and generation strategies (none, uuid)
  • Organization-level access control for datastores
  • Import support for existing resources
  • Comprehensive documentation and examples

Example Usage

Create a datastore

resource "datadog_datastore" "users" {
name = "users-datastore"
description = "Datastore for user data"
primary_column_name = "id"
primary_key_generation_strategy = "none"
}

Add items to the datastore

resource "datadog_datastore_item" "user1" {
datastore_id = datadog_datastore.users.id
item_key = "user-123"
value = {
id = "user-123"
username = "john_doe"
email = "[email protected]"
}
}

Test Plan

  • Added acceptance tests for datadog_datastore resource
  • Added acceptance tests for datadog_datastore_item resource
  • Tests pass in replay mode with recorded cassettes
  • Manual testing with live API

@@ -0,0 +1,19 @@
resources:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't use the generator since this doesn't follow the same pattern but created a config file anyway

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let me know if i should just remove the config files since i didn't end up using them

@ameesha ameesha marked this pull request as ready for review January 16, 2026 19:02
@ameesha ameesha requested review from a team as code owners January 16, 2026 19:02

# datadog_datastore (Resource)

Provides a Datadog Datastore resource. This can be used to create and manage Datadog datastore.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Provides a Datadog Datastore resource. This can be used to create and manage Datadog datastore.
Provides a Datadog Datastore resource. This can be used to create and manage Datadog datastores.

@ameesha ameesha changed the title datastore provider generated datastore provider and datastore item provider Jan 16, 2026
@OliviaShoup OliviaShoup requested review from a team and OliviaShoup January 16, 2026 19:06
Copy link

@OliviaShoup OliviaShoup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great! left one tiny comment :)

Copy link

@wfa207 wfa207 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -0,0 +1,19 @@
resources:
datastore:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Non-Blocking] Should we also prefix this with datadog_ to align with the item resource below?

Or if it's easier, we can do the reverse: rename datadog_datastore_item to just datastore_item?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i actually think i'm going to delete these config files all together since i didn't use them for auto generation so they don't map correctly (especially after i made changes)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah okay that works

@ameesha ameesha changed the title datastore provider and datastore item provider datastore TF provider and datastore item TF provider Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants