@@ -35,7 +35,7 @@ func ByokFromManifest(man *manifest.ProjectManifest) (*ByokProvider, error) {
3535 return prov , nil
3636}
3737
38- func mkBYOK (conf config.Config , name string , dryRun bool ) (prov * ByokProvider , err error ) {
38+ func mkBYOK (conf config.Config , name string , dryRun , cloud bool ) (prov * ByokProvider , err error ) {
3939 prov = & ByokProvider {
4040 ctx : map [string ]interface {}{},
4141 }
@@ -78,22 +78,31 @@ func mkBYOK(conf config.Config, name string, dryRun bool) (prov *ByokProvider, e
7878 kubeconfigBase64 := base64 .StdEncoding .EncodeToString (kubeconfigData )
7979
8080 prov .ctx ["kubeconfig" ] = kubeconfigBase64
81-
82- var dbURL string
83- if err := survey .AskOne (& survey.Input {
84- Message : "Enter the database URL for the Plural console (leave empty to skip):" ,
85- }, & dbURL ); err != nil {
86- return nil , err
87- }
88- prov .ctx ["DbUrl" ] = dbURL
89-
9081 projectManifest := manifest.ProjectManifest {
9182 Cluster : name ,
9283 Provider : api .BYOK ,
9384 Owner : & manifest.Owner {Email : conf .Email , Endpoint : conf .Endpoint },
9485 Context : prov .Context (),
9586 }
96- prov .writer = projectManifest .Configure (cloudFlag , prov .Cluster ())
87+ if ! cloud {
88+ var dbURL string
89+ if err := survey .AskOne (& survey.Input {
90+ Message : "Enter the jdbc connection string (postgres://<user>:<password>@<host>:5432/<db>) for the Plural console:" ,
91+ }, & dbURL ); err != nil {
92+ return nil , err
93+ }
94+ prov .ctx ["DbUrl" ] = dbURL
95+
96+ var domain string
97+ if err := survey .AskOne (& survey.Input {
98+ Message : "Enter the domain you want to use for your Plural console:" ,
99+ }, & domain ); err != nil {
100+ return nil , err
101+ }
102+
103+ projectManifest .Network = & manifest.NetworkConfig {Subdomain : domain , PluralDns : false }
104+ }
105+ prov .writer = func () error { return projectManifest .Write (manifest .ProjectManifestPath ()) }
97106 return prov , nil
98107}
99108
0 commit comments