You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove grpc client and project from providers (#813)
* WIP: remove provider project name and grpc client
* Remove grpc client and project from providers
* Add delegateDomain to provider.Delete
* Put projectName and delegate domain to requests
* Fix domain delegation
* Fix tests
* Fix deploy and remove delegationSetId from aws byoc
* Fix tail missing project name
* Fix create upload URL needing setup cd and project name
* Move project load out from commands to cli.Debug
* Remove commented out code
Co-authored-by: Lio李歐 <[email protected]>
* Remove commented out code
Co-authored-by: Lio李歐 <[email protected]>
* Rename populate dubug request to query
* Use b.getProjectDomain to set DOMAIN env var for CD
* Use the correct domain
* Fix missing delegation set ID from deploy to cd command
* Remove cdImageTag state from byoc providers
* create loader and provider only when needed.
Prompt for provider when providerAuto is selected
* Address PR comments
* Fix typo
Co-authored-by: Lio李歐 <[email protected]>
* fix clent creation not writing to global client
* Loader cache loaded project to prevent extra loading warning
---------
Co-authored-by: Edward J <[email protected]>
Co-authored-by: Lio李歐 <[email protected]>
@@ -299,42 +302,20 @@ var RootCmd = &cobra.Command{
299
302
term.ForceColor(true)
300
303
}
301
304
302
-
switchproviderID {
303
-
casecliClient.ProviderAuto:
304
-
ifawsInEnv() {
305
-
term.Warn("Using Defang playground, but AWS environment variables were detected; did you forget --provider=aws or DEFANG_PROVIDER=aws?")
306
-
}
307
-
ifdoInEnv() {
308
-
term.Warn("Using Defang playground, but DIGITALOCEAN_TOKEN environment variable was detected; did you forget --provider=digitalocean or DEFANG_PROVIDER=digitalocean?")
309
-
}
310
-
providerID=cliClient.ProviderDefang
311
-
casecliClient.ProviderAWS:
312
-
if!awsInEnv() {
313
-
term.Warn("AWS provider was selected, but AWS environment variables are not set")
314
-
}
315
-
casecliClient.ProviderDO:
316
-
if!doInEnv() {
317
-
term.Warn("DigitalOcean provider was selected, but DIGITALOCEAN_TOKEN environment variable is not set")
318
-
}
319
-
casecliClient.ProviderDefang:
320
-
// Ignore any env vars when explicitly using the Defang playground provider
cliClient.ProviderDefang: "The Defang Playground is a free environment for testing only.",
1075
+
cliClient.ProviderAWS: "Deploy to AWS using the AWS_* environment variables or the AWS CLI configuration.",
1076
+
cliClient.ProviderDO: "Deploy to DigitalOcean using the DIGITALOCEAN_TOKEN, SPACES_ACCESS_KEY_ID, and SPACES_SECRET_ACCESS_KEY environment variables.",
term.Printf("To skip this prompt, set the DEFANG_PROVIDER=%s in your environment, or use:\n\n defang --provider=%s\n\n", optionValue, optionValue)
1103
+
} else {
1104
+
// Defaults to defang provider in non-interactive mode
1105
+
ifawsInEnv() {
1106
+
term.Warn("Using Defang playground, but AWS environment variables were detected; did you forget --provider=aws or DEFANG_PROVIDER=aws?")
1107
+
}
1108
+
ifdoInEnv() {
1109
+
term.Warn("Using Defang playground, but DIGITALOCEAN_TOKEN environment variable was detected; did you forget --provider=digitalocean or DEFANG_PROVIDER=digitalocean?")
1110
+
}
1111
+
providerID=cliClient.ProviderDefang
1112
+
}
1113
+
casecliClient.ProviderAWS:
1114
+
if!awsInEnv() {
1115
+
term.Warn("AWS provider was selected, but AWS environment variables are not set")
1116
+
}
1117
+
casecliClient.ProviderDO:
1118
+
if!doInEnv() {
1119
+
term.Warn("DigitalOcean provider was selected, but DIGITALOCEAN_TOKEN environment variable is not set")
1120
+
}
1121
+
casecliClient.ProviderDefang:
1122
+
// Ignore any env vars when explicitly using the Defang playground provider
0 commit comments