Karolis Stulgys
06/13/2022, 2:37 PMcustomDomain
something like api-hello.great.world.com ? let's say I own world.com domain from aws. I try something similar but when it's deployed the customDomain is still not what I named itAdrian Schweizer
06/13/2022, 4:09 PMAdrian Schweizer
06/13/2022, 4:09 PMAdrian Schweizer
06/13/2022, 4:09 PMAdrian Schweizer
06/13/2022, 4:48 PMFrank
Frank
customDomain: {
domainName: "<http://api-hello.great.world.com|api-hello.great.world.com>",
hostedZone: "<http://world.com|world.com>",
}
Karolis Stulgys
06/14/2022, 7:52 AMcustomDomain: getCustomDomain(app.stage as "prod" | "dev"),
where `getCustomDomain`: (it's an example)
const getCustomDomain = (stage: "prod" | "dev") => {
return {
domainName: `${stage}-<http://api.great.world.com|api.great.world.com>`,
hostedZone: "<http://world.com|world.com>",
};
};
in seed I have dev
environment where my backend and frontend is deployed but my frontend still calls random generated api domain ;/Karolis Stulgys
06/14/2022, 7:55 AM_getCustomDomain_(_stack.stage as_ "prod"
|
"dev")
instead of app.stage. @Frank what's the difference with stack.stage
and app.stage
?Adrian Schweizer
06/17/2022, 1:06 PMAdrian Schweizer
06/17/2022, 1:07 PMAdrian Schweizer
06/17/2022, 1:07 PMnpx sst start --stage dev
Adrian Schweizer
06/17/2022, 1:11 PMKarolis Stulgys
06/18/2022, 9:36 AMcustomDomain: {
domainName: "<http://api-hello.great.world.com|api-hello.great.world.com>",
hostedZone: "<http://world.com|world.com>",
}
it does not pass the regex validation. That's what the error saysKarolis Stulgys
06/18/2022, 10:10 AMStatus: failed
Error: 1 validation error detected: Value '<https://hello-api.world.hello.com>' at 'domainName' failed to satisfy constraint: Member must satisfy regular expression pattern: ^(\*\.)?(((?!-)[A-Za-z0-9-]{0,62}[A-Za-z0-9])\.)+((?!-)[A-Za-z0-9-]{1,62}[A-Za-z0-9])$ (Service: AWSCertificateManager; Status Code: 400; Error Code: ValidationException; Request ID: e8516c2a-fade-494c-b163-6af0ed29bb92; Proxy: null)
Karolis Stulgys
06/18/2022, 10:10 AM'<https://hello-api.world.hello.com>' is just an example but my domain naming is very similar
Adrian Schweizer
06/18/2022, 10:12 AMAdrian Schweizer
06/18/2022, 10:13 AMKarolis Stulgys
06/18/2022, 11:08 AMAdrian Schweizer
06/18/2022, 11:10 AMAdrian Schweizer
06/18/2022, 11:11 AMAdrian Schweizer
06/18/2022, 11:12 AM