Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/gcp #208

Merged
merged 3 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/environment/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type Env struct {
EnvType string `yaml:"envType,omitempty" json:"envType,omitempty"`
State string `yaml:"state,omitempty" json:"state,omitempty"`
DeletionTime string `yaml:"autoDeletionTime,omitempty" json:"autoDeletionTime,omitempty"`
Account string `yaml:"cloudProviderAccount,omitempty" json:"cloudProviderAccount,omitempty"`
Account []string `yaml:"cloudProviderAccounts,omitempty" json:"cloudProviderAccounts,omitempty"`
CreatedBy string `yaml:"createdBy,omitempty" json:"createdBy,omitempty"`
UpdatedBy string `yaml:"updatedBy,omitempty" json:"updatedBy,omitempty"`
CreatedAt string `yaml:"createdAt,omitempty" json:"createdAt,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ type application struct {
// App (Application) interface
var App application = application{
Name: "odin",
Version: "1.3.1",
Version: "1.3.2",
}
9 changes: 8 additions & 1 deletion internal/command/commands/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ type Env command

const ENV_NAME_KEY = "EnvName"

func splitProviderAccount(providerAccount string) []string {
if providerAccount == "" {
return nil
}
return strings.Split(providerAccount, ",")
}

// Run : implements the actual functionality of the command
func (e *Env) Run(args []string) int {
// Define flag set
Expand Down Expand Up @@ -62,7 +69,7 @@ func (e *Env) Run(args []string) int {
}
envConfig := environment.Env{
EnvType: *env,
Account: *providerAccount,
Account: splitProviderAccount(*providerAccount),
Name: *name,
}

Expand Down