diff --git a/internal/config/config.go b/internal/config/config.go index 1d95f6a3b1..9a2a4cd521 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -58,6 +58,7 @@ const ( type Config struct { Version string `json:"version" yaml:"version"` Project Project `json:"project" yaml:"project"` + Cloud Cloud `json:"cloud" yaml:"cloud"` SQL []SQL `json:"sql" yaml:"sql"` Gen Gen `json:"overrides,omitempty" yaml:"overrides"` Plugins []Plugin `json:"plugins" yaml:"plugins"` @@ -67,6 +68,12 @@ type Project struct { ID string `json:"id" yaml:"id"` } +type Cloud struct { + Organization string `json:"organization" yaml:"organization"` + Project string `json:"project" yaml:"project"` + Hostname string `json:"hostname" yaml:"hostname"` +} + type Plugin struct { Name string `json:"name" yaml:"name"` Process *struct { diff --git a/internal/config/v_one.go b/internal/config/v_one.go index 08d51e9c9b..9c483b3612 100644 --- a/internal/config/v_one.go +++ b/internal/config/v_one.go @@ -10,6 +10,7 @@ import ( type V1GenerateSettings struct { Version string `json:"version" yaml:"version"` + Cloud Cloud `json:"cloud" yaml:"cloud"` Project Project `json:"project" yaml:"project"` Packages []v1PackageSettings `json:"packages" yaml:"packages"` Overrides []Override `json:"overrides,omitempty" yaml:"overrides,omitempty"` @@ -124,6 +125,7 @@ func (c *V1GenerateSettings) Translate() Config { conf := Config{ Version: c.Version, Project: c.Project, + Cloud: c.Cloud, } for _, pkg := range c.Packages {