UiPath / Infrastructure

42 stars 61 forks source link

fqdn needs RE . validation or derivation from route53 zone - as Cert/Route53 error only occurs during nested CF build #111

Open obriensystems opened 3 years ago

obriensystems commented 3 years ago

Describe the bug fqdn needs validation or derivation from zone - as Cert/Route53 error only occurs during nested CF build Once you select the domain - if you forget to add the FQDN after the prefix - a failure only occurs mid CF deploy Fix is to append the domain name to the prefix or at least validate using RE that there is at least one . domain separator

working orchestrator.packet.global failing orchestrator (no fqdn)

Product and Cloud latest AWS template with VPC https://aws-quickstart.github.io/quickstart-uipath-orchestrator/#_launch_the_quick_start

Expected behavior template creates successfully

Additional context missing out on adding .packet.global to the Hosting FQDN will result  in an error later on that will require a partial manual rollback of the RDS instance. RDS must be manually deleted before the stack can be deleted

Screen Shot 2021-04-15 at 14 45 25

2021-04-15 09:54:04 UTC-0400

OrchestratorStack

CREATE_FAILED

Embedded stack arn:aws:cloudformation:us-west-1:453279094200:stack/ UiPath-Orchestrator-OrchestratorStack-12EYHJTMLWPX9/03fc1270-9df2-11eb-a5bf-024d78a93fd5 was not successfully created: The following resource(s) failed to create: [ConfigureSSLStack, FindAmiLambdaRole, StorageStack, DatabaseStack].

Screen Shot 2021-04-15 at 10 40 13

add validation and/or derivation to https://github.com/UiPath/Infrastructure/blob/main/AWS/Orchestrator/templates/main.template.yaml#L819

see also https://github.com/UiPath/Infrastructure/issues/110

AndreiBarbuOz commented 3 years ago

hi @obriensystems , this allowed pattern should fix the issue:

^(?!:\/\/)(?=.{1,255}$)((.{1,63}\.){1,127}(?![0-9]*$)[a-z0-9-]+\.?)$