https://pulumi.com logo
Title
g

green-musician-49057

04/19/2021, 8:43 PM
EDIT: Solved -- it was most likely due to AWS api constraints. I'm seeing an issue where the docs may be out of date with the provider, for a Route53 record. https://www.pulumi.com/docs/reference/pkg/aws/route53/record/#properties
* provider.aws: aws_route53_record: join: "ttl": required field is not set
This issue didn't show up with
pulumi preview
, but it did on a
pulumi up
r

red-match-15116

04/19/2021, 9:09 PM
This issue didn’t show up with 
pulumi preview
, but it did on a 
pulumi up
That’s surprising. Are you creating the record within an
apply
? The designation in the docs is correct, because
ttl
is not required by the AWS API, it is only required when there is a certain combination of inputs From the AWS docs:
TTL
The resource record cache time to live (TTL), in seconds. Note the following:

If you're creating or updating an alias resource record set, omit TTL. Amazon Route 53 uses the value of TTL for the alias target.

If you're associating this resource record set with a health check (if you're adding a HealthCheckId element), we recommend that you specify a TTL of 60 seconds or less so clients respond quickly to changes in health status.

All of the resource record sets in a group of weighted resource record sets must have the same value for TTL.

If a group of weighted resource record sets includes one or more weighted alias resource record sets for which the alias target is an ELB load balancer, we recommend that you specify a TTL of 60 seconds for all of the non-alias weighted resource record sets that have the same name and type. Values other than 60 seconds (the TTL for load balancers) will change the effect of the values that you specify for Weight.

Type: Long

Valid Range: Minimum value of 0. Maximum value of 2147483647.

Required: No
Source
g

green-musician-49057

04/19/2021, 10:44 PM
Are you creating the record within an 
apply
?
Nope. Values are coming from cfg or hardcoded string. It's really simple example. This is the functioning version, with the Ttl added -- that was the only change.
hostedZoneId := cfg.Require("hostedZoneId")
	webflowProxyName := cfg.Require("webflowProxyName")

	_, err := route53.NewRecord(ctx, "landingPageDNSRecord", &route53.RecordArgs{
		ZoneId:  pulumi.String(hostedZoneId),
		Name:    pulumi.String("join"),
		Type:    pulumi.String("CNAME"),
		Records: pulumi.StringArray{pulumi.String(webflowProxyName)},
		Ttl:     <http://pulumi.Int|pulumi.Int>(86400), // 24 hours
	})
r

red-match-15116

04/19/2021, 10:52 PM
Yeah I think this is because of what I mentioned about the docs /
ttl
only being required under certain conditions. The error is returned by the aws api, which makes sense that you wouldn’t see it in
preview
but you do in
up
g

green-musician-49057

04/19/2021, 10:53 PM
I suspected as much. Thank you!
😛artypus-8bit: 1