terraform-provider-digitalocean icon indicating copy to clipboard operation
terraform-provider-digitalocean copied to clipboard

Resource digitalocean_record is not created with domain id.

Open SkeLLLa opened this issue 2 years ago • 0 comments

Bug Report


Describe the bug

Resource digitalocean_record is not created with description from documentation.

Affected Resource(s)

digitalocean_record

Expected Behavior

Record resource is created

Actual Behavior

Record resource is failed with 404.

Steps to Reproduce

  1. Copy-paste example from documentation and add your domain
resource "digitalocean_domain" "default" {
  name = "example.com"
}

# Add an A record to the domain for www.example.com.
resource "digitalocean_record" "www" {
  domain = digitalocean_domain.default.id
  type   = "A"
  name   = "www"
  value  = "192.168.0.11"
}
  1. terraform apply
  2. See that it result with error. since request to /v2/domains/<id>/records return 404.
  3. Use domain = digitalocean_domain.default.name instead of id
  4. See that record resource created and request goes to /v2/domains/<name>/records

SkeLLLa avatar May 14 '23 14:05 SkeLLLa