rhythmic-branch-12845
07/13/2022, 8:33 AMDo you want to perform this update? yes
Updating (stage)
View Live: <https://app.pulumi.com/jf/xxxxxxx/stage/updates/1>
Type Name Status Info
+ pulumi:pulumi:Stack xxxxxxx-stage **creating failed** 1 error
+ └─ aws:route53:Zone main **creating failed** 1 error
Diagnostics:
pulumi:pulumi:Stack (xxxxxxx-stage):
error: update failed
aws:route53:Zone (main):
error: 1 error occurred:
* error creating Route53 Hosted Zone: InvalidDomainName: main-468bb55 is reserved by AWS!
status code: 400, request id: ...
Resources:
+ 1 created
Duration: 4s
I’m just trying to create a route53 zone, and I see absolutely no signs or warnings anywhere in the doc about what name
is supposed to even mean, or what namespace it’s supposed to be in (https://www.pulumi.com/registry/packages/aws/api-docs/route53/zone/)
This is my program:
"""An AWS Python Pulumi program"""
import pulumi
import pulumi_aws as aws
main = aws.route53.Zone("main", tags={ "mananged_by": "Pulumi" })
pulumi.export('route53_Zone__main__name_servers', main.name_servers)
(and for the record, changing main
to primary
gives me no joy either: I get basically the same error, just with “primary” in place of “main”limited-rainbow-51650
07/13/2022, 8:44 AM"""An AWS Python Pulumi program"""
import pulumi
import pulumi_aws as aws
main = aws.route53.Zone("main", name="top.level.domain", tags={ "mananged_by": "Pulumi" })
pulumi.export('route53_Zone__main__name_servers', main.name_servers)
rhythmic-branch-12845
07/13/2022, 8:45 AMresource_name
isn’t even the real domain name; Pulumi adds some ridiculous suffix to it, so that the actual domain you create has some suffix like (in my case -2e9f86f
)… Seriously.
1. the doc should just give a proper example. You need to supply the name
parameter! (aws.route53.Zone(name=“example.com”, …)`)
2. the required resource_name
parameter is just a trap. What is it for? as mentioned, it does absolutely nothing useful (if it’s used for the actual domain name, then it produces a useless zone because of the suffix; if name=
is supplied, why would we care?limited-rainbow-51650
07/13/2022, 8:47 AMresource_name
is how Pulumi identifies the resource under management in the state file. If you go through that page on Resource Names
I linked higher up, I hope it makes things clear for you. Do reach out if you would still have any questions.rhythmic-branch-12845
07/13/2022, 8:47 AMechoing-dinner-19531
07/13/2022, 1:02 PM