the examples for AWS certification validations <ht...
# general
the examples for AWS certification validations assume that only a single domain validation output is returned; however in practice AWS can return more than 1 (as described by . so the example code here should be ranging over all of the outputs rather than assume there is only 1. I can't figure out how to get the length of the array without crashing. Example code is:
Copy code
domainValidationOption := exampleCertificate.DomainValidationOptions.ApplyT(func(options []acm.CertificateDomainValidationOption) interface{} {
            return options[0]
Copy code
^ DomainValidationOptions type is CertificateDomainValidationOptionArrayOutput which has an Index() method but not an associated Len() method. If I use Index() that exceeds the length of the array I get a pulumi crash:

    goroutine 163 [running]:
    <{0xc000068da0|{0xc000068da0>?, 0xc000052710?, 0x1?})
        /tmp/7bdd55732174400744/vendor/ +0x8e{0x123aa40?, 0x1675698?, 0x40efe5?}, {0x160ba84, 0x4}, {0xc000640648, 0x1, 0xc000452480?})
        /snap/go/9952/src/reflect/value.go:556 +0x845
    reflect.Value.Call({0x123aa40?, 0x1675698?, 0x4a75bc?}, {0xc000640648, 0x1, 0x1})
        /snap/go/9952/src/reflect/value.go:339 +0xbf
    <|>{0xc000640630?, 0x5?, 0x8?})
        /tmp/7bdd55732174400744/vendor/ +0x56{0xc000401920?, 0xc00028a9c0?, 0x0?}, {0x160ba84, 0x4}, {0xc000404fa0, 0x2, 0x0?})
        /snap/go/9952/src/reflect/value.go:556 +0x845
    reflect.Value.Call({0xc000401920?, 0xc00028a9c0?, 0xc000122000?}, {0xc000404fa0, 0x2, 0x2})
        /snap/go/9952/src/reflect/value.go:339 +0xbf
        /tmp/7bdd55732174400744/vendor/ +0x2f0
    created by <*OutputState).ApplyTWithContext|*OutputState).ApplyTWithContext>
        /tmp/7bdd55732174400744/vendor/ +0x3fb
    error: an unhandled error occurred: program exited with non-zero exit code: 2
how are callers supposed to get the length of DomainValidationOptions? followup would be can pulumi update the referenced example code to include this?