{"id":23408,"library":"cdktf-cdktf-provider-newrelic","title":"CDKTF New Relic Provider","description":"Prebuilt New Relic provider for the CDK for Terraform (CDKTF). Version 13.12.2 generates Python classes that wrap the New Relic Terraform provider. Released roughly monthly in lockstep with the upstream provider.","status":"active","version":"13.12.2","language":"python","source_language":"en","source_url":"https://github.com/cdktf/cdktf-provider-newrelic.git","tags":["cdktf","terraform","newrelic","iac","infrastructure"],"install":[{"cmd":"pip install cdktf-cdktf-provider-newrelic","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"Required runtime for all CDKTF providers.","package":"cdktf","optional":false},{"reason":"The provider package itself (runtime dep).","package":"cdktf-cdktf-provider-newrelic","optional":false}],"imports":[{"symbol":"NewRelicProvider","correct":"from cdktf_cdktf_provider_newrelic.provider import NewRelicProvider"},{"symbol":"AlertPolicy","correct":"from cdktf_cdktf_provider_newrelic.alert_policy import AlertPolicy"},{"symbol":"AlertCondition","correct":"from cdktf_cdktf_provider_newrelic.alert_condition import AlertCondition"},{"symbol":"NrqlAlertCondition","correct":"from cdktf_cdktf_provider_newrelic.nrql_alert_condition import NrqlAlertCondition"}],"quickstart":{"code":"from cdktf import App, TerraformStack\nfrom cdktf_cdktf_provider_newrelic.provider import NewRelicProvider\nfrom cdktf_cdktf_provider_newrelic.alert_policy import AlertPolicy\n\napp = App()\nstack = TerraformStack(app, \"newrelic-example\")\nNewRelicProvider(stack, \"newrelic\", api_key=os.environ.get('NEWRELIC_API_KEY', ''))\nAlertPolicy(stack, \"my_policy\", name=\"My Policy\")\napp.synth()","lang":"python","description":"Synthesizes a minimal New Relic alert policy using CDKTF."},"warnings":[{"fix":"Use `from cdktf_cdktf_provider_newrelic.<resource_snake_case> import <ResourceName>`","message":"All resource classes are located in separate modules named after the resource (e.g., alert_policy, nrql_alert_condition). Guessing the import path often leads to ModuleNotFoundError.","severity":"gotcha","affected_versions":"all"},{"fix":"Review the GitHub releases at https://github.com/cdktf/cdktf-provider-newrelic/releases","message":"Major version bumps (e.g., 11→12) may rename or restructure resource classes and properties. Check the provider's changelog before upgrading.","severity":"breaking","affected_versions":"12.0.0, 13.0.0"},{"fix":"Use `from cdktf_cdktf_provider_newrelic.provider import NewRelicProvider`","message":"The old `from cdktf_cdktf_provider_newrelic import NewRelicProvider` top-level import no longer works; it was removed in version 12.","severity":"deprecated","affected_versions":">=12.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `pip install cdktf-cdktf-provider-newrelic` in your virtual environment.","cause":"The package is not installed or is installed in a different environment.","error":"ModuleNotFoundError: No module named 'cdktf_cdktf_provider_newrelic'"},{"fix":"Use `from cdktf_cdktf_provider_newrelic.provider import NewRelicProvider`","cause":"Trying to import the provider from the top-level package instead of the submodule.","error":"ImportError: cannot import name 'NewRelicProvider' from 'cdktf_cdktf_provider_newrelic'"},{"fix":"Check the exact module name by listing installed modules: `pip show -f cdktf-cdktf-provider-newrelic`","cause":"Resource class names differ from the module names (e.g., AlertPolicy is in alert_policy module).","error":"ModuleNotFoundError: No module named 'cdktf_cdktf_provider_newrelic.alert_policy'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}