Having trouble configuring newrelic terraform provider

I’m using the following configuration block:

provider "newrelic" {
  account_id = <Your Account ID>
  api_key = <Your Personal API Key>    # usually prefixed with 'NRAK'
  admin_api_key = <Your Admin API Key> # usually prefixed with 'NRAA'
  region = "US"                        # Valid regions are US and EU
}

The error I get from Terraform is: Error: Access restricted., null trying to create a newrelic alert policy. Not really sure how to debug that error.

Hey @max5

Can you drop a link to your account here? Access Restricted implies a subscription mismatch, but I can’t know for sure without looking at your account :slight_smile:

Hey Ryan, the accound id is 2479879. Not sure what page to link you to. Appreciate the help :slight_smile:

Hi @max5, thank you for being patient. Ryan has moved to another position at New Relic. We will certainly miss him!

I have brought your question to our developer toolkit team so that one of them can followup with you.

Hey @max5 did you get this figured out?

Hi @drew3,

This sounds like your API keys might be mismatched with the account ID you’re using. Are you using API keys from a subaccount or some other account?

What version of the Terraform provider are you on?

Can you share your Terraform provider configuration, including the resources in question (sensitive info dedacted)?

1 Like