Creating Dashboard new relic error

Hello

I am trying to create a Dashboard following this guide Creating dashboards with Terraform and JSON templates | New Relic

After setting everything up I run terraform init, and then apply!

Terraform runs, the dashboard gets created correctly in NW BUT the logs are problematic.

I get an error saying

newrelic_one_dashboard_json.learn_dashboard: Creating...

╷

│ Error: entity not found. GUID: 'XXXXXQ3MjkXXX'

│ 

│  with newrelic_one_dashboard_json.learn_dashboard,

│  on dashboard.tf line 1, in resource "newrelic_one_dashboard_json" "learn_dashboard":

│  1: resource "newrelic_one_dashboard_json" "learn_dashboard" {

│ 

And If I try to RE run it again, without destroying it I get


 terraform apply -var-file="variables.tfvars"

newrelic_one_dashboard_json.learn_dashboard: Refreshing state... [id=XXXXXQ3MjkXXX]

Note: Objects have changed outside of Terraform

Terraform detected the following changes made outside of Terraform since the last "terraform apply" which may have affected this plan:

 # newrelic_one_dashboard_json.learn_dashboard has changed

 ~ resource "newrelic_one_dashboard_json" "learn_dashboard" {

   + guid   = "XXXXXQ3MjkXXX"

    id    = "XXXXXQ3MjkXXX"

   + permalink = "https://one.eu.newrelic.com/redirect/entity/XXXXXQ3MjkXXX"

    # (1 unchanged attribute hidden)

  }

Unless you have made equivalent changes to your configuration, or ignored the relevant attributes using ignore_changes, the following plan may include actions to undo or respond to

these changes.

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:

 + create

-/+ destroy and then create replacement

Terraform will perform the following actions:

 # newrelic_entity_tags.learn_dashboard will be created

 + resource "newrelic_entity_tags" "learn_dashboard" {

   + guid = (known after apply)

   + id  = (known after apply)

   + tag {

     + key  = "terraform"

     + values = [

       + "true",

      ]

    }

  }

 # newrelic_one_dashboard_json.learn_dashboard is tainted, so must be replaced

-/+ resource "newrelic_one_dashboard_json" "learn_dashboard" {

   ~ account_id = XX -> (known after apply)

   ~ guid    = "XXXXXQ3MjkXXX" -> (known after apply)

   ~ id     = "XXXXXQ3MjkXXX" -> (known after apply)

   ~ permalink = "https://one.eu.newrelic.com/redirect/entity/XXXXXQ3MjkXXX" -> (known after apply)

   ~ updated_at = "2025-01-31T17:26:51Z" -> (known after apply)

    # (1 unchanged attribute hidden)

  }


I can’t really spot what I am doing wrong!

Hi Vanals, I have the same error. If you have been provided with a solution to the problem please share

10:53:16.714 STDOUT terraform: newrelic_one_dashboard_json.dashboard: Destruction complete after 2s
10:53:16.742 STDOUT terraform: newrelic_one_dashboard_json.dashboard: Creating...
10:53:18.714 STDERR terraform: ╷
10:53:18.714 STDERR terraform: │ Error: entity not found. GUID: 'NDg3Mjc4MnxWSVp8REF******OjQ3NzMwMQ''
10:53:18.714 STDERR terraform: │ 
10:53:18.714 STDERR terraform: │   with newrelic_one_dashboard_json.dashboard,
10:53:18.715 STDERR terraform: │   on main.tf line 1, in resource "newrelic_one_dashboard_json" "dashboard":
10:53:18.715 STDERR terraform: │    1: resource "newrelic_one_dashboard_json" "dashboard" {
10:53:18.715 STDERR terraform: │ 
10:53:18.715 STDERR terraform: ╵
10:53:18.825 ERROR  terraform invocation failed in ./.terragrunt-cache/YmYhZEUtU-_EpFW9rv1-jHeOvss/7JeIRBazHr6mAdiPa_yymdaBn04
10:53:18.826 ERROR  error occurred:

* Failed to execute "terraform apply" in ./.terragrunt-cache/YmYhZEUtU-_EpFW9rv1-jHeOvss/7JeIRBazHr6mAdiPa_yymdaBn04
  ╷
  │ Error: entity not found. GUID: 'NDg3Mjc4MnxWSVp8REF******OjQ3NzMwMQ'
  │ 
  │   with newrelic_one_dashboard_json.dashboard,
  │   on main.tf line 1, in resource "newrelic_one_dashboard_json" "dashboard":
  │    1: resource "newrelic_one_dashboard_json" "dashboard" {
  │ 
  ╵
  
  exit status 1

1 Like

I have opened a Case in New relic. Will let you know :slight_smile:

1 Like

@OleksiiSobko Been told they now fixed it. Was apparently an issue in EU for some users. I tested it and now works for me.