Skip to content
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

Resource newrelic_cloud_gcp_link_account: ERR_INVALID_DATA Validation failed: The account has already been linked. #2733

Closed
chmoder opened this issue Aug 22, 2024 · 1 comment

Comments

@chmoder
Copy link

chmoder commented Aug 22, 2024

Terraform Version

Terraform v1.9.4
on darwin_arm64
+ provider registry.terraform.io/alekc/kubectl v2.0.4
+ provider registry.terraform.io/cloudflare/cloudflare v4.39.0
+ provider registry.terraform.io/hashicorp/google v5.41.0
+ provider registry.terraform.io/hashicorp/helm v2.15.0
+ provider registry.terraform.io/hashicorp/kubernetes v2.32.0
+ provider registry.terraform.io/hashicorp/time v0.12.0
+ provider registry.terraform.io/newrelic/newrelic v3.42.3

Affected Resource(s)

Please list the resources as a list, for example:

  • newrelic_cloud_gcp_link_account

Terraform Configuration

provider "newrelic" {
  account_id = var.nr_account_id
  api_key    = var.nr_api_key
  region     = "US"
}

resource "newrelic_cloud_gcp_link_account" "example" {
  account_id = var.nr_account_id
  project_id = var.project_id
  name       = "nr-gcp-link"
}

resource "newrelic_cloud_gcp_integrations" "example" {
  account_id        = var.nr_account_id
  linked_account_id = newrelic_cloud_gcp_link_account.example.id # "123456"
  app_engine {}
  big_query {}
  big_table {}
  composer {}
  data_flow {}
  data_proc {}
  data_store {}
  fire_base_database {}
  fire_base_hosting {}
  fire_base_storage {}
  fire_store {}
  functions {}
  interconnect {}
  kubernetes {}
  load_balancing {}
  mem_cache {}
  pub_sub {}
  redis {}
  router {}
  run {}
  spanner {}
  sql {}
  storage {}
  virtual_machines {}
  vpc_access {}
}

Actual Behavior

newrelic_cloud_gcp_link_account.example: Creating...
╷
│ Error: ERR_INVALID_DATA Validation failed: The account has already been linked.
│ 
│   with newrelic_cloud_gcp_link_account.example,
│   on newrelic.tf line 17, in resource "newrelic_cloud_gcp_link_account" "example":
│   17: resource "newrelic_cloud_gcp_link_account" "example" {
│ 

Expected Behavior

I think it should be idempotent or include a flag to skip or error if it is already linked.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply

Debug Output

https://gist.github.com/chmoder/db636e272e2c8f1ee3f6e9d94424d3ec

Panic Output

n/a

Important Factoids

n/a

References

n/a

@pranav-new-relic pranav-new-relic changed the title ERR_INVALID_DATA Validation failed: The account has already been linked. Resource newrelic_cloud_gcp_link_account: ERR_INVALID_DATA Validation failed: The account has already been linked. Aug 22, 2024
@gmanandhar-nr
Copy link
Member

Based on the conversation here: #2735, closing the issue.

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

Successfully merging a pull request may close this issue.

2 participants