Linode_domain_record inappropriate value for attribute target

Hi, another newbie question! I’ve followed a bunch of Linode examples, and I’m tripping up on this bit:

resource "linode_domain_record" "record_foo" {
    domain_id   = linode_domain.domain_example_org.id
    name        = linode_instance.instance_foo.label
    target      = linode_instance.instance_foo.ipv4
    record_type = "A"
}

I’m getting:

Inappropriate value for attribute "target": string required.

Any help would be really appreciated :slight_smile:

Finally fixed this - the example is wrong.

A linode_instance.instance ipv4 is a set of strings. But ip_address works.

Also, ipv6 ends in “/64”, which needs to be removed:

target  substr(linode_instance.foo.ipv6, 0, length(linode_instance.foo.ipv6) - 3) # trim /64