https://pulumi.com logo
Title
c

cuddly-smartphone-15267

12/02/2020, 6:48 AM
hey guys, i'm having a bit of trouble creating a creating the route53 Records that I need to for validation of a certificate request. this is the relevant code (C#) firstly i create a certificate:
var cert = new Certificate("cert", new CertificateArgs
        {
            DomainName = domainName,
            Tags =
            {
                {"Environment", "test"},
            },
            ValidationMethod = "DNS"
        });
then i try to create a dns record:
var validationRecord = new Record($"validationRecord",
                new RecordArgs
                {
                    AllowOverwrite = true,
                    Name = cert.DomainValidationOptions.Apply(x => x[0].ResourceRecordName),
                    Records = new[] {cert.DomainValidationOptions.Apply(x => x[0].ResourceRecordValue)},
                    Type = cert.DomainValidationOptions.Apply(x => x[0].ResourceRecordType),
                    Ttl = 60,
                    ZoneId = zone.Apply(z => z.ZoneId),
                })
however it seems like it's not actually passing the domain validation option values into the Record object. I'm getting this error:
Diagnostics:
    aws:route53:Record (validationRecord):
        error: aws:route53/record:Record resource 'validationRecord' has a problem: Required attribute is not set
        error: aws:route53/record:Record resource 'validationRecord' has a problem: Required attribute is not set
am i doing something obviously stupid?
g

gentle-diamond-70147

12/02/2020, 3:21 PM
No, you're not doing something wrong. You are hitting a bug unfortunately. I believe the workaround described at https://github.com/pulumi/pulumi/issues/5633#issuecomment-719088070 will help and you can subscribe to that issue to get updates on the fix.
c

cuddly-smartphone-15267

12/03/2020, 11:40 AM
thanks! i've subscribed to that issue and will keep an eye on it.. in the meantime, running without preview seems to work
👍 1