terraform-provider-digitalocean
terraform-provider-digitalocean copied to clipboard
Resource digitalocean_record is not created with domain id.
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
- 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"
}
terraform apply- See that it result with error. since request to
/v2/domains/<id>/recordsreturn 404. - Use
domain = digitalocean_domain.default.nameinstead ofid - See that record resource created and request goes to
/v2/domains/<name>/records