New Relic Terraform Provider - v2.0.0

2.0.0 (June 18, 2020)

The Developer Toolkit team is pleased to announce the next major release of the New Relic Terraform Provider!

Why 2.0

After taking ownership of the Terraform Provider in Oct 2019, the Developer Toolkit team spent a fair amount of time reviving the two year old codebase. With an eye to the future, it was decided that we need to implement some breaking changes in the provider to clean up some tech debt and required some new configuration to work alongside the New Relic One Platform.

Initial New Features:

Over the past 6 months of New Relic officially supporting the Terraform provider, we’ve increase usage 104%. We’ve also spent a fair amount of time talking with customers about future work, or what we can do to reduce their toil. This release enables much of that work, and a few items shipped immediately (the rest are documented below):

  • newrelic_entity data source - Enabling an entity centric view from within the provider is a natural extension of the platform
  • newrelic_entity_tags resource - Manage the tags created on entities, easily use terraform variables to calculate and assign tags to resources dynamically
  • newrelic_nrql_alert_condition resource - Updated to include all NRQL condition types (Static, Baseline, Outlier) via NerdGraph

How does this impact existing Terraform users?

The major release signals some breaking changes to the configuation requirements for the provider. Customers following best practices should see no impact, though they will have to make a few minor configuration changes to upgrade to 2.0.0. The complete migration guide is available, but here are a few highlights:

  • Replace all instances of environment variables named NEWRELIC_* with NEW_RELIC_*
    • This matches the environment variable standards we use for all agents.
  • Move any existing api_key configuration setting to admin_api_key
    • We are moving away from Admin API keys as the primary source for authentication, and instead leveraging Personal API Keys, the default key type for New Relic One and the NerdGraph API
  • Move any existing personal_api_key configuration setting to api_key .
  • An account_id configuration setting is now required.
    • As Personal API Keys allow access cross-account, we require a global default Account ID for the provider, as well as offer the ability to override the account_id per resource.

The full change log is available here.


  • fix(alerts): remove DiffSuppressFunc on TypeSet to avoid test drift
  • fix(alerts): handle a nil reference with more grace
  • fix(deps): Revert terraform sdk to 1.10.0
  • fix(application_settings): Remove delete, as it is not possible
  • fix(alerts): infra alert condition zero value detection
  • fix(newrelic): fix the failing integration tests (#519)
  • fix(nrql_alert_condition): threshold_occurrences is case insensitive, attribute description updates
  • fix: Require condition_scope = instance for validation_close_timer
  • fix: Add validation to newrelic_alert_condtion condition_scope


  • feat(entity_tags): add an entity tag resource (#679)
  • feat(entity_tags): add an entity tags resource
  • feat(provider): add region to provider schema, handle API URLs based off region
  • feat(dashboard): add grid_column_count to dashboard schema
  • feat(alerts): convert Alerts Policies to nerdgraph
  • feat(nrql_alert_condition): integrate nerdgraph for nrql alert conditions
  • feat(application): implement newrelic_application resource
  • feat(entities): add a newrelic_entity data source
  • docs(entity_tags): add website docs for newrelic_entity_tag resource
  • docs(entities): add link to provider configuration page
  • docs: include v1 index.html in sidebar
  • docs: DEPRECATION notice for 1.x
  • docs: update index header with improved words
  • docs: update getting started guide to reference new material
  • docs: update README with new pointers
  • docs: add table for current endpoint in use per resource
  • docs: include documentation about upgrading the provider to 2.x
  • docs: update API key references to match desires
  • docs: add staging as a region, add account_id to example, cleanup comments
  • docs(provider): add provider configuration guide page
  • docs(provider): add region to provider docs, removing references to API base URLs
  • docs(alerts): update examples to reflect deprecation
  • docs(alerts): update wording to avoid implementation details
  • docs(alerts): include deprecation notice for “terms”
  • docs(nrql_alert_condition): add outlier example, add new attributes, deprecate old attributes, update import section
  • docs(getting started): fix resource naming
  • docs(alert_channel): fix broken ‘nested config’ anchor link
  • docs: add callout to top of each v1.x doc page
  • docs: prep for v2.x, isolate v1.x docs
  • docs(nrql_alert_condition): update docs to reflect version 2.0 changes
  • docs(alerts): include caveat about NRQL alerts condition operator usage with outliers
  • docs(workloads): fix api key attribute name (#489)