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

database_replica's URN not available #1242

Open
renanbr opened this issue Oct 7, 2024 · 0 comments
Open

database_replica's URN not available #1242

renanbr opened this issue Oct 7, 2024 · 0 comments
Labels

Comments

@renanbr
Copy link

renanbr commented Oct 7, 2024

Bug Report

I'm importing existing resources.

When defining a project where I would like to attach the replica, URN isn't available.

resource "digitalocean_project" "default" {
  // ...
  resources = [
    // ....
    digitalocean_database_replica.mysql_read_only.urn,
  ]
}

Describe the bug

The apply command doesn't work.

Affected Resource(s)

  • digitalocean_database_replica

Expected Behavior

Having the replace attached to the project.

Actual Behavior

│ Error: Unsupported attribute
│
│   on application/project.tf line 8, in resource "digitalocean_project" "default":
│    8:     digitalocean_database_replica.mysql_read_only.urn,
│
│ This object has no argument, nested block, or exported attribute named "urn". Did you mean "uri"?

Steps to Reproduce

  1. Define a digitalocean_project resource
  2. Define a digitalocean_database_cluster resource
  3. Define a digitalocean_database_replica resource
  4. Attach the replica as resource of a digitalocean_project resource
  5. Run terraform apply

Terraform Configuration Files

provider "registry.terraform.io/digitalocean/digitalocean" {
  version     = "2.42.0"
  constraints = "~> 2.0"
  // ...
}

Terraform version

Terraform v1.9.6
on darwin_arm64

Debug Output

none

Panic Output

none

Additional context

I'm currently interpolating the id when attaching it to the project.

"do:dbaas:${digitalocean_database_replica.mysql_read_only.uuid}"

Important Factoids

I'm aware about the solution found in #639

References

none

@renanbr renanbr added the bug label Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant