Skip to content

Commit

Permalink
quick azure port.
Browse files Browse the repository at this point in the history
  • Loading branch information
tjholm committed Jan 10, 2024
1 parent d68494f commit 18aa107
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 332 deletions.
8 changes: 4 additions & 4 deletions cloud/azure/deploy/program.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ func NewUpProgram(ctx context.Context, details *StackDetails, config *config.Azu
})

// Get Collections
collections := lo.Filter[*deploy.Resource](spec.Resources, func(item *deploy.Resource, index int) bool {
return item.GetCollection() != nil
keyvalueStores := lo.Filter[*deploy.Resource](spec.Resources, func(item *deploy.Resource, index int) bool {
return item.GetKeyValueStore() != nil
})

// Get Buckets
Expand Down Expand Up @@ -181,10 +181,10 @@ func NewUpProgram(ctx context.Context, details *StackDetails, config *config.Azu
}

var mongoCollections *collection.MongoCollections
if len(collections) > 0 {
if len(keyvalueStores) > 0 {
mongoCollections, err = collection.NewMongoCollections(ctx, "mongodb", &collection.MongoCollectionsArgs{
ResourceGroup: rg,
Collections: collections,
Collections: keyvalueStores,
})
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion cloud/azure/runtime/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func main() {

membraneOpts := membrane.DefaultMembraneOptions()

membraneOpts.DocumentPlugin, err = mongodb_service.New()
membraneOpts.KeyValuePlugin, err = mongodb_service.New()
if err != nil {
log.Default().Println("Failed to load document plugin:", err.Error())
}
Expand Down
Loading

0 comments on commit 18aa107

Please sign in to comment.