Skip to content

Commit

Permalink
update setup CLI for private website
Browse files Browse the repository at this point in the history
  • Loading branch information
manuwaik committed Jan 17, 2024
1 parent d5749dd commit 99ecf75
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions cli/magic-create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ const embeddingModels = [
fs.readFileSync("./bin/config.json").toString("utf8")
);
options.prefix = config.prefix;
options.privateWebsite = config.privateWebsite;
options.certificate = config.certificate;
options.domain = config.domain;
options.bedrockEnable = config.bedrock?.enabled;
options.bedrockRegion = config.bedrock?.region;
options.bedrockRoleArn = config.bedrock?.roleArn;
Expand Down Expand Up @@ -113,6 +116,34 @@ async function processCreateOptions(options: any): Promise<void> {
initial: options.prefix,
askAnswered: false,
},
{
type: "confirm",
name: "privateWebsite",
message: "Do you want to deploy a private website? I.e only accessible in VPC",
initial:
options.privateWebsite ||
false,
},
{
type: "input",
name: "certificate",
message: "ACM certificate ARN",
initial:
options.certificate,
skip(): boolean {
return !(this as any).state.answers.privateWebsite;
},
},
{
type: "input",
name: "domain",
message: "Domain for private website",
initial:
options.domain,
skip(): boolean {
return !(this as any).state.answers.privateWebsite;
},
},
{
type: "confirm",
name: "bedrockEnable",
Expand Down Expand Up @@ -312,6 +343,9 @@ async function processCreateOptions(options: any): Promise<void> {
// Create the config object
const config = {
prefix: answers.prefix,
privateWebsite: answers.privateWebsite,
certificate: answers.certificate,
domain: answers.domain,
bedrock: answers.bedrockEnable
? {
enabled: answers.bedrockEnable,
Expand Down

0 comments on commit 99ecf75

Please sign in to comment.