diff --git a/models/resources/resource.go b/models/resources/resource.go index 4cadd04..32cee2a 100644 --- a/models/resources/resource.go +++ b/models/resources/resource.go @@ -144,7 +144,6 @@ type ResourceInstance[T ResourcePartnerITF] struct { Location GeoPoint `json:"location,omitempty" bson:"location,omitempty"` Country countries.CountryCode `json:"country,omitempty" bson:"country,omitempty"` AccessProtocol string `json:"access_protocol,omitempty" bson:"access_protocol,omitempty"` - Access *Credentials `json:"access,omitempty" bson:"access,omitempty"` Env []models.Param `json:"env,omitempty" bson:"env,omitempty"` Inputs []models.Param `json:"inputs,omitempty" bson:"inputs,omitempty"` Outputs []models.Param `json:"outputs,omitempty" bson:"outputs,omitempty"` @@ -152,7 +151,6 @@ type ResourceInstance[T ResourcePartnerITF] struct { } func (ri *ResourceInstance[T]) ClearEnv() { - ri.Access = nil ri.Env = []models.Param{} ri.Inputs = []models.Param{} ri.Outputs = []models.Param{} diff --git a/models/resources/storage.go b/models/resources/storage.go index 9f43d69..500b2d6 100644 --- a/models/resources/storage.go +++ b/models/resources/storage.go @@ -44,6 +44,7 @@ func (abs *StorageResource) ConvertToPricedResource( type StorageResourceInstance struct { ResourceInstance[*StorageResourcePartnership] + Credentials *Credentials `json:"credentials,omitempty" bson:"credentials,omitempty"` Source string `bson:"source,omitempty" json:"source,omitempty"` // Source is the source of the storage Local bool `bson:"local" json:"local"` SecurityLevel string `bson:"security_level,omitempty" json:"security_level,omitempty"` @@ -54,6 +55,13 @@ type StorageResourceInstance struct { Throughput string `bson:"throughput,omitempty" json:"throughput,omitempty"` // Throughput is the throughput of the storage } +func (ri *StorageResourceInstance) ClearEnv() { + ri.Credentials = nil + ri.Env = []models.Param{} + ri.Inputs = []models.Param{} + ri.Outputs = []models.Param{} +} + func (ri *StorageResourceInstance) StoreDraftDefault() { found := false for _, p := range ri.ResourceInstance.Env {