This message was deleted.
# dotnet
s
This message was deleted.
t
I don’t think this TypeScript example is actually valid. Here is my take in C#:
Copy code
var exampleRecordFqdns = exampleCertificate.DomainValidationOptions.Apply(dvos =>
{
    var fqdns = new List<Output<string>>();
    foreach (var dvo in dvos)
    {
        var record = new Record($"exampleRecord-{dvo.DomainName}", new RecordArgs
        {
            AllowOverwrite = true,
            Name = dvo.ResourceRecordName,
            Records = { dvo.ResourceRecordValue },
            Ttl = 60,
            Type = dvo.ResourceRecordType,
            ZoneId = exampleZone.then(exampleZone => exampleZone.zoneId),
        });
        fqdns.Add(record.Fqdn);
    }

    return Output.All(fqdns);
});

var exampleCertificateValidation = new CertificateValidation("exampleCertificateValidation", new CertificateValidationArgs
{
    CertificateArn = exampleCertificate.Arn,
    ValidationRecordFqdns = exampleRecordFqdns
});
(warning: I haven’t tested it)
c
thanks @tall-librarian-49374 that's definitely a good frame of reference! I'll take a closer look at your code
your code is a lot simpler than what i'd come up with (i 'hacked' it a bit temporarily to just use the first DomainValidationOptions object in the list).. but i'm getting the same result.. which is that the recordname / recordvalue / recordtype don't seem to be getting properly set and i get this error when i run pulumi up
Copy code
aws:route53:Record (validationRecord-pulumitest.keypay.dev):
        error: aws:route53/record:Record resource 'validationRecord-pulumitest.keypay.dev' has a problem: Required attribute is not set
        error: aws:route53/record:Record resource 'validationRecord-pulumitest.keypay.dev' has a problem: Required attribute is not set
t
Hmm… to debug this further - could you try deploying all resources without
CertificateValidation
first, and then deploy again with it?
Oh, sorry, without
Record
resources then
c
yep that works just fine if I do that Mikhail
t
Have a look there for a workaround and please add your example in a comment
c
Will do, thanks