Skip to content

datadog_organization data source #3019

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

Open
alexjurkiewicz opened this issue May 21, 2025 · 1 comment
Open

datadog_organization data source #3019

alexjurkiewicz opened this issue May 21, 2025 · 1 comment

Comments

@alexjurkiewicz
Copy link
Contributor

What resources or data sources are affected?

  • datadog_organization

Feature Request

Please add a data source to load information about the current organization:

  • Name
  • ID
  • Site URL

References

No response

@alexjurkiewicz
Copy link
Contributor Author

alexjurkiewicz commented May 21, 2025

I can sort of get this by using the following resource:

resource "datadog_organization_settings" "organization" {
  lifecycle {
    ignore_changes = [
      # Without this, the provider will try and `null` the name,
      # which is a no-op, but still...
      name,
    ]
  }
}

However, datadog_organization_settings.organization.name will resolve to null until the resource has been created, which results in inconsistent applies:

locals {
  # The `name` attribute resolves to `null` until after the first apply (when
  # the resource has been created).
  # Using this local variable will generate "Provider produced inconsistent
  # final plan" errors in that first apply. Re-applying will fix it.
  dd_account_name = datadog_organization_settings.organization.name == null ? "Unknown" : datadog_organization_settings.organization.name
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant